{
  "schema_version": "1.0.0",
  "id": "trial-signup-delayed-text",
  "title": "Text a trial signup five minutes after they join",
  "category": "speed-to-lead",
  "difficulty": "beginner",
  "featured": false,
  "description": "Wait five minutes after a trial signup, then send a short personal text with a setup tip, fitted to one segment.",
  "tags": [
    "speed-to-lead",
    "trials",
    "twilio",
    "delay",
    "saas"
  ],
  "apps": [
    "Webhooks by Zapier",
    "Delay by Zapier",
    "Code by Zapier",
    "Twilio"
  ],
  "plan": {
    "minimum": "Professional",
    "reasons": [
      "multi-step Zap: 4 steps after the trigger",
      "premium app: Webhooks by Zapier"
    ]
  },
  "tasks": {
    "typical": 3,
    "max": 3
  },
  "trigger": {
    "app": "Webhooks by Zapier",
    "event": "Catch Hook",
    "kind": "instant",
    "title": "App posts a new trial signup",
    "why": "Your app posts each new trial to this Catch Hook URL from its signup handler.",
    "config": {
      "Pick off a Child Key": "(leave blank)"
    },
    "outputs": [
      "user_id",
      "signed_up_at",
      "name",
      "email",
      "phone",
      "plan",
      "sms_opt_in"
    ],
    "sample": "sample-trigger.json"
  },
  "steps": [
    {
      "key": "wait",
      "kind": "delay",
      "app": "Delay by Zapier",
      "event": "Delay For",
      "title": "Wait five minutes",
      "why": "Long enough that the text does not collide with the welcome email, short enough that they are still in the product.",
      "fields": {
        "Time Delayed For (value)": "5",
        "Time Delayed For (unit)": "minutes"
      },
      "outputs": [
        "run_at"
      ]
    },
    {
      "key": "phone",
      "kind": "code",
      "app": "Code by Zapier",
      "event": "Run JavaScript",
      "title": "Format the phone number",
      "why": "Normalises the number; invalid ones make the Twilio step fail visibly instead of texting a wrong number.",
      "code": {
        "language": "javascript",
        "module": "normalize-phone",
        "file": "code/normalize-phone.js"
      },
      "input_data": {
        "phone": "{{trigger.phone}}",
        "default_country": "1"
      },
      "outputs": [
        "e164",
        "valid",
        "extension"
      ]
    },
    {
      "key": "sms",
      "kind": "code",
      "app": "Code by Zapier",
      "event": "Run JavaScript",
      "title": "Write the text",
      "why": "Personal greeting plus the help link, kept to one segment.",
      "code": {
        "language": "javascript",
        "module": "fit-sms",
        "file": "code/fit-sms.js"
      },
      "input_data": {
        "template": "Hi {first_name}, Sam from {business} here. Most people get value fastest by connecting their calendar first. Stuck on anything? Just reply.",
        "first_name": "{{trigger.name}}",
        "business": "YOUR_PRODUCT_NAME",
        "link": "YOUR_HELP_LINK"
      },
      "outputs": [
        "message",
        "encoding",
        "length",
        "segments",
        "trimmed"
      ]
    },
    {
      "key": "text",
      "kind": "action",
      "app": "Twilio",
      "event": "Send SMS",
      "title": "Send it",
      "why": "From a number a person monitors, because replies are the point.",
      "fields": {
        "From Number": "YOUR_TWILIO_NUMBER",
        "To Number": "{{phone.e164}}",
        "Message": "{{sms.message}}",
        "Send Large Messages?": "No"
      },
      "outputs": [
        "sid",
        "status"
      ]
    }
  ]
}
