{
  "schema_version": "1.0.0",
  "id": "meeting-prep-research-agent",
  "title": "Brief the host before a booked sales call",
  "category": "ai-agents",
  "difficulty": "intermediate",
  "featured": false,
  "description": "When someone books a call, look up their company and CRM history, have Claude write a five-line brief, and send it to the host in Slack.",
  "tags": [
    "ai-agent",
    "claude",
    "calendly",
    "apollo",
    "hubspot",
    "slack"
  ],
  "apps": [
    "Calendly",
    "Code by Zapier",
    "Apollo",
    "HubSpot",
    "Anthropic (Claude)",
    "Slack"
  ],
  "plan": {
    "minimum": "Professional",
    "reasons": [
      "multi-step Zap: 5 steps after the trigger"
    ]
  },
  "tasks": {
    "typical": 5,
    "max": 5
  },
  "trigger": {
    "app": "Calendly",
    "event": "Invitee Created",
    "kind": "instant",
    "title": "New booking",
    "why": "Fires when someone books any of your Calendly event types.",
    "config": {
      "Scope": "User"
    },
    "outputs": [
      "invitee_name",
      "invitee_first_name",
      "invitee_email",
      "invitee_phone",
      "event_type_name",
      "event_start_time",
      "event_end_time",
      "timezone",
      "cancel_url",
      "reschedule_url",
      "questions_and_answers"
    ],
    "sample": "sample-trigger.json"
  },
  "steps": [
    {
      "key": "domain",
      "kind": "code",
      "app": "Code by Zapier",
      "event": "Run JavaScript",
      "title": "Split the email domain",
      "why": "Finds the company domain, or tells the brief this is a personal mailbox.",
      "code": {
        "language": "javascript",
        "module": "email-domain",
        "file": "code/email-domain.js"
      },
      "input_data": {
        "email": "{{trigger.invitee_email}}"
      },
      "outputs": [
        "valid",
        "domain",
        "is_free_provider",
        "is_role_address",
        "company_guess",
        "website"
      ]
    },
    {
      "key": "org",
      "kind": "search",
      "app": "Apollo",
      "event": "Enrich Organization",
      "title": "Look up the company",
      "why": "Industry, headcount, and location for the domain. Personal mailboxes simply come back empty.",
      "fields": {
        "Domain": "{{domain.domain}}",
        "Should this step be considered a \"success\" when nothing is found?": "Yes"
      },
      "outputs": [
        "name",
        "industry",
        "estimated_num_employees",
        "city",
        "country",
        "short_description",
        "_zap_search_was_found_status"
      ]
    },
    {
      "key": "crm",
      "kind": "search",
      "app": "HubSpot",
      "event": "Find Contact",
      "title": "Check for CRM history",
      "why": "Shows whether this is a returning contact and what stage they are at.",
      "fields": {
        "Field to search by": "Email",
        "Search value": "{{trigger.invitee_email}}",
        "Should this step be considered a \"success\" when nothing is found?": "Yes"
      },
      "outputs": [
        "id",
        "firstname",
        "company",
        "lifecyclestage",
        "hs_lead_status",
        "last_note",
        "_zap_search_was_found_status"
      ]
    },
    {
      "key": "brief",
      "kind": "ai",
      "app": "Anthropic (Claude)",
      "event": "Send Message",
      "title": "Write the five-line brief",
      "why": "Claude turns three sources into five short lines. It is told to mark anything it does not know rather than fill gaps.",
      "fields": {
        "User Message": "Invitee: {{trigger.invitee_name}} ({{trigger.invitee_email}})\nEvent: {{trigger.event_type_name}} at {{trigger.event_start_time}} ({{trigger.timezone}})\nBooking answers: {{trigger.questions_and_answers}}\nPersonal mailbox: {{domain.is_free_provider}}\nCompany data (found {{org._zap_search_was_found_status}}): {{org.name}}, {{org.industry}}, {{org.estimated_num_employees}} people, {{org.city}} {{org.country}}. {{org.short_description}}\nCRM (found {{crm._zap_search_was_found_status}}): stage {{crm.lifecyclestage}}, lead status {{crm.hs_lead_status}}, last note: {{crm.last_note}}",
        "System": "You prepare a host for a sales call. Write exactly five lines: Who, Company, History, What they asked, Suggested opener. Use only the facts provided. Write \"unknown\" where a fact is missing. Plain text.",
        "Model": "Claude Haiku",
        "Max Tokens": "600"
      },
      "outputs": [
        "response"
      ]
    },
    {
      "key": "dm",
      "kind": "action",
      "app": "Slack",
      "event": "Send Direct Message",
      "title": "Send the brief to the host",
      "why": "A direct message, so it is on the host's phone before the call.",
      "fields": {
        "To Username": "YOUR_SLACK_USERNAME",
        "Message Text": ":calendar: {{trigger.event_type_name}} with {{trigger.invitee_name}} at {{trigger.event_start_time}}\n{{brief.response}}\nReschedule link if needed: {{trigger.reschedule_url}}",
        "Send as a bot?": "Yes",
        "Bot Name": "Zap alerts"
      },
      "outputs": [
        "ts"
      ]
    }
  ]
}
