Skip to content

Automations ​

Event-driven playbooks that capture leads and start conversations without anyone touching the inbox. Each automation attaches to one of your AI sales assistants: the automation fires on its trigger (a form email, a webhook call, a Meta lead form submission, an Instagram or Facebook comment, or a schedule), and the assistant takes the conversation from there.

In the app

Open Automations in the left sidebar at app.mychatbot.app/automations. Pick the assistant in the dropdown at the top right, then choose a template from the list on the left — its settings open on the right. On single-assistant plans the assistant picker is fixed.

The Automations page: template list on the left, settings panel on the right

At a glance ​

AutomationCategoryTriggerWhat it does
Lead Form Instant OutreachLead Capture & OutreachAn email from your website form arrives in the connected mailboxCreates a lead and (optionally) sends a first message via Personal WhatsApp, Telegram account, E-Chat Viber and other channels; the assistant handles replies
Lead FormsLead Capture & OutreachA Meta (Facebook/Instagram) Lead Gen form is submittedSaves the lead to Contacts always; per enabled form, routes it to an assistant for instant outreach
Trigger OutreachLead Capture & OutreachAn external system POSTs to a unique webhook URLCreates a lead and (optionally) sends a message — order updates, appointment reminders, CRM events
Lead SupervisorLead OperationsA schedule you set (daily / every 3 days / weekly)Reviews recent chats and fills in missing funnel statuses and labels from conversation context
Keyword Responder (Instagram + Facebook)Social Keyword TriggersA monitored Instagram or Facebook post receives a comment containing a keywordReplies publicly under the comment and/or sends a private DM
Telegram funnelsLead Capture & OutreachSomeone opens your bot through a link from an ad, or writes to it for the first timeRuns a step-by-step scenario with buttons, reminders counting down to an event and an offer, then hands over to the assistant — see Telegram funnels

Each template in the list carries a chip: Connected (this assistant already uses it), Paused (connected but switched off), Connect (available), or Soon (coming soon). At the bottom of the list, Request a custom automation lets you describe a bespoke workflow (up to 2000 characters) — save it with Save request and the team follows up.

Automations vs follow-ups ​

Both send messages automatically, but they solve different problems:

AutomationsFollow-ups
Starts fromAn external event (form email, webhook, lead form, comment) or a scheduleAn existing conversation that matches a status/label and goes quiet
AudienceNew leads that don't have a chat yet (or chats needing maintenance)Clients your assistant has already talked to and tagged
Typical jobFirst touch: capture the lead and open the conversationRe-engagement: nudge a lead that stopped replying
Configured atAutomations (/automations)Outreach (/follow-up)

Rule of thumb: use an automation to start the relationship, a follow-up to revive it. Lead Supervisor is the odd one out — it doesn't message anyone; it keeps your pipeline data clean so follow-ups have accurate statuses/labels to target.

How the page works ​

ElementBehavior
Create automationCreates the setup and attaches it to the selected assistant. Disabled while required channels are missing (a yellow warning explains what to connect first)
Save changesReplaces Create automation once connected; persists edits
Connect agent switchPauses and resumes the automation. Flip it off to pause: "This automation is paused. Settings and webhook URLs are kept. Turn the switch back on to resume." While paused, queued sends are dropped and nobody is messaged: a paused Trigger Outreach webhook still answers 200 but captures no lead, a paused Keyword Responder leaves comments unanswered, a paused Lead Forms automation still captures leads into Contacts (unless another account whose connection to the same Facebook Page is still live has the form enabled in a Lead Forms automation that is not paused: then the lead goes to that account, see Page connected under more than one account), and a paused Lead Form Instant Outreach ignores lead emails. Nothing is replayed on resume. A send queued before the pause still goes out if you resume before it falls due; a pause made from Claude or Codex (automation_set_paused) drops it either way. Lead Hydration, Telegram Funnel, Client Base Outreach, and Lead Supervisor don't read the switch yet
Delete automationRemoves the setup for good, after a confirmation: "This will permanently delete all trigger settings, webhook URLs, channels and instructions. This cannot be undone."
Use an existing automation setupIf another assistant on your account already has this automation configured, buttons labeled with that assistant's name let you attach the same setup instead of building a new one
Automation status cardAppears once connected; refreshes about once a minute while the page is open

If Claude, Codex, or another AI tool changed this automation while its page was open, reload the page before Save changes: the page saves back everything it loaded, which would undo that change.

The Automation status card shows a state badge — Pending, Processing, Paused, Finished, Error, or Interrupted — plus Last updated, a "Processed X of Y leads/chats/comments" summary, and metric tiles: New leads queued (or New chats queued / New comments queued), Processed, Failed, Skipped. Failures show under Recent errors (N) with the item, channel, and time; only the last three display ("…N more logged in history").

Status badges and recovery ​

BadgeMeaningWhat to do
PendingConnected and waiting — for the first trigger event, the next scheduled run, or messages held back by a Send Delay / Sending WindowNothing; it starts on its own
ProcessingA run is working through the queue right nowWait — the card refreshes about once a minute while the page is open
FinishedThe last run completed; the automation stays connected and fires again on the next triggerNothing
ErrorThe last run hit a problemRead Recent errors, fix the cause (most often a disconnected channel or expired access — reconnect it on Channels), then fire the trigger again; the next run replaces the badge. A Trigger Outreach webhook that repeats an event handled less than 30 minutes ago is skipped as a duplicate — see retry semantics below
Paused / InterruptedA run stopped part-way (rare). Not the same as pausing the whole automation with the Connect agent switchNo manual resume exists — none is needed: the next trigger event or scheduled run starts fresh and replaces the badge

Retry semantics: each trigger event is processed once — items counted as Failed are not retried automatically. To retry a lead, fire its trigger again: re-send the webhook call, re-submit the form, or post the comment again. Re-firing is safe — contacts are matched by phone/email, so a retry updates the existing lead instead of duplicating it. For a Trigger Outreach webhook, a re-send of the same event only counts as a retry once 30 minutes have passed: a delivery that was handled — accepted (200 "Outreach prepared…"), skipped (200 "Lead captured; outreach skipped: …"), or held back by a Telegram rate limit (200 "Lead captured; outreach deferred until the Telegram rate-limit window closes" or "Lead captured; outreach could not be delivered (Telegram rate limit)") — marks the event as handled for 30 minutes, and the same event sent to the same trigger inside that window is answered 200 "Duplicate event, already handled" with nothing sent — even when the first message later failed or was dropped, or, with "could not be delivered", was never queued at all. Which deliveries are marked, and what makes two deliveries "the same event", depends on the payload — see Duplicates and idempotency. To retry such a lead by hand within the window, wait the 30 minutes out; on the plain JSON payload, SalesDrive and Greenforest send_message a changed body (for example a different context on the plain payload) also counts as a new event, but KeyCRM and HouseCallPro deliveries are matched on their event fields, so editing other fields does not help there. A delivery that failed with a 4xx/5xx is not marked, so it can be re-sent straight away. (One exception to the automatic-retry rule: messages already queued for delayed delivery that catch the Telegram account channel while it is reconnecting are retried automatically a few times before being marked Failed.) A Trigger Outreach message held by Send Delay, Interval Seconds or a Sending Window is re-checked just before it goes out: if the automation was paused or deleted, the trigger removed, or the assistant switched off in the meantime (for example by a balance or subscription lapse), the message is dropped, not resumed later, and the status callback receives failed with a "not sent: …" reason such as "not sent: the assistant is switched off". Fire the trigger again once the automation and assistant are back on (a repeat of the same event within 30 minutes of the first delivery is answered as a duplicate).

Error history: "…N more logged in history" means older failures from the same run stay in the Recent errors (N) count, but there is no separate error-history page — the card is the whole view. The durable per-client record lives in the conversation itself: open the client's chat on Chats and look for the "Outreach sent successfully" / "Outreach send failed" activity entries in the timeline. An outreach email that went out without one of its files also gets an "Email sent, some attachments failed" entry. It names each file that wasn't delivered and why. A Google Drive file there is named by its Drive name or file id, and one that isn't shared as Anyone with the link → Viewer is reported as not shared publicly (see Email: Attachment problems). A file linked in the message text that fails to attach keeps its link where the message put it. A failed file from the Email Subject and Attachments tab has its link added at the end of the email. Lead Form Instant Outreach failures, and lead emails skipped because the agent was off, additionally raise an alert on Notifications.

One setup per assistant

An assistant can hold one setup of each automation type — creating a new one replaces the old attachment. The exception is Lead Form Instant Outreach, which supports up to 5 lead sources per assistant ("You can connect up to 5 lead source emails for this assistant").

Shared outreach settings ​

The lead-capture automations (Lead Form Instant Outreach, Lead Forms, Trigger Outreach) share the same outreach building blocks:

SettingWhat it does
Destination channelsWhich channel(s) send the first message. Only channels connected to the assistant are selectable — others show (not connected). Channels are attempted in order; the first successful send stops further attempts for that client
Message typeAgent instruction — the AI composes the first message from your guidance ("Describe the outcome, tone, and key talking points"). Custom message — you write the exact text; {name} and {context} placeholders are substituted (Trigger Outreach also fills {phone_number} and {email}). Type / in either field to insert a saved message template (create templates in profile settings)
Email Subject and AttachmentsExtra tab that appears when the Gmail/Email channel is selected; an email subject is required when using a custom message over email
Omit core instructionsThe assistant uses only the instruction written here and ignores its general core instructions
Delay & Throttling OptionsSend Delay (e.g. 5m, 1h) — wait after the trigger fires; empty sends as soon as rules allow. Interval Seconds — minimum gap between consecutive sends to avoid API blocking (e.g. 15 queues 1 message every 15 s). Timezone + Sending Window (optional) — inside the window messages go out immediately; outside they wait for the window to open (e.g. hold until 09:00)

All three automations offer the same channel list: the "cold-start" channels (Personal WhatsApp, Telegram account, E-Chat Viber, Business Viber, E-Chat Telegram, Gmail, Calls, Calls Ringostat, Calls UniTalk, Calls Binotel, SMS) plus WhatsApp Business, Telegram bot, Viber bot, Messenger, Instagram, TikTok, and OLX — those last ones can only deliver when the client already has a chat on that channel.

Lead Form Instant Outreach ​

Turns website-form emails into instant conversations. Your form notifications land in a mailbox; the automation watches that mailbox and reacts to each new lead.

SettingNotes
Form sender emailThe sender address of your form notifications (e.g. form-leads@yourdomain.com) — so the automation only processes letters from that specific sender, not everything in the mailbox
Automation modeCollect leads only — capture submissions into the leads pipeline, no message sent ("Outreach stays off in this mode. Switch anytime when you are ready."). Collect and send instant outreach — queue the lead for an immediate assistant follow-up
Pipeline stage (optional)In collect-only mode, pick a default funnel status so leads land in the right column (No default stage otherwise). Leads are assigned to this assistant's pipeline
Outreach agent instruction"The AI agent sends one message to start the conversation. Explain the greeting and how to respond to typical lead questions."
Add lead sourceTabs across the top let you run up to 5 form mailboxes per assistant, each with its own settings

Both modes tag each captured lead with the automation as its lead source, even when delivery fails or the send is queued. The source is shown by the Form sender email. It is stamped on first touch only (a lead that already has a source keeps it) and you can filter by it under Lead source in Chats, Contacts and the dashboard.

An AI agent or an MCP client like Claude Code can create and change these too, with set_lead_form_instant_outreach (Sales tools reference).

Prerequisites (shown as warnings until met):

  • "Email channel is not connected, and it has to be connected with the same mailbox that receives website form leads." — connect the receiving mailbox as an Email channel on this assistant (see Email channel).
  • In outreach mode: "Connect at least one outbound channel (Personal WhatsApp, Telegram account, Email or E-Chat Viber) for this assistant before creating the automation."

A separate notice appears whenever the agent linked to the automation is off: "The agent linked to this automation is off, so new form leads may be skipped. Turn the agent on to make sure every lead is processed." It is a heads-up, not a prerequisite — Create automation stays available while it shows. What happens to a lead that arrives while the agent is off is described below.

How lead details are read from the email ​

There is no required email template. The automation takes each notification whose sender matches the Form sender email (HTML emails are fine — they're converted to plain text, attachments included) and an AI step extracts four things from whatever the text contains: the lead's name, phone number, email address, and Telegram username. Anything it can't find stays empty; local phone numbers are normalized to international format. Clearly labeled lines parse most reliably:

From: form-leads@yourdomain.com     ← must match the Form sender email
Subject: New enquiry from the website

Name: Maria Kovalenko
Phone: +380 67 123 45 67
Email: maria@example.com
Message: Interested in the spring collection

What happens when parsing comes up short:

SituationOutcome
No identifier usable by any selected channel (e.g. no phone for Personal WhatsApp, no email address for Gmail) in outreach modeCounted as Skipped on the status card — no lead is created and no message is sent
Parsing or sending fails outrightCounted as Failed, listed under Recent errors, and an alert appears on Notifications
Collect leads only modeThe lead is saved to Contacts with whatever was found — even just a name; free-text from the form is kept as a note on the contact

UTM tags in the form email are saved to the lead card automatically, in both modes, except when the integration is set up for site-script attribution and the email carries a valid attribution block; the block then supplies the attribution and this text parsing is skipped. In Collect leads only mode they are saved when the lead is created; in Collect and send instant outreach mode they are saved after the outreach is sent. They are read without the AI step:

  • From label lines such as UTM source: google (source, medium, campaign, content and term; case-insensitive, and UTM source, utm_source and utm-source all work, with : or = as the separator).
  • Otherwise from the utm_* parameters of any http(s) link in the email body, for example the "Sent from the page" URL that Tilda adds. A label line wins over a link parameter.

Values are trimmed, stripped of control characters and cut at 200 characters. Emails over 256 KB are ignored.

Where they land on the card:

  • In the account's existing custom lead field whose name matches ignoring case, spaces and punctuation (UTM Source matches utm_source; rs_utm_source or "Contact: rs_utm_source" do not match).
  • Otherwise in new text fields named utm_source, utm_medium, utm_campaign, utm_content and utm_term, shown under the lead's Additional info.

Only the first touch is kept: if the card already has a value in any of these UTM fields, nothing is written, and other custom fields are never overwritten. Only the email body is read, nothing is filled in for past leads, and a failure to save the UTM tags never fails or skips the lead.

What happens when the linked agent is off as the form email arrives:

SituationOutcome
Collect leads only mode, agent switched off by hand or outside its Work HoursThe lead is captured as usual — collect-only sends nothing, so the agent does not need to be on
Collect and send instant outreach mode with the agent off for any reason, or either mode when the agent was stopped for billing or moderation (balance ran out, subscription expired, plan agent limit reached, instructions flagged)Counted as Skipped on the status card — no lead is created and nothing is sent. An outreach alert appears on Notifications ending in "agent is off" (or "agent is off (<reason>)"). The email is not reprocessed later: turn the agent on (or top up) and re-submit the form

When a message does go out (or delivery fails after a chat was created), the full form email text is written into the chat as the first message, so the original submission stays readable next to the assistant's outreach.

Lead Forms (Meta Lead Gen) ​

Routes Facebook/Instagram Lead Ads form submissions to an assistant. Leads are always saved to Contacts. Enable a form to also run an agent.

Setup flow:

  1. Connect a Facebook account — click Connect Facebook (the account that owns your Lead Gen forms). Connected social accounts are billed at $10/mo each (on your Stripe invoice: Social overage: 1 extra connected account, prorated); accounts included with your plan are free.
  2. After the redirect, Choose a Facebook Page and confirm with Connect Page.
  3. Pick the Facebook account in the dropdown; its Lead forms list loads with a per-form lead count. Type in Search lead forms to filter the list by form name ("No lead forms match your search." when nothing does). Use Refresh to re-pull; new forms appear once they exist in Meta.
  4. Toggle Enable on each form you want an assistant to handle.

Per enabled form:

SettingNotes
Agent"Leads from this form are handled by the selected agent" — each form can go to a different assistant
ModeCapture only — "Save the lead to Contacts without sending any message." Capture and send outreach — "Save the lead and let the agent start an immediate follow-up."
Channels, message, delaysThe shared outreach settings above

Save changes confirms with "Lead form routing saved".

Page connected under more than one account

The same Facebook Page can be connected under several MyChatBot accounts. Each lead arrives through one of those connections, and the account that connection belongs to is where the lead goes unless another account claims it:

  • If that account has the form enabled in a Lead Forms automation that is not paused, it keeps the lead.
  • Otherwise the lead goes to another account connected to the Page that has the form enabled in a Lead Forms automation that is not paused. That account's connection to the Page must still be live: an account whose every connection to the Page was revoked or expired is passed over. When several accounts qualify, the one with the lowest account ID gets the lead.
  • If no account qualifies, the lead stays with the account it arrived for and is saved to its Contacts. No agent runs for it.

The account that gets the lead runs that form's mapping in its own mode. Capture only sends no message (at most the Telegram capture notification, when that is switched on). Capture and send outreach lets the agent message the lead.

A lead can also arrive once for each connection to the Page. Each copy is routed by the rules above and the first copy processed is kept. The others are skipped as duplicates, so the lead is saved once. When exactly one account qualifies, every copy goes to it, so that account gets the lead whatever the order. When several accounts qualify, or none does, the account that gets the lead depends on which copy is processed first.

Configure by agent

Everything after step 2 — listing forms, routing a form to an assistant, changing modes and channels — can also be done by an AI agent (or an external MCP client like Claude Code) through the Automations area of the sales-management MCP. Changes always come back as a preview first and apply only on an explicit confirm. See the Sales tools reference. Connecting the Facebook page itself stays here in the app — it's an OAuth step only you can do.

Meta Ads add-on

If the connected account lacks the Meta Ads add-on, the form list can't be shown: "This account doesn't have the Meta Ads add-on enabled, so lead forms can't be listed. Leads received via webhooks are still saved to Contacts."

The add-on is the Ads Manager capability on the connected social account — it's what lets MyChatBot list your Lead Gen forms from Meta. To enable it:

  1. Check your plan on Subscription: the Ads Manager comes with the Multipro and Corporate plans here, or with the UGC Scale plan and higher. There is no separate add-on fee — only the connected-account pricing above applies.
  2. In the content studio at ugc.mychatbot.app (same login), open the Ads Manager and connect the Meta ad account that owns your Lead Gen forms to the already-connected Facebook profile.
  3. Back on Automations, press Refresh — the Lead forms list loads with per-form lead counts.

You're not blocked on capture in the meantime: submissions keep landing in Contacts; you just can't enable forms for assistant routing yet.

The conversation Meta opens after a form ​

Right after a form is submitted, Meta often opens a Messenger or Instagram conversation with the person. Its first message is Meta's automatic text, such as "Hello! I filled out your form and would like to know more about your business.", followed by the form's answers. Meta sends no ad details with it.

When that first message carries the form's phone, and the form's lead was created in the same account within the last 15 minutes, the conversation is linked to that lead. The lead shows the form as its Source and the form's ad (Ad ID; a lead form gives no Ad Title), and no second lead without a source appears. When the conversation belongs to a lead you already had, that lead stays and takes the form's Source and ad, unless it has a Source or ad of its own.

When the phone is not in the first message and the agent saves it later, the conversation is matched by that phone. If the form's lead was created in the 15 minutes before the conversation's lead (a form submitted after the conversation started does not count) and Merge duplicate leads automatically is off, the two leads stay separate and are flagged as duplicates (a "Duplicate lead detected" note in the conversation), but the conversation's lead still gets the form's Source and ad, unless it has a Source or ad of its own. Use Merge leads to make them one; see Where the Source comes from.

Trigger Outreach ​

Webhook-driven messaging: "Send messages to customers when external systems trigger events." Create up to 20 named triggers, each with its own webhook URL — one per CRM event, order status, reminder type, and so on.

Per trigger:

SettingNotes
Trigger nameRequired; e.g. "Order Confirmation", "Appointment Reminder"
Webhook URLGenerated on first save ("Save the automation to generate webhook URL"); Copy puts it on the clipboard. Send a POST with JSON body { "phone_number": "+1234567890", "name": "John Doe", "context": "Extra info" } — or { "email": "john@example.com", "name": "John", "context": "Extra info" } when the trigger sends over email
Automation modeCapture only — "Receive webhook data and create a lead without sending any message" (with an optional default pipeline stage). Capture and send outreach — immediate assistant follow-up
Communication channelOne or more channels; each selected channel must be connected for that trigger to save
Message typeAgent instruction / Custom message (with {name}, {context}, {phone_number} and {email} placeholders, filled from the webhook payload) / Email Subject and Attachments — see shared settings. A configured email subject takes precedence, and its {name}, {context}, {phone_number} and {email} placeholders are filled from the payload the same way. In Agent instruction mode with an Email channel selected and the email subject left empty, the assistant writes a subject for each message. That subject line never appears in the message body on any channel
Skip chat history"The agent starts this outreach without loading the contact's prior conversation history"
Don't write if the lead was contacted recentlyWith a Contacted within window (hours or days, 1 hour to 365 days): "Counts any message with the lead in any channel, including earlier outreach. A lead sent by two triggers within the window only gets the first message. Nothing is generated for a skipped lead." The lead is still captured
If delivery failsCapture and send outreach mode only. A bordered card, collapsed by default, with the toggle Run alternative instruction if delivery fails and an instruction box (placeholder: "What should the assistant do if this message is not delivered? (e.g. create a deal, notify a manager)"). With the toggle on, the instruction is required; saving without it shows "Please enter an instruction for the delivery-failure case, or turn the toggle off." The assistant runs it in four cases: the send fails on every channel; no channel is connected for the lead (it runs only if the lead already has a chat, otherwise it is skipped); the delivery gate blocks the send; or the platform later reports the message undelivered (WhatsApp Business, SMS, Personal WhatsApp, E-Chat Telegram, E-Chat Viber, Viber by Number), which counts only within 24 hours of the send and, when both the stored send and the platform report carry a message id, only when the ids match. It runs at most once per send, uses the assistant's tools only and sends nothing to the client. Send-only is ignored for this pass, and it runs even in Custom message mode. A trigger_outreach_undeliverable activity is logged on the chat. The status callback values are unchanged
Status callbackOptional https:// URL: "For every lead this webhook receives, we POST the final result to your URL: whether the message was sent, failed or skipped, and why." The callback repeats the request_id from the webhook response, which is MyChatbot's own id. It also carries external_request_id: your own id from the POST body, read from external_request_id, otherwise from request_id (trimmed, otherwise unchanged). The key is always present and is null when the body carried neither, so a callback that arrives after your own HTTP timeout can still be matched. Each request is signed with an X-MyChatbot-Signature header (HMAC-SHA256 of the raw body, keyed by the token in your webhook URL) plus X-MyChatbot-Timestamp; use delivery_id to ignore repeats
Send-only (don't let the AI change the lead)Agent-instruction mode only. The assistant composes and sends but "cannot update the lead card, custom fields, status, labels, CRM, orders, or bookings — even if the instructions ask it to. Read-only lookups (order status, product info) still work."
Recipients (email only)Primary email only, All contact emails (also Cc's the addresses stored on the contact), or Custom field (Cc's the addresses in a field you name)
Attach files from the webhook payload (email only)On by default: "file URLs sent in the webhook payload (attachments, files, documents…) are delivered as email attachments"
Notify Telegram group about new leads (capture-only mode)Posts every captured lead, with all form answers, to this assistant's Flight Control group — capped at 30 notifications per hour per assistant, and once per lead per 24 hours. Needs a group under the assistant's Flight Control. Switching the trigger back to outreach mode clears this and the default stage
Preview (dry run)Paste a sample payload and Run preview: shows the mode, recipient, subject, composed message, attachments and which tools would be allowed or blocked — "Nothing is sent and no lead data is changed." The subject shown is the one a real send would use: the configured subject with its placeholders filled or, when none is set, the subject the assistant wrote for the sample payload. When the trigger sends email in agent mode and no subject comes out, the preview warns: "No custom subject set and the assistant wrote none for this payload — set a custom email subject."
Omit core instructionsUse only the trigger's instruction, ignore the assistant's core instructions
Delay & Throttling OptionsSend Delay, Interval Seconds, Timezone, Sending Window
Call result callbackAppears when the Calls channel is selected: "After each call, the agent POSTs a JSON result to your URL so you can update your CRM." Provide a Callback URL (must be https://) and Result fields — each field has a Name (JSON key) (snake_case), a Description of what the assistant should put there, and optional Allowed values. The callback needs both a URL and at least one field, and field names must be unique

The context value you POST is handed to the assistant, so your CRM can pass order numbers, appointment times, or anything else the message should reference.

Triggers can also be created and deleted by an AI agent or an MCP client like Claude Code — create_integration_trigger returns the new trigger's webhook URL. Treat that URL like a password: whoever has it can send leads in. update_integration_trigger edits a trigger's instruction, message, channels, name, or its "if delivery fails" instruction. See the Sales tools reference.

Webhook reference ​

Security. The URL is the credential: it contains a long random key unique to your automation setup plus a per-trigger id. There is no signature header or extra authentication — treat each webhook URL like a password; anyone holding it can create leads and message your clients. If a URL leaks, remove that trigger (Delete trigger), save, and create a new one — the old URL immediately stops working (404). Requests must be POST with a JSON body.

Responses. Every reply is JSON with a status (ok, error, or skipped for a paused automation) and a human-readable message. In Capture and send outreach mode the reply also carries a request_id, which the status callback repeats. A request_id you put in the POST body is not this id: the reply does not echo yours, and it comes back only in the callback as external_request_id:

HTTP code / messageWhenNotes
200 — "Outreach prepared, sending message" (or "…queued for scheduled delivery" with a Send Delay / Interval)Outreach acceptedDelivery happens after the response: 200 means accepted, not delivered. Check the Automation status card and the client's chat for the outcome
200 — "Lead captured successfully"Capture only mode saved the leadWorks even when the assistant is switched off
200 — "Lead captured; outreach skipped: …"The lead was saved but no message was composed: the chat is marked as spam, the trigger's instructions left nothing to send, the lead was contacted within the Don't write if the lead was contacted recently window, the outreach could only go out through the Telegram account channel and that channel is currently blocked for this recipient — the contact is known to be unreachable there, or the Telegram number is in a temporary cooldown ("Lead captured; outreach skipped: outreach not generated: …"), or — for the CRM-shaped payloads (KeyCRM lead and order status change, SalesDrive, HouseCallPro, Greenforest) in Capture and send outreach mode — "assistant is switched off"Nothing to fix for the first three — they are deliberate skips. For "outreach not generated" the client's chat history records "Outreach not generated: …". When the contact is unreachable, the owner also gets the Telegram alert if Outreach failure alerts is on (throttled: the same contact and reason alert at most once per 24 hours), and re-sending meets the same block, so fix the contact details or connect another channel first. A cooldown sends no alert and lifts on its own: re-send after it ends. "assistant is switched off" is reported to the status callback as failed: switch the assistant back on or top up the balance, then fire the trigger again for leads that should still be contacted. A skip counts as a handled event: a repeat of the same event within 30 minutes is answered "Duplicate event, already handled", so wait the 30 minutes out. On the plain JSON payload and SalesDrive a changed body also counts as a new event; KeyCRM and HouseCallPro are matched on their event fields (see dedup rules), so there only a new status change or a new event goes through sooner
200 — "Duplicate event, already handled"The same event already reached this trigger within the last 30 minutes and was handled — accepted, skipped with one of the answers above, or held back by a Telegram rate limit ("Lead captured; outreach deferred…" / "…could not be delivered (Telegram rate limit)"); for a KeyCRM trigger in Capture only mode, captured; for Greenforest send_message, sent through one of its channels. Applies to the plain JSON payload, SalesDrive and HouseCallPro in Capture and send outreach mode, to KeyCRM lead and order status changes in either mode, and to Greenforest send_message whatever the modeNo message is composed or sent, and the status callback gets nothing new. Usually a CRM redelivering an event because the first answer took longer than its timeout. See dedup rules
200 — "Automation is paused" (status: skipped)The automation is paused with the Connect agent switchNothing is captured or sent; resume the automation
200 — "No phone, email, or action provided, skipping outreach"The payload had no contactable identifierNothing is created — this is also why CRM "test webhook" pings succeed
400 — "Invalid request body" / "Assistant is not active"The body isn't valid JSON, or the attached assistant is switched off and the trigger is in Capture and send outreach mode with the plain JSON payload shown above. Capture only triggers still save the lead, and the CRM-shaped payloads (KeyCRM, SalesDrive, HouseCallPro, Greenforest) save it and answer 200 "Lead captured; outreach skipped: assistant is switched off" insteadFix the payload; re-enable the assistant
404 — "Invalid webhook URL" / "Trigger not found" / "No assistant configured for this automation"The key or trigger no longer exists (trigger deleted, URL mistyped), or no assistant is linked to the automationRe-copy the URL from the trigger's Webhook URL field, or attach the automation to an assistant. A failed assistant lookup answers 500 with the same "No assistant configured for this automation" message — that one is safe to re-send
422 — "Failed to prepare outreach: …"No channel can carry this outreach: "no channel configured for this trigger", "no connected channel found for any of […]" (the trigger's channels aren't connected, or the payload has no identifier they can use — for example a WhatsApp-only trigger receiving only an email), or "no existing chat with this client in …" (a bot channel can't start a conversation)Re-sending won't help: connect the channel, add it to the trigger, or send the identifier the channel needs
503 — "Duplicate event: an earlier delivery of this lead is still being processed, please retry"A concurrent POST for the same trigger and contact is already in flight. An overlapping delivery of the same event — on the plain JSON payload, KeyCRM, SalesDrive and Greenforest send_message — gets "Duplicate event: an earlier delivery of this event is still being processed, please retry" (HouseCallPro gets it as a 429, see below)Comes with a Retry-After: 60 header: re-send after that delay
500 — "Failed to capture lead" / "Failed to prepare outreach: …"The lead couldn't be saved, or the message couldn't be prepared: composing it failed, the sender or the chat couldn't be set up, a channel lookup failed ("Failed to prepare outreach: failed to resolve outreach channel: …"), or a database or cache errorTransient: safe to re-send after a pause. A failed delivery is not marked as handled, so the same body goes through again instead of being answered "Duplicate event, already handled" (see dedup rules)

A HouseCallPro payload is answered 200 in every other case, because HouseCallPro disables the webhook subscription on most other codes: an error is reported in the JSON body (status: error and the message from the table above) instead of in the HTTP code. The one exception is a redelivery of an event that an earlier delivery is still processing: it gets 429 Too Many Requests with Retry-After: 60 and "Duplicate event: an earlier delivery of this event is still being processed, please retry" — HouseCallPro retries a 429 without disabling the subscription.

Duplicates and idempotency.

  • Contacts are matched by phone number / email: re-POSTing the same phone_number never creates a second lead — the existing contact is updated and messages land in the same chat.
  • A delivery is claimed as one event before anything is composed or sent, and a handled event stays claimed for 30 minutes: the plain JSON payload, SalesDrive and HouseCallPro in Capture and send outreach mode, KeyCRM lead and order status changes in either mode, and Greenforest send_message whatever the trigger's mode. A repeat of the same event to the same trigger inside that window is answered 200 "Duplicate event, already handled" and sends nothing — this is what stops a CRM that redelivers after a slow answer from messaging the client twice. What counts as "the same event":
    • Plain JSON payload and Greenforest send_message: the same body. Key order and whitespace don't matter; any changed value (a different context, for example) makes it a new event.
    • SalesDrive: the same webhook event, order id and status, with the same body.
    • HouseCallPro: the same event, customer id and event_occurred_at (the same body when event_occurred_at is missing).
    • KeyCRM: the same lead or order, status and status change time.
  • The claim is per account and trigger: the same body sent to two different triggers sends twice.
  • Only a handled delivery is kept: accepted ("Outreach prepared…"), skipped ("Lead captured; outreach skipped: …"), held back by a Telegram rate limit ("Lead captured; outreach deferred until the Telegram rate-limit window closes", where the message is parked and retried on its own, or "Lead captured; outreach could not be delivered (Telegram rate limit)", where nothing was queued — a repeat inside the window is still answered as a duplicate), captured by a KeyCRM trigger in Capture only mode, or, for Greenforest send_message, sent. A delivery that failed (4xx/5xx, for example a 422 or 500 from prepare) releases its claim, so it can be re-sent at once.
  • While an earlier delivery of the same event is still being processed, an overlapping one gets 503 "Duplicate event" with a Retry-After header (429 on HouseCallPro) and is safe to re-send after that delay. Simultaneous POSTs for the same trigger and contact with different bodies are also held off with a 503 "Duplicate event" answer (on HouseCallPro, a 200 carrying that error in the body).
  • Capture only mode is not claimed on the plain JSON payload, SalesDrive and HouseCallPro: each POST saves the lead again, which is harmless because contacts are matched by phone/email. A KeyCRM status change is claimed in Capture only mode too, so its redelivery is answered "Duplicate event, already handled".
  • MyChatBot never replays an inbound webhook on its own: a request that returned an error is dropped unless your system re-sends it.

Payload parsing. Only phone_number (or email on email triggers) is needed for anything to happen; name, context, company_name, country_code and city are optional and land on the lead. phone_number and email must be top-level keys. Extra JSON fields are kept — they're saved onto the lead as custom fields and handed to the assistant alongside context (nested objects are flattened); this includes request_id and external_request_id, which the status callback also returns as external_request_id. If phone_number is empty, any extra field whose name contains "phone" and holds 7+ digits is used instead, and any value that looks like an email address can stand in for email. Phone numbers are normalized to international format before matching.

Lead Supervisor ​

A scheduled housekeeping automation: "Review recent chats and automatically assign missing funnel statuses or labels based on the current conversation context." No messages are sent to clients.

How it works (as shown on the page):

  1. Your assistant reviews chats active during the period at the specified time.
  2. For each chat, it takes the last intent and sets the specified attributes.
  3. Only empty fields are updated — existing statuses or labels are not changed. With Overwrite existing values enabled, all selected attributes are overwritten with the assistant's analysis instead.
SettingNotes
Attributes to updateStatus and/or Labels (at least one; the Labels option only appears once your account has labels). Statuses are set within the assistant's assigned pipeline
Overwrite existing valuesOff by default — the safe "fill gaps only" behavior
Activity cut-offPast N days (default 30, max 365) or Since a date with an exact date and time; "Current selection" previews the effective cut-off
Run time / Run timezoneWhen the queue is processed (defaults to the assistant's or your browser's timezone)
FrequencyDaily, Every 3 days, or Weekly

Once connected, a Current configuration box summarizes attributes, cut-off, run time, timezone, and frequency, and the status card counts chats processed. Pair it with Labels and statuses so follow-ups always have accurate targeting data.

Keyword Responder (Instagram + Facebook) ​

"Trigger dedicated replies for Instagram and Facebook comments when monitored posts receive specified keywords." Classic comment-to-DM: someone comments "PRICE" under a post, the automation answers publicly and/or slides into their DMs.

SettingNotes
Instagram account / Facebook PageWhich connected Instagram account or Facebook Page to monitor (the assistant must have an Instagram channel or a Facebook Page (Messenger) connected first)
Browse & add postsAdd up to 500 posts to monitoring (Reels are labeled). Posts load 100 at a time — Load more posts pulls older ones, and search finds posts by caption or ID. Refresh posts re-pulls the latest, with a 30-second cooldown. Previously selected posts that are not in the loaded list stay monitored
Trigger keywordsAdd each word or phrase that should fire the automation — matching is not case sensitive
Under comment replyA short public reply posted directly below the comment. "Leave blank to skip the quick public reply and only send the private message."
Dedicated agent instructionGuidance for the Private Reply that goes out via Instagram Direct or Messenger, on the platform the comment came from (Agent instruction), or switch to Custom message to send an exact DM instead
Settings per postBy default all selected posts share the same reply/message. Select a post to override individually — "Leave a field empty to use the global default." Overridden posts show a Custom badge. A card can hold an Instagram post and a Facebook post that share one reply

Comments on a monitored post belong to the automation: they skip the channel's own comment Reply mode, even when the comment has no keyword match, and the automation still runs when the channel's Ignore Comments setting is on (Instagram, Facebook).

The status card counts comments (metric: New comments queued). The Comment log lists "Every comment on a monitored post: what the automation did with it and whether its public reply is still visible on Instagram." — with the result (Processed, Skipped, Failed, Queued, Processing, plus a reason such as "no keyword match" or "a manager is handling this chat") and the public reply's state (Reply published, Reply hidden, Reply removed on Instagram). The log keeps the 100 newest comments. If the channel's access expires you'll see "Instagram channel token is missing or expired. Reconnect the channel to keep monitoring comments." (or the Facebook Page equivalent).

An AI agent or an MCP client like Claude Code can create and change the Keyword Responder too, with set_keyword_responder; list_social_posts lists the posts to pick from. See the Sales tools reference.

Telegram funnels ​

Step-by-step scenarios your Telegram bot runs on its own: a link from an ad brings people in, buttons capture their choice, reminders count down to your event, an offer goes out afterwards, and the assistant takes over when someone has a question. Exit rules stop the selling messages the moment a lead reaches a status such as "Paid" — including through a Trigger Outreach set_status webhook. Funnels are built on a visual canvas with a rehearsal mode and a live People view; the full guide is on the Telegram funnels page.

Use cases ​

  • Website form → instant WhatsApp reply — Lead Form Instant Outreach on the mailbox that receives form notifications; leads get a personal message within minutes of submitting.
  • Facebook Lead Ads qualification — Lead Forms saves every submission to Contacts and lets a dedicated assistant qualify each form's leads over the right channel.
  • Order/appointment notifications from your CRM — Trigger Outreach with one named trigger per event; your CRM POSTs to the webhook with the client's number and context.
  • AI phone follow-up with CRM write-back — a Trigger Outreach trigger on the Calls channel plus a Call result callback that returns structured fields (lead temperature, outcome) to your system after every call.
  • Pipeline hygiene — Lead Supervisor nightly, so untagged chats get statuses/labels and your follow-up sequences actually match someone.
  • Comment-to-DM promos — Keyword Responder on a giveaway post with the keyword "WIN": public thank-you under the comment, details by DM.
  • Launch countdown in Telegram — a Telegram funnel from the Countdown template: an ad link registers people with one tap, reminders go out a day, an hour and at the start of the event, the offer follows, and a payment webhook takes buyers out of the sequence.

Test it ​

  1. Lead Form Instant Outreach — submit your own website form (or send yourself an email from the configured sender address to the connected mailbox). Watch the Automation status card: the counter should move from New leads queued to Processed, and the first message should arrive on the selected channel. Failures land in Recent errors with the channel and reason.
  2. Trigger Outreach — copy the Webhook URL and POST the sample JSON from the helper (e.g. with your own phone number as phone_number and a test note as context). Expect a 200 with "Outreach prepared…" in the JSON reply (see the webhook reference — 200 means accepted, delivery follows). In capture-only mode, check the lead appears in your pipeline; in outreach mode, check you receive the message — including after the configured Send Delay and inside the Sending Window.
  3. Lead Forms — use Meta's Lead Ads testing tool to submit a test lead to an enabled form, then confirm it shows in Contacts and (in outreach mode) that the assistant's first message goes out. If leads from a form are missing from Contacts, check whether the Page is also connected under another of your accounts (Page connected under more than one account).
  4. Lead Supervisor — set the run time a few minutes ahead, keep the cut-off wide (e.g. past 30 days), and after the run verify a previously untagged chat received a status/label. The card should report chats processed and state Finished.
  5. Keyword Responder — comment one of your trigger keywords on a monitored post from another account; expect the under-comment reply and/or the DM.
  6. Telegram funnels — use the Rehearsal tab first, then open the funnel's link from your own Telegram account: expect the first message with its buttons, a timeline entry in the chat, and the People tab listing you at the current step.

The status card only refreshes while the page is open (about once a minute) — reopen Automations and select the automation to see the latest run.

See also ​

  • Telegram funnels — button-driven scenarios on a Telegram bot, with an event countdown and exit rules.
  • Follow-ups — status/label-targeted sequences for existing conversations, and Immediate outreach broadcasts.
  • Labels and statuses — the pipeline data Lead Supervisor maintains and follow-ups target.
  • Email channel — connect the mailbox Lead Form Instant Outreach watches.
  • Instagram channel — prerequisite for the Keyword Responder on Instagram.
  • WhatsApp and Telegram account — the usual first-touch outreach channels.
  • Webhooks channel — other ways to wire external systems into MyChatBot.