{
  "workflow_name": "Turn Twilio text-to-join messages into ActiveCampaign contacts",
  "workflow_steps": {
    "steps": [
      {
        "id": "1",
        "position": {
          "x": 0,
          "y": 0
        },
        "data": {
          "label": "Incoming SMS",
          "app": {
            "key": "twilio",
            "fm_app": "twilio"
          },
          "eventSlug": "twilio_incoming_sms",
          "eventTitle": "Incoming SMS",
          "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": "twilio",
        "stepID": "1",
        "action": "twilio_incoming_sms",
        "nodeType": "step",
        "actionAppArgs": [],
        "captureResponse": {
          "MessageSid": "SM7f2c9e1a4b",
          "From": "+15559876543",
          "To": "+15550102030",
          "Body": "Join sam.ortiz@example.com"
        },
        "responses": [
          {
            "letter": "A",
            "time": "01/07/2026, 10:00:00",
            "response": {
              "MessageSid": "SM7f2c9e1a4b",
              "From": "+15559876543",
              "To": "+15550102030",
              "Body": "Join sam.ortiz@example.com"
            }
          }
        ],
        "activeResponseIndex": 0
      },
      {
        "id": "2",
        "position": {
          "x": 175,
          "y": 0
        },
        "type": "action",
        "data": {
          "label": "Find the email in the text",
          "layoutDirection": "horizontal",
          "stepNumber": 2,
          "app": {
            "key": "text_formatter",
            "fm_app": "text_formatter"
          },
          "eventSlug": "extract_pattern",
          "eventTitle": "Extract Pattern"
        },
        "parentType": "step",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": {
          "content": "{twilio1.Body}",
          "regex_pattern": "[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}"
        },
        "application": "text_formatter",
        "action": "extract_pattern",
        "nodeType": "step",
        "stepID": "2"
      },
      {
        "id": "3",
        "position": {
          "x": 350,
          "y": 0
        },
        "type": "action",
        "data": {
          "label": "Filter Conditions",
          "layoutDirection": "horizontal",
          "stepNumber": 3,
          "app": {
            "key": "filter",
            "fm_app": "filter"
          },
          "eventSlug": "continue_if",
          "eventTitle": "Continue If Condition Meet",
          "customLabel": "Only texts that contain an email"
        },
        "parentType": "step",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": {
          "filterConditions": {
            "1": [
              {
                "key": "{text_formatter2.result_0}",
                "condition": "is_not_empty",
                "value": ""
              }
            ]
          }
        },
        "application": "filter",
        "action": "continue_if",
        "nodeType": "step",
        "stepID": "3",
        "filterConditions": {
          "filterConditions": {
            "1": [
              {
                "key": "{text_formatter2.result_0}",
                "condition": "is_not_empty",
                "value": ""
              }
            ]
          }
        }
      },
      {
        "id": "4",
        "position": {
          "x": 525,
          "y": 0
        },
        "type": "action",
        "data": {
          "label": "Create or update ActiveCampaign contact",
          "layoutDirection": "horizontal",
          "stepNumber": 4,
          "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": "{text_formatter2.result_0}",
          "firstName": "",
          "lastName": "",
          "phone": "{twilio1.From}"
        },
        "application": "activecampaign",
        "action": "create_or_update_contact",
        "nodeType": "step",
        "stepID": "4"
      },
      {
        "id": "5",
        "position": {
          "x": 700,
          "y": 0
        },
        "type": "action",
        "data": {
          "label": "Tag the ActiveCampaign contact",
          "layoutDirection": "horizontal",
          "stepNumber": 5,
          "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": "{activecampaign4.contact_id}",
          "tag_id": "sms-signup",
          "tag_action": "add"
        },
        "application": "activecampaign",
        "action": "add_tag_to_contact",
        "nodeType": "step",
        "stepID": "5"
      },
      {
        "id": "6",
        "position": {
          "x": 875,
          "y": 0
        },
        "type": "action",
        "data": {
          "label": "Text back a confirmation",
          "layoutDirection": "horizontal",
          "stepNumber": 6,
          "app": {
            "key": "twilio",
            "fm_app": "twilio"
          },
          "eventSlug": "send_sms",
          "eventTitle": "Send SMS"
        },
        "parentType": "step",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": {
          "to": "{twilio1.From}",
          "message": "Thanks, you're on the list. We'll email you at {text_formatter2.result_0}."
        },
        "application": "twilio",
        "action": "send_sms",
        "nodeType": "step",
        "stepID": "6"
      },
      {
        "id": "main_end_placeholder",
        "position": {
          "x": 1050,
          "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-5",
        "source": "4",
        "target": "5",
        "type": "step",
        "data": []
      },
      {
        "id": "e-5-6",
        "source": "5",
        "target": "6",
        "type": "step",
        "data": []
      },
      {
        "id": "e-6-main_end_placeholder",
        "source": "6",
        "target": "main_end_placeholder",
        "type": "placeholder",
        "data": []
      }
    ]
  },
  "workflow_settings": {
    "name": "Turn Twilio text-to-join messages into ActiveCampaign contacts",
    "folder": "all",
    "description": "People text their email address to your Twilio number and FlowMattic adds them to ActiveCampaign with their phone number and a tag, then texts back a confirmation. It works well on flyers, at events and on packaging. After import, point your Twilio number's messaging webhook at the workflow and choose the tag and reply text.",
    "status": "off",
    "user_email": "",
    "webhook_queue": "disabled",
    "workflow_auth_key": "",
    "builder_version": "v2",
    "time": "",
    "ai_generated": "yes"
  }
}