{
  "name": "Client Onboarding Flow — Purrly",
  "platform": "zapier",
  "metadata": {
    "platform": "zapier",
    "title": "Client Onboarding Flow",
    "trigger_app": "typeform",
    "trigger_event": "new_submission",
    "action_apps": ["docu_sign", "mailchimp", "notion", "notion_crm"],
    "required_accounts": [
      {
        "app": "Typeform",
        "purpose": "Source trigger — fires on every new client intake submission.",
        "fields": ["TYPECRED_API_KEY (account-level)"]
      },
      {
        "app": "DocuSign",
        "purpose": "Sends the contract envelope pre-mapped to the new client.",
        "fields": ["DOCUSIGN_INTEGRATION_KEY", "CONTRACT_TEMPLATE_ID"]
      },
      {
        "app": "Mailchimp",
        "purpose": "Delivers the personalized welcome email the moment an intake lands.",
        "fields": ["MAILCHIMP_API_KEY", "MAILCHIMP_AUDIENCE_ID", "SENDER_NAME", "WELCOME_SUBJECT"]
      },
      {
        "app": "Notion",
        "purpose": "Clones the onboarding workspace template and updates the CRM status.",
        "fields": ["NOTION_API_KEY", "ONBOARDING_TEMPLATE_PAGE_ID", "CRM_DATABASE_ID"]
      }
    ],
    "placeholders": [
      "[TYPECRED_API_KEY]",
      "[DOCUSIGN_INTEGRATION_KEY]",
      "[CONTRACT_TEMPLATE_ID]",
      "[MAILCHIMP_API_KEY]",
      "[MAILCHIMP_AUDIENCE_ID]",
      "[SENDER_NAME]",
      "[WELCOME_SUBJECT]",
      "[NOTION_API_KEY]",
      "[ONBOARDING_TEMPLATE_PAGE_ID]",
      "[CRM_DATABASE_ID]"
    ]
  },
  "flow": {
    "modules": [
      {
        "id": 1,
        "key": "typeform.new_submission_trigger",
        "app": "typeform",
        "role": "trigger",
        "event": "new_submission",
        "description": "Fires every time a client submits the intake form — captures email, full name, company, project type, and any custom fields the team authored.",
        "output_fields": [
          "submission.id",
          "answers.email",
          "answers.name",
          "answers.company",
          "answers.project_type",
          "answers.budget",
          "submitted_at"
        ]
      },
      {
        "id": 2,
        "key": "notion.create_onboarding_workspace",
        "app": "notion",
        "role": "action",
        "operation": "clone_page",
        "description": "Clones the standard ONBOARDING_TEMPLATE_PAGE_ID into a new page for the client, pre-populating title with company + client name and tagging the page with Status = 'Awaiting signature'.",
        "input_fields": [
          "template_page_id (ONBOARDING_TEMPLATE_PAGE_ID)",
          "title (company + name from module 1)",
          "properties.status = 'Awaiting signature'"
        ],
        "output_fields": ["page.id", "page.url", "page.status"]
      },
      {
        "id": 3,
        "key": "mailchimp.send_welcome_email",
        "app": "mailchimp",
        "role": "action",
        "operation": "send_campaign",
        "description": "Sends the personalized welcome campaign to the new client’s email. Merge tags (*|FNAME|*, *|COMPANY|*) are populated from the Typeform fields so the same campaign template renders a unique email per recipient.",
        "input_fields": [
          "audience_id (MAILCHIMP_AUDIENCE_ID)",
          "to_email (from module 1)",
          "from_name (SENDER_NAME)",
          "subject (WELCOME_SUBJECT)",
          "merge_fields.fname (from module 1.answers.name)",
          "merge_fields.company (from module 1.answers.company)"
        ],
        "output_fields": ["send.id", "send.status", "send.timestamp"]
      },
      {
        "id": 4,
        "key": "docusign.send_envelope",
        "app": "docusign",
        "role": "action",
        "operation": "create_envelope",
        "description": "Creates a DocuSign envelope pre-addressed to the client’s email, using CONTRACT_TEMPLATE_ID, with the recipient role pre-mapped and sign-here tabs positioned from the template.",
        "input_fields": [
          "template_id (CONTRACT_TEMPLATE_ID)",
          "recipient_email (from module 1)",
          "recipient_name (from module 1)",
          "client_company (from module 1)"
        ],
        "output_fields": ["envelope.id", "envelope.status", "envelope.uri"]
      },
      {
        "id": 5,
        "key": "notion.update_crm_status",
        "app": "notion",
        "role": "action",
        "operation": "update_database_item",
        "description": "Updates the CRM_DATABASE_ID row for this client with Status = 'Onboarding in progress' and writes the onboarding page URL and DocuSign envelope ID so the team has one searchable record per client.",
        "input_fields": [
          "database_id (CRM_DATABASE_ID)",
          "filter.email = (from module 1)",
          "properties.status = 'Onboarding in progress'",
          "properties.onboarding_page_url = (from module 2)",
          "properties.envelope_id = (from module 4)"
        ],
        "output_fields": ["page.id", "page.last_edited"]
      }
    ]
  },
  "setup": {
    "estimated_minutes": 35,
    "steps": [
      {
        "order": 1,
        "title": "Create the Zap and connect Typeform",
        "detail": "In Zapier click Create Zap, pick Typeform as the trigger app, choose New Submission as the trigger event, and connect your Typeform account using the TYPECRED_API_KEY. Confirm the intake form you want to watch is the one whose submissions will start the chain."
      },
      {
        "order": 2,
        "title": "Add the Notion onboarding workspace clone step",
        "detail": "Add a Notion action step, choose Clone Page, paste ONBOARDING_TEMPLATE_PAGE_ID as the source, and map the client’s company + name into the cloned page title. Tag the page Status = 'Awaiting signature' so the team can filter open onboardings in Notion."
      },
      {
        "order": 3,
        "title": "Add the Mailchimp welcome email step",
        "detail": "Add a Mailchimp action step, choose Send Campaign, connect your Mailchimp account, and pick the MAILCHIMP_AUDIENCE_ID. Map the client’s email into the recipient, SENDER_NAME into the from name, and WELCOME_SUBJECT into the subject. Use merge tags *|FNAME|* and *|COMPANY|* in the campaign template — they’ll fill in from the Typeform data automatically."
      },
      {
        "order": 4,
        "title": "Add the DocuSign envelope step",
        "detail": "Add a DocuSign action step, choose Create Envelope from Template, and connect your DocuSign account using the DOCUSIGN_INTEGRATION_KEY. Pick CONTRACT_TEMPLATE_ID, map the client’s email into the recipient slot, the client’s full name into the recipient name, and the company into the dedicated field. The envelope goes out the moment a Typeform submission lands."
      },
      {
        "order": 5,
        "title": "Add the Notion CRM status update + test the Zap",
        "detail": "Add the final Notion action, choose Update Database Item, point it at CRM_DATABASE_ID, and set the filter to match the client by email. Update Status to 'Onboarding in progress', write the onboarding page URL from module 2, and write the envelope ID from module 4. Click Test & Review with a real (or sandbox) intake submission to confirm all five modules wire up correctly, then flip the Zap to On."
      }
    ]
  }
}
