{
  "workflow_name": "Give new ActiveCampaign subscribers an Eventbrite discount code",
  "workflow_steps": {
    "steps": [
      {
        "id": "1",
        "position": {
          "x": 0,
          "y": 0
        },
        "data": {
          "label": "Contact Subscribed",
          "app": {
            "key": "activecampaign",
            "fm_app": "activecampaign"
          },
          "eventSlug": "subscribe",
          "eventTitle": "Contact Subscribed",
          "layoutDirection": "horizontal",
          "stepNumber": 1
        },
        "targetPosition": "bottom",
        "type": "trigger",
        "stepNumber": 1,
        "expanded": true,
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "application": "activecampaign",
        "stepID": "1",
        "action": "subscribe",
        "nodeType": "step",
        "actionAppArgs": [],
        "captureResponse": {
          "type": "subscribe",
          "date_time": "2026-10-22T09:00:00-05:00",
          "contact_id": "1187",
          "contact_email": "diego.alvarez@example.com",
          "contact_first_name": "Diego",
          "contact_last_name": "Alvarez",
          "list": "5"
        },
        "responses": [
          {
            "letter": "A",
            "time": "01/07/2026, 10:00:00",
            "response": {
              "type": "subscribe",
              "date_time": "2026-10-22T09:00:00-05:00",
              "contact_id": "1187",
              "contact_email": "diego.alvarez@example.com",
              "contact_first_name": "Diego",
              "contact_last_name": "Alvarez",
              "list": "5"
            }
          }
        ],
        "activeResponseIndex": 0
      },
      {
        "id": "2",
        "position": {
          "x": 175,
          "y": 0
        },
        "type": "action",
        "data": {
          "label": "Create a single-use discount code",
          "layoutDirection": "horizontal",
          "stepNumber": 2,
          "app": {
            "key": "eventbrite",
            "fm_app": "eventbrite"
          },
          "eventSlug": "create_discount",
          "eventTitle": "Create Discount"
        },
        "parentType": "step",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": {
          "organization_id": "",
          "event_id": "",
          "discount_code": "WELCOME-{activecampaign1.contact_id}",
          "discount_type": "coded",
          "percent_off": "20",
          "quantity_available": "1"
        },
        "application": "eventbrite",
        "action": "create_discount",
        "nodeType": "step",
        "stepID": "2"
      },
      {
        "id": "3",
        "position": {
          "x": 350,
          "y": 0
        },
        "type": "action",
        "data": {
          "label": "Email the code",
          "layoutDirection": "horizontal",
          "stepNumber": 3,
          "app": {
            "key": "email",
            "fm_app": "email"
          },
          "eventSlug": "send_email",
          "eventTitle": "Send Email"
        },
        "parentType": "step",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": {
          "to_email": "{activecampaign1.contact_email}",
          "email_subject": "Your 20% ticket discount",
          "email_body": "Hi {activecampaign1.contact_first_name},\n\nThanks for subscribing. Use code WELCOME-{activecampaign1.contact_id} at checkout for 20% off your ticket. The code works once."
        },
        "application": "email",
        "action": "send_email",
        "nodeType": "step",
        "stepID": "3"
      },
      {
        "id": "main_end_placeholder",
        "position": {
          "x": 525,
          "y": 0
        },
        "type": "placeholder",
        "data": {
          "label": "+",
          "layoutDirection": "horizontal",
          "stepNumber": null,
          "app": []
        },
        "measured": {
          "width": 40,
          "height": 82
        },
        "stepID": "main_end_placeholder",
        "nodeType": "placeholder",
        "actionAppArgs": []
      }
    ],
    "edges": [
      {
        "id": "e-1-2",
        "source": "1",
        "target": "2",
        "type": "step",
        "data": []
      },
      {
        "id": "e-2-3",
        "source": "2",
        "target": "3",
        "type": "step",
        "data": []
      },
      {
        "id": "e-3-main_end_placeholder",
        "source": "3",
        "target": "main_end_placeholder",
        "type": "placeholder",
        "data": []
      }
    ]
  },
  "workflow_settings": {
    "name": "Give new ActiveCampaign subscribers an Eventbrite discount code",
    "folder": "all",
    "description": "When a contact subscribes to an ActiveCampaign list, FlowMattic creates a single-use Eventbrite discount code for them and emails it. Event organisers can reward newsletter or VIP list sign-ups with a ticket discount. After import, choose your Eventbrite organization and event, and set the discount amount.",
    "status": "off",
    "user_email": "",
    "webhook_queue": "disabled",
    "workflow_auth_key": "",
    "builder_version": "v2",
    "time": "",
    "ai_generated": "yes"
  }
}