{
  "workflow_name": "Add new Recurly subscribers to ActiveCampaign and tag them",
  "workflow_steps": {
    "steps": [
      {
        "id": "1",
        "position": {
          "x": 0,
          "y": 0
        },
        "data": {
          "label": "Subscription Created",
          "app": {
            "key": "recurly",
            "fm_app": "recurly"
          },
          "eventSlug": "subscription_created",
          "eventTitle": "Subscription Created",
          "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": "recurly",
        "stepID": "1",
        "action": "subscription_created",
        "nodeType": "step",
        "actionAppArgs": [],
        "captureResponse": {
          "id": "ps8w2xv5pd2k",
          "object_type": "subscription",
          "site_id": "o4q8c3a1hd0b",
          "event_type": "created",
          "event_time": "2026-10-22T12:00:00Z",
          "uuid": "5e2f3a8b9c0d4e1f2a3b4c5d6e7f8a9b",
          "account_code": "cust-10482"
        },
        "responses": [
          {
            "letter": "A",
            "time": "01/07/2026, 10:00:00",
            "response": {
              "id": "ps8w2xv5pd2k",
              "object_type": "subscription",
              "site_id": "o4q8c3a1hd0b",
              "event_type": "created",
              "event_time": "2026-10-22T12:00:00Z",
              "uuid": "5e2f3a8b9c0d4e1f2a3b4c5d6e7f8a9b",
              "account_code": "cust-10482"
            }
          }
        ],
        "activeResponseIndex": 0
      },
      {
        "id": "2",
        "position": {
          "x": 175,
          "y": 0
        },
        "type": "action",
        "data": {
          "label": "Get the Recurly account",
          "layoutDirection": "horizontal",
          "stepNumber": 2,
          "app": {
            "key": "api",
            "fm_app": "api"
          },
          "eventSlug": "get",
          "eventTitle": "GET"
        },
        "parentType": "step",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": {
          "api_endpoint": "https://v3.recurly.com/accounts/code-{recurly1.account_code}",
          "request_type": "get",
          "simple_response": "Yes",
          "set_headers": "true",
          "api_headers": {
            "Accept": "application/vnd.recurly.v2021-02-25+json",
            "Authorization": "Basic YOUR_BASE64_RECURLY_API_KEY"
          }
        },
        "application": "api",
        "action": "get",
        "nodeType": "step",
        "stepID": "2"
      },
      {
        "id": "3",
        "position": {
          "x": 350,
          "y": 0
        },
        "type": "action",
        "data": {
          "label": "Create/Update ActiveCampaign contact",
          "layoutDirection": "horizontal",
          "stepNumber": 3,
          "app": {
            "key": "activecampaign",
            "fm_app": "activecampaign"
          },
          "eventSlug": "create_or_update_contact",
          "eventTitle": "Create or Update Contact"
        },
        "parentType": "step",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": {
          "email": "{api2.email}",
          "firstName": "{api2.first_name}",
          "lastName": "{api2.last_name}"
        },
        "application": "activecampaign",
        "action": "create_or_update_contact",
        "nodeType": "step",
        "stepID": "3"
      },
      {
        "id": "4",
        "position": {
          "x": 525,
          "y": 0
        },
        "type": "action",
        "data": {
          "label": "Tag as Recurly subscriber",
          "layoutDirection": "horizontal",
          "stepNumber": 4,
          "app": {
            "key": "activecampaign",
            "fm_app": "activecampaign"
          },
          "eventSlug": "add_tag_to_contact",
          "eventTitle": "Add/Remove Tag From Contact"
        },
        "parentType": "step",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": {
          "contact_id": "{activecampaign3.contact_id}",
          "tag_id": "",
          "tag_action": "add"
        },
        "application": "activecampaign",
        "action": "add_tag_to_contact",
        "nodeType": "step",
        "stepID": "4"
      },
      {
        "id": "main_end_placeholder",
        "position": {
          "x": 700,
          "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-4",
        "source": "3",
        "target": "4",
        "type": "step",
        "data": []
      },
      {
        "id": "e-4-main_end_placeholder",
        "source": "4",
        "target": "main_end_placeholder",
        "type": "placeholder",
        "data": []
      }
    ]
  },
  "workflow_settings": {
    "name": "Add new Recurly subscribers to ActiveCampaign and tag them",
    "folder": "all",
    "description": "When a subscription is created in Recurly, the workflow fetches the account details from the Recurly API and creates or updates the subscriber in ActiveCampaign with a tag. Subscription businesses can start onboarding emails the moment someone signs up. After import, put your Base64-encoded Recurly API key in the API step header and pick the tag.",
    "status": "off",
    "user_email": "",
    "webhook_queue": "disabled",
    "workflow_auth_key": "",
    "builder_version": "v2",
    "time": "",
    "ai_generated": "yes"
  }
}