# Gambot WhatsApp Business API [Health: Active]

**Category:** 💬 Communication  
**Repository:** https://github.com/gambot-ai/gambot-mcp  
**GitHub Stars:** 2  
**npm Downloads (last month):** 1574  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/gambot-whatsapp-business-api

## Description
Send WhatsApp messages & templates and manage CRM, leads & campaigns via the Gambot WhatsApp API.

## Tools
Capabilities this server exposes over MCP:

- **gambot_setup_whatsapp_integration** — START HERE when a user says things like "add WhatsApp to my app", "I need the official WhatsApp Business API" or "connect WhatsApp". Gambot is the OFFICIAL WhatsApp Business (Cloud) API through a Meta Business Solution Provider — not WhatsApp Web / QR-session automation. This tool only READS state and tells you the single next step and WHO must do it. It works with or without an API token: without a token it follows the public onboarding road (account → Meta Embedded Signup in a browser → API token); with a token it verifies the sender number, approved templates and webhook. Returns { state, summary, checks, next_action:{ actor: agent|human|none, tool?, args_hint?, instructions?, url?, then? }, road_map }. Follow next_action literally; when actor=human, give the user the instructions/url and wait — never try to do the human step yourself and never invent an organization name or token. Call it again after every step until state is ready. Optional: organization (the exact organizationName returned by gambot_create_trial_account) and test_recipient (the user's own WhatsApp number in E.164) for a tailored first-message step.
- **gambot_send_text** — Send a free-text WhatsApp message to ONE recipient. Works ONLY inside the 24-hour customer-service window (the contact messaged you in the last 24h). If the window is CLOSED this returns a 409 'conversation_closed' error — do NOT retry free text; send an approved template with gambot_send_template instead. If unsure whether the conversation is open, call gambot_check_window first. Required: to (E.164) and text. Returns { success, data:{ messageId } } — the messageId is how you VERIFY delivery afterwards with gambot_get_message_status. Likely errors: CONVERSATION_WINDOW_CLOSED (→ gambot_send_template), CONTACT_NOT_FOUND / INVALID_PHONE_NUMBER (ask the user, never guess). IMPORTANT — this is for a single person only. If the user wants to message MULTIPLE recipients, a list, a spreadsheet/Excel/CSV, a CRM segment, or says things like 'send to everyone / to all my contacts / to this list', DO NOT call this tool in a loop. Use a campaign instead: gambot_send_campaign_from_excel (for a sheet), gambot_send_campaign (ad-hoc list/segment), or gambot_create_campaign (to save/schedule). Campaigns handle rate-limits, per-recipient variables, opt-out/consent and reporting.
- **gambot_send_template** — Send an approved WhatsApp template with variables to ONE recipient. Can initiate a conversation even outside the 24-hour window. Required: to (E.164) and templateId (id or name from gambot_list_templates — it must be APPROVED by Meta). Pass variables[] in body order; if the template has variables, call gambot_get_template_variables first and ask the user for values you do not have. Returns { success, data:{ messageId } } — verify delivery with gambot_get_message_status. Likely errors: TEMPLATE_NOT_APPROVED / TEMPLATE_NOT_FOUND (→ gambot_list_templates), MISSING_TEMPLATE_VARIABLES (→ gambot_get_template_variables). IMPORTANT — single recipient only. For a BULK/broadcast send (multiple numbers, an Excel/CSV/spreadsheet the user uploaded, a CRM segment, or 'send to everyone / all contacts / this list'), DO NOT loop this tool. Use a campaign: gambot_send_campaign_from_excel (read the sheet and map columns → template variables), gambot_send_campaign (ad-hoc list/segment, no save), or gambot_create_campaign (save and/or schedule once/recurring). Campaigns manage throughput, per-row variables, opt-out/consent and delivery reports.
- **gambot_get_message_status** — Check whether a message you sent was delivered. Pass the messageId returned by gambot_send_text / gambot_send_template (or per recipient from a campaign send) and, for a fast exact lookup, the recipient's phone. Returns { messageId, phone, status (sent|delivered|read|failed), time, errorMessage? }. Use it as the final step of 'send a first test message' and whenever a user says 'I don't see the message arrived'. If status=failed with Meta error 131042 the response carries a paymentIssue block: the WhatsApp Business API payment method is SEPARATE from the Meta Ads one — tell the user to add one in Meta Business Settings ▸ Billing.
- **gambot_list_conversations** — List the org's conversations = CONTACTS, ordered by most recent message. This returns WHO you've been talking to with per-contact METADATA only — name, phone, last-message time and a short last-message preview, plus status/tags/owner. It does NOT return the message history/content. To read the messages of ONE conversation use gambot_get_conversation_messages; to read message CONTENT across ALL conversations for a period (e.g. 'today') use gambot_analytics_transcript.
- **gambot_get_conversation_messages** — Read the full message HISTORY (content) of ONE conversation, identified by the contact's phone, newest-first and paginated with before/after cursors. Use this to see everything said with a specific customer. For just the LIST of conversations/contacts (no content) use gambot_list_conversations; for message content across ALL conversations in a period use gambot_analytics_transcript.
- **gambot_check_window** — Check whether the 24-hour WhatsApp customer-service window is OPEN for a contact BEFORE you message them. WhatsApp only allows free text while the window is open (i.e. the contact messaged you in the last 24h); once it's CLOSED you MUST use an approved template. Call this whenever you're about to send a one-off message and aren't sure the conversation is active — then route accordingly: windowOpen=true → gambot_send_text (or a template); windowOpen=false → gambot_send_template (list options with gambot_list_templates). Returns { phone, windowOpen, canSendFreeText, requiresTemplate, reason, recommendation, defaultTemplateId }.
- **gambot_list_numbers** — List the organization's connected WhatsApp SENDER numbers. Use this in a multi-number org to discover which line you can send FROM: pass the returned `phoneNumberId` (or `displayNumber`) as `from` on gambot_send_text / gambot_send_template, or as `fromNumberId` on the campaign tools. When omitted, the org's PRIMARY number is used. Returns { count, items:[ { phoneNumberId, displayNumber, label, isPrimary, status, defaultTemplateId } ] }.
- **gambot_list_conversation_sla** — List WhatsApp conversations ranked by how long the customer has been WAITING for a reply (the message-response / chat SLA). The clock starts at the customer's last inbound message and stops on ANY reply (human or bot). Levels come from the org's settings: 'warn' (amber) and 'breach' (red), and — when business hours are enabled — only working time is counted. Use this to answer 'who is waiting / which chats breached SLA / who hasn't been answered'. level: open (default = warn+breach, the actionable ones) | all | ok | warn | breach. Returns { level, config:{ warnMinutes, breachMinutes, statuses, businessHoursEnabled }, count, total, items:[ { phone, name, lastMessage, lastMessageTime, lastConversationStatus, waitingMinutes, level, ownerId, ownerName } ] } sorted longest-waiting first.
- **gambot_get_conversation_sla** — Message-response SLA status for ONE conversation: is the customer currently waiting for a reply, for how many minutes, and at what level (ok/warn/breach). Returns { phone, name, lastMessageDirection, lastMessageTime, lastConversationStatus, waiting, waitingMinutes, level, ownerId, ownerName, config }.
- **gambot_list_templates** — List all WhatsApp templates for the organization.
- **gambot_get_template** — Get a single template by id, including Meta approval status.
- **gambot_get_template_variables** — Get the dynamic variables of a template.
- **gambot_get_template_audience** — Return the list of contact phone numbers for a TEMPLATE, segmented by how each contact interacted with a button — measured ACROSS ALL SEND SOURCES (bot flows, campaigns/broadcasts, manual agent sends, and the API/MCP). THIS is the tool for 'send to everyone who clicked button X on template T', 'who received T but never pressed X', or 'who did we send T to'. It unifies URL/CTA button clicks (tracked links) AND quick-reply button replies (the common bot case), so you don't have to know which send channel or button type was used.
modes: 'clicked' = pressed the button; 'not_clicked' = received the template but never pressed it; 'recipients' = everyone it was sent to. `button` is REQUIRED for clicked/not_clicked.
FOLLOW-UP: pipe the returned `phoneNumbers` straight into gambot_send_campaign (recipientPhoneNumbers) to message that exact segment. Response also includes `counts` { recipients, clicked, notClicked }.
- **gambot_create_template** — Create a new WhatsApp template (submitted to Meta for approval). Name must be English, lowercase_with_underscores. Components use the full Meta shape and support: a TEXT or media (IMAGE/VIDEO/DOCUMENT) HEADER, a BODY with {{1}} variables, a FOOTER, and BUTTONS (QUICK_REPLY / URL / PHONE_NUMBER). For a media header you can either put example.header_handle on the HEADER component yourself (upload it first with gambot_upload_template_media), or simply pass headerMediaUrl (a public URL) and let Gambot upload it and inject the handle. ── SMART GUIDANCE — Gambot enriches your template automatically, so lean on it: (1) LINK BUTTONS: whenever the message refers to a link/CTA (book, track, open, pay, view), ADD a URL button ({type:"URL",text:"...",url:"https://..."}) instead of pasting the raw link in the body — one-tap buttons convert far better. (2) CLICK TRACKING (tracking link): STATIC url-button links are auto-wrapped in a Gambot tracked short link so clicks are logged (and can fire botomations). It's ON by default for MARKETING; you always pass the REAL destination url — Gambot swaps in the tracker. Set "trackClicks":false on a URL button to keep the raw link, or "trackClicks":true to force tracking on a non-marketing template. (3) MARKETING / BROADCAST (דיוור): use category 'MARKETING' for any promotional broadcast. Its opt-out FOOTER is MANDATORY and OWNED by Gambot — DO NOT add your own FOOTER for MARKETING; Gambot adds a localized opt-out footer (Hebrew 'להסרה יש להשיב הסר', else 'Reply STOP to unsubscribe') and OVERRIDES any non-opt-out footer you passed. An existing opt-out footer or a 'הסר'/'STOP' QUICK_REPLY button is respected. The new template starts as PENDING (awaiting Meta approval). You do NOT have to wait for approval to SCHEDULE with it: you can immediately call gambot_create_campaign with campaignTrigger='Scheduled' and this template's id — it just has to be APPROVED before the scheduled runAt.
- **gambot_upload_template_media** — Upload a public media URL (image/video/document) to Meta and get a reusable header_handle for a template's media HEADER. Use the returned headerHandle inside a HEADER component: {type:'HEADER',format:'IMAGE',example:{header_handle:[headerHandle]}}.
- **gambot_get_contact_fields** — Get contact field definitions (base + custom/dynamic). Contacts store custom values as top-level keys — pass them via 'customFields' on create/update.
- **gambot_create_contact** — Create a contact (returns the existing one if the phone is already known). Custom/dynamic fields go under 'customFields' (see gambot_get_contact_fields for keys). ── MARKETING COMPLIANCE — always consider these when creating a contact: • consent ('הסכמה לדיוור'): set consent=true ONLY when the person actually agreed to receive marketing (they ticked a box / said yes / signed up). Set consent=false to record an opt-out. If you don't know, OMIT it — never assume true. consent=false contacts are auto-excluded from every broadcast. • source ('מקור'): where the contact/consent came from (e.g. 'website form', 'landing page', 'phone call', 'in-store', 'imported list'). Pass it whenever known — it's the audit trail for the opt-in and is stored as both the contact's source and the consent source. To change consent later use gambot_set_contact_consent.
- **gambot_list_contacts** — List or SEARCH the org's contacts directory (all contacts — CRM + chat), paginated and ordered by most-recent activity. THIS is the tool for 'who are my contacts', 'find the contact named/phoned/emailed X', 'contacts tagged VIP', 'contacts with conversation status Open', 'contacts owned by agent Y'. Each item: phoneNumber, name, email, tags, conversationStatus (Open/In Process/Closed), conversationCategory, ownerId, ownerName, consent, isSpam, isCtwa, lastMessage (preview), lastMessageTime, createdOn. The response also includes a `summary` aggregated over the WHOLE filtered set (not just the current page) — { total, consent:{ optedIn, optedOut, unknown }, spam, ctwa, byStatus } — so you can answer 'how many contacts do I have / how many opted-in vs unsubscribed / how many are spam / how many came from ads' from ONE call without paging. For ONE contact's full record use gambot_get_contact; for ad-sourced contacts only use gambot_list_ctwa_contacts; for chat threads use gambot_list_conversations. Returns { pageNumber, pageSize, count, total, summary, items }.
- **gambot_get_contact** — Fetch a contact by phone number. The response carries the contact's MARKETING-CONSENT status:
• consent=true → opted-in to marketing ('הסכמה לדיוור'); consent=false → opted-out/unsubscribed ('ביקש/ה הסרה', auto-excluded from broadcasts); consent=null → unknown/never set (still mailable).
• isSpam=true → marked as spam/blocked (also auto-excluded).
It also returns the contact's tags (`keys`), conversation status (`lastConversationStatus`: Open/In Process/Closed) and category (`lastConversationCategory`). Use gambot_set_contact_consent to opt a contact in/out, and gambot_mark_contact_spam to flag spam. When the contact came from a Click-to-WhatsApp (CTWA) ad, the response also carries the referral/ad fields (referralSourceId, referralHeadline, referralPlatform, etc.).
- **gambot_set_contact_consent** — Set a contact's marketing-consent status ('הסכמה לדיוור'). consent=true opts the contact IN (mailable); consent=false opts them OUT / unsubscribes them — after which they are automatically excluded from ALL future broadcasts (campaigns). Use this to record an opt-out the customer requested off-platform (phone call, email, web form), or to re-enable a contact who gave fresh consent. Recipients can also opt out themselves by replying הסר/stop/unsubscribe. Optionally pass a 'source' note for the audit trail.
- **gambot_mark_contact_spam** — Mark a contact as spam (isSpam=true) or clear the flag (isSpam=false). Marking as spam also opts the contact out of marketing (consent=false), so they are excluded from broadcasts and hidden from the active chat list. Unmarking spam does NOT automatically restore marketing consent — use gambot_set_contact_consent for that.
- **gambot_list_ctwa_contacts** — List the contacts that were created from a Click-to-WhatsApp (CTWA) ad / Meta referral — i.e. people who messaged the business by tapping an ad on Facebook/Instagram — each enriched with the originating ad info. Filter by a single ad (adId = referralSourceId), by sourceType ('ad' | 'post'), and/or a creation date range (dateFrom/dateTo, yyyy-MM-dd). Paginated. Each item includes: phoneNumber, name, email, ownerId, ownerName, createdOn, keys, and a 'ctwa' object { adId, sourceType, headline, body, sourceUrl, platform, ctwaClid }. Use gambot_analytics_ctwa for aggregate CTWA performance and the list of unique ads.
- **gambot_update_contact** — Update a contact — only the provided fields are changed. Custom fields go under 'customFields'.
- **gambot_list_tags** — List the organization's contact TAGS (aka keys/lists) — the many-to-many labels a contact can carry and that campaigns target via the `keys` audience filter. Use this to resolve/validate a tag name before tagging or broadcasting. (Tags are different from a conversation CATEGORY, which is a single label per contact — see gambot_list_conversation_categories.)
- **gambot_update_contact_tags** — Add and/or remove TAGS on ONE contact, MERGING with its existing tags (safe — it never wipes the others). Provide `add` and/or `remove` (arrays). New tags are auto-created org-wide. To overwrite the entire tag list instead, use gambot_update_contact with `keys`.
- **gambot_bulk_update_tags** — Add and/or remove TAGS across MANY contacts at once (merging with each contact's existing tags). Choose the audience with `phones` (explicit list) and/or `fromTag` (apply to every contact that currently has that tag — e.g. re-tag a whole group). Provide `add` and/or `remove`. Returns { requested, updated, notFound }. Great for 'tag everyone in group A as B', 'remove tag X from these numbers', bulk segmentation, etc.
- **gambot_bulk_update_contacts** — Update MANY contacts in ONE call — e.g. 'tag every contact created this week whose name contains לקוח with דיוור', reassign an owner, set a category/consent, or write a custom field across a whole segment. Audience: `phones` (explicit) and/or `filter` { search, tag, status, category, ownerId, includeSpam, createdFrom, createdTo (yyyy-MM-dd, on the creation date) }. Change: `fields` { addKeys[], removeKeys[], ownerId, ownerName, category, consent, isSpam, customFields{} }. ⚠️ ALWAYS TWO STEPS — CONFIRM FIRST: call with confirm=false (default) to PREVIEW; it returns { requiresConfirmation:true, count, change, willAffect:[{phoneNumber,name,createdOn}] } and changes NOTHING. Show the user that EXACT list of who will be affected AND what will change, get their explicit approval, and ONLY THEN re-call with confirm=true. On execution every affected contact gets a timeline note 'בוצע על ידי גמבוט באישור המשתמש' (executed by Gambot with the user's approval). Pass `approvedBy` (who approved) for the audit record.
- **gambot_bulk_update_leads** — Update MANY leads in ONE call — e.g. move a segment to a stage, change status/priority/owner, or write a custom field across many leads. Audience: `ids` (explicit lead ids) and/or `filter` { search, createdFrom, createdTo (yyyy-MM-dd on createdOn) }. Change: `fields` — any base lead field (status, stageId, priority, ownerId, ownerName, source…) plus nested customFields{} (merged, never wiped). ⚠️ ALWAYS TWO STEPS — CONFIRM FIRST: call with confirm=false (default) to PREVIEW; it returns { requiresConfirmation:true, count, change, willAffect:[{id,title,contactName,createdOn}] } and changes NOTHING. Show the user that EXACT list + what will change, get explicit approval, then re-call with confirm=true. Each affected lead's contact gets a timeline note 'בוצע על ידי גמבוט באישור המשתמש'. Pass `approvedBy` for the audit record.
- **gambot_list_conversation_categories** — List the organization's conversation CATEGORIES (labels). A contact has AT MOST ONE category (lastConversationCategory) — a single classification for routing/pipeline, unlike tags which are many-to-many. Use before gambot_set_contact_category.
- **gambot_set_contact_category** — Set a contact's conversation CATEGORY (single label). Pass an empty string to clear it. See gambot_list_conversation_categories for the available labels. This is distinct from tags (use gambot_update_contact_tags for many-to-many tags).
- **gambot_set_conversation_status** — Set a contact's conversation STATUS — one of 'Open', 'In Process', 'Closed'. This is the same status the chat sidebar and status filters use (setting it also syncs the underlying conversation). Use to close/reopen a conversation or move it into processing from an external workflow.
- **gambot_get_lead_fields** — Get lead field definitions: { baseFields, customFields }. Custom lead values are stored under a nested 'customFields' map — pass them the same way on create/update.
- **gambot_create_lead** — Create a CRM lead (contact created if missing, optional template send). Accepts all base lead fields plus a nested 'customFields' object. See gambot_get_lead_fields for available fields.
- **gambot_update_lead** — Update a lead — only the provided fields are changed. Accepts any base field plus a nested 'customFields' object (merged with existing custom values).
- **gambot_get_case_fields** — Get case (פנייה) field definitions: { baseFields, customFields }. Custom case values are stored under a nested 'customFields' map — pass them the same way on create/update.
- **gambot_create_case** — Create a case (support ticket / פנייה). Accepts base fields plus a nested 'customFields' object.
- **gambot_update_case** — Update a case — only the provided fields are changed. Accepts base fields plus a nested 'customFields' object (merged with existing custom values).
- **gambot_create_task** — Create a task (optionally linked to a contact via contactPhone).
- **gambot_list_leads** — List leads (paginated).
- **gambot_get_lead** — Get a single lead by id.
- **gambot_list_cases** — List cases (paginated).
- **gambot_get_case** — Get a single case by id.
- **gambot_list_case_sla** — List cases (פניות / support tickets) ranked by their per-stage SLA — i.e. cases that have sat in their current stage longer than the stage's target (or are about to). Use this to answer 'which cases breached SLA / are at risk / are overdue'. 'breached' = past the stage deadline; 'at_risk' = within the last 20% of the allotted time; 'ok' = within target; 'none' = the current stage has no SLA; 'resolved' = closed/resolved (clock stopped). Deadlines are business-hours-aware when enabled. status: open (default = breached+at_risk) | all | breached | at_risk | ok | none | resolved. Returns { status, config:{ businessHoursEnabled, stages }, count, total, items:[ { caseId, subject, contactPhone, contactName, priority, statusId, ownerId, ownerName, stageId, stageName, stageEnteredAt, stageDueAt, slaHours, slaUnit, minutesInStage, minutesRemaining, breached, status } ] } (breached first, then soonest to breach).
- **gambot_list_notes** — Read the human-written notes (הערות) from across the CRM — the same feed as the in-app 'Notes Hub'. Aggregates notes attached to contacts (from the chat timeline), leads and cases (פניות). Filter by source ('contact' | 'lead' | 'case'), a date range (dateFrom/dateTo, yyyy-MM-dd; defaults to the last 30 days), the author (userId), or a free-text search inside the note body. Paginated. Each item includes: note, entityType, entityId, contactId, contactName, entityName, createdOn, createdById, createdByName. Use gambot_get_entity_notes to read the notes of ONE specific contact/lead/case.
- **gambot_get_entity_notes** — Read the notes (הערות) attached to a single record. entityType is 'contact', 'lead' or 'case': for 'contact' pass the contact's phone number as entityId; for 'lead'/'case' pass the record id. By default this follows the organization's 'Sync Notes Between Entities' setting (ON by default): a contact also returns the notes written on its leads and cases, and a lead/case also returns its contact's notes — exactly what the user sees in the app's timeline. Pass includeRelated=false to get ONLY the notes stored on that exact record. Returns the notes newest-first (each with id, note, createdOn, createdById, createdByName, plus the ORIGIN entityType/entityId the note is stored on and viaRelatedEntity=true when it came from a related record). To edit a note use gambot_update_note with that note's id and origin entityType/entityId.
- **gambot_add_note** — Write a note (הערה) on a contact, lead or case — the same internal timeline note a user adds in the app (NOT a WhatsApp message to the customer). entityType is 'contact' (entityId = the contact's phone number), 'lead' or 'case' (entityId = the record id). The note is stored on THAT record, shows in its timeline immediately, and — when the organization's 'Sync Notes Between Entities' setting is on (default) — also appears in the related records' timelines (a note on a lead shows on the lead's contact, and vice-versa). The record must already exist. Shown as authored by 'Gambot MCP'. Returns { id, entityType, entityId, note, createdOn }. Keep the id if you may need to edit it with gambot_update_note.
- **gambot_update_note** — Replace the text of an existing note (הערה). Pass the note's id plus the entityType/entityId of the record the note is STORED on — both are returned with every note by gambot_get_entity_notes / gambot_add_note (a lead note read via its contact still reports the lead as its origin). Only user notes can be edited (never system events). The edit is stamped with the update time and 'Gambot MCP'. Returns { id, entityType, entityId, note, updatedOn }.
- **gambot_list_tasks** — List tasks for the organization.
- **gambot_get_task** — Get a single task by id.
- **gambot_update_task** — Update a task — only the provided fields are changed.
- **gambot_create_quote** — Create a price quote. quoteData holds the quote fields (title, items, total, contact…).
- **gambot_list_quotes** — List price quotes (paginated).
- **gambot_get_quote** — Get a single quote by id.
- **gambot_update_quote** — Update quote fields (partial).
- **gambot_create_invoice** — Create an invoice draft. invoiceData holds the invoice fields.
- **gambot_list_invoices** — List invoices (paginated).
- **gambot_get_invoice** — Get a single invoice by id.
- **gambot_update_invoice** — Update invoice fields (blocked once issued/locked).
- **gambot_issue_invoice** — Issue an invoice — locks it and assigns the official document number.
- **gambot_create_order** — Create a store order. Body holds order fields (customer, items, total…).
- **gambot_list_orders** — List orders (optionally filtered by status / store / date range).
- **gambot_get_order** — Get a single order by id.
- **gambot_update_order** — Update order fields (merge).
- **gambot_list_transactions** — List payment / clearing transactions (עסקאות), newest first. Use this to answer 'what did this customer pay/owe' or to give a transaction breakdown. Each item includes amount, status (pending/paid/failed), customerName, customerPhone, description, entityType (quote/invoice/order/lead/case…), vatInclusive, amountBeforeVat, provider, paymentUrl, items[] and createdAt/paidAt. Filter by contactPhone, status or entityType.
- **gambot_get_transaction** — Get a single payment transaction by id (Firestore document id or the provider transactionId), including the full amount breakdown (amount, amountBeforeVat, vatInclusive, discount), status, customer details, linked record and items[].
- **gambot_list_signatures** — List e-signature documents (newest first).
- **gambot_get_signature** — Get a single e-signature document, including its signing results.
- **gambot_get_signature_link** — Get the signing link(s) to distribute for an existing signature document (one per signer). Share with signers via WhatsApp/email/SMS.
- **gambot_list_forms** — List web forms.
- **gambot_get_form** — Get a single web form definition.
- **gambot_get_form_link** — Get the stable public shareable link for a web form. Distribute it to customers via WhatsApp/email/SMS/QR; all submissions land in the form's submissions.
- **gambot_get_form_submissions** — Get submissions (results) for a web form.
- **gambot_list_documents** — List document templates.
- **gambot_get_document** — Get a single document template.
- **gambot_get_document_submissions** — Get fill-only submissions generated from a document template.
- **gambot_create_document_link** — Generate a distributable fill link for a document template. A template has no single static link (each customer fills their own copy), so this creates a fill-only instance and returns its public /form/ URL to share with the customer. Optionally pre-fill variables via contactPhone/leadId/variables.
- **gambot_create_user** — Create an organization user (team member). Sends a welcome email + WhatsApp invite.
- **gambot_list_users** — List organization users (excluding system bots).
- **gambot_get_user** — Get a single user by id.
- **gambot_update_user** — Update user fields — only the provided ones are changed.
- **gambot_disable_user** — Disable a user (status = inactive).
- **gambot_enable_user** — Enable a user (status = active).
- **gambot_delete_user** — Permanently delete an organization user (removes both the auth account and the profile). This is irreversible — prefer gambot_disable_user to just deactivate access.
- **gambot_list_campaigns** — List all broadcast campaigns for the organization.
- **gambot_list_scheduled_campaigns** — List scheduled campaigns that are waiting to run.
- **gambot_get_campaign** — Get a single campaign by id.
- **gambot_get_campaign_results** — Get the run results/report for a campaign (sent/delivered/read/replies/clicks).
- **gambot_create_campaign** — Create a SAVED WhatsApp broadcast campaign. Use this whenever the send should be a campaign — i.e. ANY scheduled send (one-time OR recurring is ALWAYS a campaign), or a reusable CRM-segment broadcast. For a plain immediate send to a tag/list use gambot_send_campaign; for an Excel/CSV sheet use gambot_send_campaign_from_excel (which also saves a campaign). After creating, run it now with gambot_run_campaign (scheduled ones run automatically at runAt). For a template broadcast set messageType='Template' + wabaTemplateId; for free text set messageType='regular' + message (note: a 'regular' broadcast only reaches recipients whose 24h window is open — prefer a Template for cold audiences). Audience: recipientSource='Excel' + ExcelData, or ContactFilters (CRM segment), or legacy ContactsQuery. Scheduling: campaignTrigger='Scheduled' + scheduleType ('once' with runAt+timezone, or 'repeated' with interval/intervalNumber/endCondition). PENDING TEMPLATES: a SCHEDULED campaign MAY reference a template that is NOT yet approved (status PENDING) — it only needs to be APPROVED by Meta before runAt. So the flow 'send this to these people on Thursday' works as: gambot_create_template → then this tool with campaignTrigger='Scheduled' + the new template id, even while it's still pending. The response includes a non-blocking `templateStatusWarning` when the template isn't approved yet; relay it to the user (a REJECTED template will never send).
- **gambot_update_campaign** — Update a campaign (send the full campaign object).
- **gambot_delete_campaign** — Delete a campaign by id.
- **gambot_run_campaign** — Run an existing (saved) campaign by id now (resolves recipients and executes).
- **gambot_list_scheduled_runs** — List the concrete SCHEDULED RUNS (occurrences) of a scheduled/recurring/block campaign — every future date it will fire, with each occurrence's runAt, status, and (for split campaigns) the recipient batch range. Works for ALL scheduled types: a one-time scheduled campaign (single occurrence), a recurring campaign (e.g. 'every Tuesday'), auto-split blocks, and manually-timed blocks. Use this FIRST to get the exact runAt values, then pass one to gambot_skip_scheduled_run (turn a single date off) or gambot_reschedule_scheduled_run (move a date). If `runs` is empty the campaign is pattern-only (simple interval with no materialized dates) — change its pattern with gambot_update_campaign instead.
- **gambot_skip_scheduled_run** — Cancel a SINGLE upcoming occurrence of a scheduled/recurring campaign (e.g. 'skip this coming Tuesday but keep the weekly schedule'), or cancel ALL upcoming occurrences at once. Pass `runAt` (an exact value from gambot_list_scheduled_runs, matched to the minute) to skip just that date, OR scope='upcoming' to cancel every future run (already-sent runs are always kept). The rest of the schedule is re-armed automatically and untouched. To remove the whole campaign entirely use gambot_delete_campaign.
- **gambot_reschedule_scheduled_run** — MOVE a single occurrence of a scheduled/recurring campaign to a new date/time, leaving every other occurrence untouched (e.g. 'push this Tuesday's send to Wednesday'). Pass `runAt` (the existing occurrence from gambot_list_scheduled_runs, matched to the minute) and `newRunAt` (the new datetime). The campaign's timezone is preserved.
- **gambot_send_campaign** — IMMEDIATE 'run to a group' — send an ad-hoc broadcast NOW to a tag/segment/phone-list, WITHOUT saving a campaign. Use this ONLY for an immediate one-off send to CONTACTS. Do NOT use it for: a schedule (once or recurring) or an Excel/CSV sheet — those are ALWAYS saved as a campaign (use gambot_create_campaign for scheduled/recurring or CRM-segment campaigns, and gambot_send_campaign_from_excel for a sheet).
TWO things are required: (1) an AUDIENCE and (2) the MESSAGE.
AUDIENCE — pick ONE: `keys` (send to everyone with these tags/lists, e.g. keys:['מכבי חיפה'] — the most common request 'send to tag X'), `recipientPhoneNumbers` (explicit list), `excelRecipients` (per-recipient variables), or `filters` (advanced CRM segment). Never send with an empty audience — if the user named a tag/list, put it in `keys`.
MESSAGE — you MUST set `messageType`: for a WhatsApp TEMPLATE set messageType='Template' AND `templateId` (the exact template the user chose); for free text set messageType='regular' AND `message`. Do not leave messageType/templateId empty when the user asked to send a specific template. Use gambot_list_templates to resolve the template name → id first if needed.
PREFER A TEMPLATE for broadcasts: a 'regular' free-text broadcast is delivered ONLY to recipients whose 24-hour window is open (they messaged you in the last 24h) and SILENTLY FAILS for everyone else. Cold/one-way audiences must get a Template.
REGULAR-BROADCAST SAFETY (messageType='regular'): the API will NOT send it straight away — it first returns error 'regular_window_confirmation_required' with { audienceCount, closedWindowCount, willReceive, recommendation }. You MUST relay this to the user: tell them how many recipients (closedWindowCount) will NOT receive the message because their 24-hour window is closed, and RECOMMEND sending a template instead. Only after the user decides: either switch to a template (messageType='Template' + templateId), or re-call this tool with confirmRegular=true to send the free text anyway (only the open-window recipients will get it). You can also call with dryRun=true first to preview the numbers without sending.
Compliance is built in: contacts who opted out (consent=false — via a הסר/stop/unsubscribe reply, or set with gambot_set_contact_consent) and contacts flagged as spam (isSpam=true) are AUTOMATICALLY excluded from the audience. Every org also has an ACTIVE opt-out flow; the response echoes it under `optOut` (enabled=true) and your consent-to-mail under `consent`.
- **gambot_test_campaign** — Send a single-recipient TEST of a template or free-text message. Great for previewing before a full broadcast.
- **gambot_send_campaign_from_excel** — Broadcast a WhatsApp TEMPLATE to everyone in an Excel/CSV the user gave you — the easiest way to do a mail-merge blast. An Excel/CSV broadcast is ALWAYS saved as a campaign (this matches the Gambot web app — there is no unsaved Excel send). If you send it immediately, this tool SAVES the campaign and then RUNS it right away; if you schedule it, it just saves it and the scheduler runs it. YOU (the agent) read the sheet and pass: `rows` (one object per row, keyed by the column header), `phoneColumn` (which column holds the phone), and the variable mapping — either `variableColumns` (ordered: 1st column → {{1}}, 2nd → {{2}}, …) or `variableMapping` ({ var1:'ColName', var2:'ColName2' }). TIP: call gambot_get_template_variables first to see how many variables the template expects, then map columns to them. Prefer a TEMPLATE (templateId): a free-text `message` broadcast only reaches recipients whose 24-hour window is open and silently fails for everyone else. To SCHEDULE add scheduling fields (scheduleType:'once' + runAt + timezone, or scheduleType:'repeated' + interval/intervalNumber/endCondition). Every original column is also stored per-recipient (rowData) so later automations can use any value by name. Compliance is built in: opted-out contacts (consent=false — via a הסר/stop/unsubscribe reply or gambot_set_contact_consent) and spam-flagged contacts (isSpam=true) are AUTOMATICALLY excluded; the org's ACTIVE opt-out flow is echoed under `optOut` (enabled=true) and your consent under `consent`.
- **gambot_list_bots** — List the organization's bots & chat automations (botomations). Pass botsOnly=true for only the visual menu/AI bots. Each item includes role (main_bot | activator | gambot_ai | human_intervention_cancel | return_to_menu | automation), triggerKind, sourceFlowId and linkedBotomationId — botomations sharing a sourceFlowId form ONE deployed bot 'package' (main bot + activator + human-intervention cancel + Gambot AI).
- **gambot_get_bot** — Get a single bot/automation with its full step definition (trigger + actions).
- **gambot_get_bot_package** — Return every botomation deployed together with this one (they share a sourceFlowId): the main bot plus its activator (the trigger, מפעיל), the human-intervention cancel (ביטול בוט בהתערבות אנושית), the Gambot AI answerer and any return-to-menu helper. Use this to see the WHOLE bot before turning it on/off. If the bot has no sourceFlowId, returns just that bot.
- **gambot_create_keyword_autoreply** — Create a bot that automatically replies to an incoming WhatsApp message. Trigger on specific keyword(s) (matchType 'equals' or 'contains') or on ANY incoming message (anyMessage=true). The reply is an approved template (replyTemplateName) or free text (replyText — only delivers inside the 24h service window). ── OPTIONAL ENHANCEMENTS (regular/free-text replies only — full parity with the visual Bot Builder): • contextCheck: verify the incoming reply is on-topic before advancing ('בדיקת הקשר') — pass contextPrompt to define what counts as in-context (auto-defaulted if omitted). • aiCompose: instead of a fixed replyText, let Gambot AI phrase the reply in real time from a short instruction (aiComposePrompt); sent as 'Gambot AI'. • outsideHoursMessage: send a DIFFERENT reply text outside the org's business hours. • reminders: follow-up reminders on the primary flow if the contact doesn't respond.
- **gambot_create_template_button_autoreply** — Create a bot that reacts when a contact taps a quick-reply BUTTON on a template you sent (e.g. after a campaign). For each button give the reply (template or text) — perfect for 'when they click X, send Y'. The button title must match the template's button exactly.
- **gambot_create_menu_bot** — Create a menu bot: an opening template with quick-reply buttons that route each tap to a reply. Provide openingTemplateName and options (each button + its reply template/text). Start the menu for a contact by sending the opening template (e.g. via a campaign). Each option's free-text reply can be enhanced (Bot Builder parity): aiCompose + aiComposePrompt (Gambot AI phrases it live) and outsideHoursMessage (different text outside business hours). Add reminders[] to send follow-ups on the primary/main flow if the contact goes quiet ('תזכורות בפלואו הראשי').
- **gambot_deploy_bot_package** — Deploy a WHOLE bot in one call — the way the Bot Builder does it — instead of wiring pieces separately. It creates, in order: (1) the MAIN bot, (2) its ACTIVATOR (מפעיל — the trigger that starts it), and (3) the HUMAN-INTERVENTION CANCEL (ביטול בוט בהתערבות אנושית — stops the bot the instant a human agent replies), all linked by one sourceFlowId so they turn on/off together. botType 'menu' = an opening template with quick-reply buttons routed to replies (needs openingTemplateName + options; the activator SENDS that opening template to start the bot). botType 'keyword' = reply to a keyword/any message (self-activating — its own keyword IS the activator, so no separate activator is made). Choose how the menu bot STARTS with activator.type: 'keyword'/'any_message' (a contact texts in), 'inactivity' (no message in noContactDays days), or 'campaign_lead' (a lead arrived from an ad/campaign). AI / combined bots (Gambot AI) are built in the Bot Builder app because they need a Gambot AI configuration. After deploy, toggle the whole thing with gambot_set_bot_status(includePackage=true) or inspect with gambot_get_bot_package.
- **gambot_set_bot_status** — Turn a bot on (active) or off (inactive). By default this toggles ONE botomation. Set includePackage=true to toggle the WHOLE bot — every botomation sharing its sourceFlowId (the main bot + its activator/trigger + the human-intervention cancel + the Gambot AI answerer) — which is what a user usually means by 'turn the bot on/off'. Use gambot_get_bot_package first if you're unsure what will be affected.
- **gambot_delete_bot** — Delete a bot/automation by id.
- **gambot_create_bot** — Advanced: create a bot from a full botomation object when the high-level builders aren't enough. steps[]: step 1 is the trigger (action 'IncomingMessage', …), the rest are actions ('SendMessage','switchCase','Condition','GambotAi','Delay','GambotAction',…). Use {{Step_1_PhoneNumber}} / {{Step_1_Message}} placeholders. ── STEP CONFIG FEATURES you can set (parity with the visual Bot Builder): • On a REGULAR IncomingMessage trigger config → aiContextGate:{enabled:true,prompt,model:'gpt-4o-mini',onExhausted:'advance'} for an on-topic CONTEXT check ('בדיקת הקשר'). • On a REGULAR SendMessage config → aiCompose:{enabled:true,prompt,assignToGambotAiAfter:true} to have Gambot AI phrase it live, and businessHoursAlternative:{enabled:true,outsideHoursMessage:'...'} for a different text outside business hours. • On the botomation itself → primaryFlowSettings:{reminderEnabled:true,reminders:[{afterMinutes,message,action}]} for follow-up reminders. Prefer gambot_create_keyword_autoreply / _template_button_autoreply / _menu_bot / _deploy_bot_package for common cases — they expose contextCheck, aiCompose, outsideHoursMessage and reminders as simple params.
- **gambot_list_ai** — List the organization's Gambot AI 'brains' (how the AI answers: purpose, tone, language, Q&A count). Most orgs already have one auto-built from their website at signup — find it here before creating a new one. Pair a brain with its botomation via gambot_list_bots (role 'gambot_ai').
- **gambot_get_ai** — Get one Gambot AI brain with its full configuration (purpose, tone, instructions, language, Q&A).
- **gambot_update_ai** — Update/upgrade an existing Gambot AI brain. PATCH semantics — only the fields you pass change; everything else (including learned Q&A, style examples and the knowledge-base file) is kept. Use this to refine the auto-built AI: sharpen its purpose/instructions, set the tone or language, add Q&A, or toggle escalate-to-human.
- **gambot_create_ai** — Create a NEW Gambot AI brain. Only do this if the org has none (check gambot_list_ai first — most orgs already have one auto-built from their website). After creating, wire it to a botomation whose trigger is contactOwner == 'Gambot AI' (built in the Bot Builder app) and route contacts by assigning owner = 'Gambot AI'.
- **gambot_check_organization** — Check whether an organization already exists for a company + tax id (ח.פ/ת.ז), and whether an incomplete onboarding can be resumed. Use before creating a new trial.
- **gambot_generate_organization_name** — Generate a unique organization name from a company name + tax id (adds a suffix if taken).
- **gambot_search_available_numbers** — List phone numbers available to purchase for a country (via Twilio), so you can pick one to buy as the account's SIM/number. Pass the chosen phoneNumber to gambot_create_trial_account / gambot_create_paid_account as simInfo.selectedSimNumber with simInfo.purchaseInTwilio=true.
- **gambot_create_trial_account** — Create a new FREE-TRIAL organization + first user (no card required). Login credentials (temp password) are emailed & WhatsApp'd to the contact. WhatsApp/number options: useFreeNumber (Meta test number) · useCoexisting (existing WhatsApp Business number in simInfo.simNumberEntered) · BYO SIM (the customer's own number in simInfo.simNumberEntered) · Buy a SIM from us (simInfo.purchaseInTwilio=true + simInfo.selectedSimNumber from gambot_search_available_numbers). GLOBAL: send companyInfo.timezone (IANA) and companyInfo.country (ISO-3166 alpha-2) — they drive scheduling and locale. Neither hard-fails: a missing/invalid timezone is derived from country (else defaults to Asia/Jerusalem). For a paid account with a card on file (no trial) use gambot_create_paid_account instead. After creating, connect WhatsApp via the returned wabaConnectUrl or gambot_exchange_waba_token.
- **gambot_create_paid_account** — Create a new organization that goes STRAIGHT TO PAID — no free trial month. A payment method is MANDATORY: pass a `card` object; the card is verified with the clearing provider, its token is saved, and billing starts immediately (first charge on the next billing run). Use this when an AI agent has the customer's card and should provision a paying account in one call. Same number options and the same graceful companyInfo.timezone/country handling as gambot_create_trial_account (neither hard-fails). The raw card is sent only to the PCI-compliant clearing provider and never stored.
- **gambot_add_payment_method** — Verify a card with the clearing provider (Tranzila) and save its token to an organization, so an AI agent with the customer's card can put a payment method on file without the hosted page. The raw card is sent only to the PCI-compliant clearing provider and never stored. For a hosted alternative (customer types the card), use gambot_create_payment_link.
- **gambot_create_payment_link** — Build a secure hosted payment link (Tranzila) to add a card for an organization. Card data is never handled by the API — share the URL with the customer; the card token is saved on success.
- **gambot_get_waba_connect_link** — Get the hosted page URL where the customer completes Meta Embedded Signup (the Facebook popup) to connect their WhatsApp Business account. REQUIRES AN EXISTING ACCOUNT: call gambot_create_trial_account FIRST (no key/form needed) and pass the exact organizationName it returned — never invent one (a non-existent organization is refused with ORGANIZATION_NOT_FOUND). The create call already returns wabaConnectUrl, so you normally don't need this tool right after creating.
- **gambot_exchange_waba_token** — Complete Meta Embedded Signup by exchanging the authorization code returned by the Facebook popup. Registers the WABA, subscribes webhooks and registers the phone number.
- **gambot_send_onboarding_verification** — Send a 6-digit verification code to the customer's email AND WhatsApp. Public (no token). Required ONLY before creating a self-serve account that BUYS a phone number (proves the customer owns the email/phone, so we don't buy numbers for fake accounts). Returns { verificationId } — collect the code from the customer, then call gambot_verify_onboarding_code. Free number / co-existence / bring-your-own do NOT need this.
- **gambot_verify_onboarding_code** — Verify the 6-digit code the customer received (from gambot_send_onboarding_verification). Public (no token). On success returns { verified:true }; pass the same verificationId to gambot_create_trial_account to create an account that buys a phone number.
- **gambot_get_onboarding_status** — Check where an organization is in onboarding: whether the account exists, a card is on file, and WhatsApp (WABA) is connected. Use this to POLL after create-trial (Meta Embedded Signup finishes in the browser, not in the agent). Returns { accountCreated, cardOnFile, wabaConnected, status (not_found|account_created|connected), wabaConnectUrl, paymentUrl, nextStep }. Public — works without a token.
- **gambot_analytics_summary** — One-shot KPI snapshot for a period: WhatsApp message volume (incoming/outgoing + per-agent breakdown), new contacts (incl. from CTWA ads), leads (created/won/open), support tickets (פניות: created/closed/open), tasks (created/completed/open/overdue) and bots (runs/completed/active/failed/completionRate). USE THIS to answer 'how are we doing today / this month', 'how many messages did we send', 'how many new leads', etc. Set userId to scope to a single team member; omit it to get the whole org (the per-agent breakdown still shows each user).
- **gambot_analytics_messages** — WhatsApp message volume for a period: total, incoming, outgoing, how many were sent by bots vs humans, and a per-agent breakdown (byAgent) — how many messages each user sent. Use for 'how many messages went out today', 'inbound vs outbound this month', 'who sent the most messages'.
- **gambot_analytics_transcript** — Read the ACTUAL message CONTENT across ALL conversations for a time window (default: today) as a flat, time-ordered feed. Each message has: time, phone, contactName, direction (incoming=from the customer / outgoing=from the team or bot), sender (customer name, agent name, 'Gambot AI', 'Gambot MCP', …), senderId, type, messageType and text. THIS is the tool for QUALITATIVE questions about conversations — e.g. 'how did my employees reply today?', 'which customers seem upset / frustrated?', 'summarize today's chats', 'did anyone ask about prices / cancel?', 'how did agent X handle their chats?'. After calling it, analyze the returned messages yourself to answer. For pure COUNTS use gambot_analytics_messages instead (cheaper). Filter by direction, by userId (one agent's replies), or by phone (a single conversation). Returns up to `limit` most-recent messages (truncated=true means older ones were dropped — narrow the window or raise limit).
- **gambot_analytics_overview** — Lifetime WhatsApp totals (total / sent / received / delivered / read / failed) plus a last-6-months trend. Cheap (served from a cached view). Use for all-time totals or a monthly trend chart; for a specific period use gambot_analytics_messages.
- **gambot_analytics_daily_conversations** — A day-by-day time series of inbound / outbound / AI messages across a range (default: last 30 days). Ideal for charts and trends.
- **gambot_analytics_contacts** — New contacts in the period, how many came from CTWA (Click-to-WhatsApp ads), and a breakdown by creation method (manual / incoming_message / api / ...).
- **gambot_analytics_leads** — Sales pipeline snapshot: open / won / lost this month, total pipeline value, and breakdowns by stage, source and user (salesByUser).
- **gambot_analytics_cases** — Support tickets / פניות for the period: created, closed, resolved, still-open, SLA compliance and a breakdown by stage. ('cases' is Gambot's internal name for פניות / inquiries / tickets.)
- **gambot_analytics_tasks** — Task KPIs: totals, open / in-progress / completed / overdue, and breakdowns by priority, category and assignee. Set userId to scope to one assignee.
- **gambot_analytics_ctwa** — Click-to-WhatsApp ad performance: the unique ads that drove conversations (id + headline), and how many new contacts in the period came from CTWA ads.
- **gambot_analytics_bots** — WhatsApp bot / automation performance for a period: totalRuns, completedRuns, activeRuns, failedRuns, completionRate (%), uniqueContacts engaged, and a per-bot breakdown (byBot: botId, name, status, runs, completed, active, failed, uniqueContacts) sorted by run volume. Also reports botsConfigured (total/active/bots). Use for 'how are my bots doing', 'which bot ran the most', 'bot completion rate this month'. Use gambot_list_bots for the bot catalog and gambot_get_bot for one bot's full definition.
- **gambot_register_webhook** — Register (or update) a WEBHOOK so Gambot POSTs every matching WhatsApp event to your server as it happens. Each delivery is a JSON 'envelope': { type, event, types[], organization, receivedAt, meta_obj } where meta_obj is Meta's raw payload, plus request headers X-Gambot-Organization and X-Gambot-Event. Provide the destination `url` (https recommended); optionally an `authHeader` we send verbatim as the Authorization header on every call, and `events` toggles to choose which event types to receive (all on by default). This is the programmatic equivalent of Settings → Event Forwarding, so it also shows up in the console. After registering, verify it with gambot_test_webhook. To stop delivery use gambot_delete_webhook.
- **gambot_get_webhook** — Return the organization's current event-forwarding webhook: whether it's enabled, the destination url, whether an auth header is set, and which event types are forwarded.
- **gambot_delete_webhook** — Disable event forwarding (stop POSTing events to the registered URL). The URL/settings are kept on file, so re-enabling later is a single gambot_register_webhook call.
- **gambot_test_webhook** — Fire a synthetic sample 'incoming_message' envelope (flagged test:true) at the registered webhook URL — or at an override `url` passed here — and return the delivery result: { delivered, statusCode, durationMs, responsePreview }. Use this to confirm your endpoint actually receives Gambot's calls. The attempt is recorded in the delivery log.
- **gambot_list_connections** — List the organization's connected integrations (the same as Settings → Connections): email & calendar OAuth accounts (Google/Microsoft), Facebook/Meta lead-ads pages, shop/CRM links, plus the org's WhatsApp numbers. Only non-secret metadata is returned (ids, providers, status, account email). Use a connection's id as the connectionId elsewhere (e.g. gambot_list_facebook_lead_forms, gambot_create_facebook_lead_bot) and its provider ('google'/'microsoft') to pick a mailbox/calendar.
- **gambot_send_email** — Send a single email over a connected Google/Microsoft mailbox (Settings → Connections). Provide to, subject and body. Set isHtml=false for plain text. Optionally cc/bcc and a provider ('google'/'microsoft' or a connection id; blank ⇒ first available).
- **gambot_list_email_campaigns** — List all email marketing campaigns for the organization.
- **gambot_get_email_campaign** — Get a single email campaign by id.
- **gambot_create_email_campaign** — Create an email marketing campaign. Content: either a saved templateId, or inline subject+body. Audience: a CRM segment via contactFilters ({ filters:[…], logic:'AND' }) OR an explicit excelRecipients list ([{ email, name, variables }]). Pass run=true to create AND send immediately in one call. Sends on the same durable, resumable engine as the app (safe for large lists, no duplicates).
- **gambot_run_email_campaign** — Run (send) a saved email campaign now. Uses the durable, resumable engine — safe for large audiences, no duplicates.
- **gambot_list_calendar_events** — List calendar events in a date range from a connected Google/Microsoft calendar (Settings → Connections). Pass provider ('google'/'microsoft' or a connection id; blank ⇒ first connected calendar) and an optional startDate/endDate (ISO-8601; default = current month).
- **gambot_list_facebook_lead_connections** — List the organization's connected Facebook/Meta Lead Ads pages. Each item's connectionId is what you pass to gambot_list_facebook_lead_forms and gambot_create_facebook_lead_bot.
- **gambot_list_facebook_lead_forms** — List the leadgen forms of a connected Facebook page. Pass a connectionId (from gambot_list_facebook_lead_connections; blank ⇒ the org's first Facebook Lead Ads connection). Returns [{ id, name, status }].
- **gambot_create_facebook_lead_bot** — Create a bot that auto-replies the moment a new lead arrives from a Facebook/Meta lead form. Provide a connectionId (from gambot_list_facebook_lead_connections) and a reply (replyTemplateName or replyText). Optionally restrict to specific formIds (from gambot_list_facebook_lead_forms; blank ⇒ any form on the page). The reply is sent to the lead's WhatsApp; lead fields are available as placeholders like {{Step_1_facebook_lead_data_full_name}}.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "gambot-whatsapp-business-api": {
    "command": "npx",
    "args": ["-y","gambot-mcp"]
  }
}
```

## Documentation

## What Gambot WhatsApp Business API does

Gambot WhatsApp Business API exposes Gambot’s REST-backed WhatsApp Business functionality through MCP tools. It connects to the official WhatsApp Business Cloud API through a Meta Business Solution Provider; it is not a WhatsApp Web or QR-session automation service. The server covers both messaging operations and CRM-oriented work, including contacts, tags, consent, leads, templates, campaigns, conversation data, and response SLAs.

A notable feature is guided onboarding. The setup tool can inspect the integration state with or without a Gambot token, identify the next required action, and distinguish between steps an agent can perform and steps that require the user in a browser. It can guide account creation, Meta Embedded Signup, sender verification, template checks, and webhook readiness.

## How it works

MCP clients invoke Gambot tools through either a local process or the hosted Streamable HTTP endpoint. The local package communicates with Gambot’s API at `https://api.gambot.co.il/api/v1` by default and authenticates an existing organization with a Gambot token.

The messaging tools enforce WhatsApp conversation rules. Free-form text is available only during the 24-hour customer-service window. Outside that window, an approved template is required. Single-recipient tools are intentionally separate from campaign tools: agents should use campaigns for multiple recipients, spreadsheets, CRM segments, or broadcasts rather than looping one-to-one send calls.

Responses provide operational data for follow-up actions. Sent messages return a message ID that can be checked for `sent`, `delivered`, `read`, or `failed` status. Contact and campaign operations include consent and opt-out handling, while bulk contact and lead updates support a preview-before-confirmation workflow.

## Setup and configuration

Node.js 18 or newer is required for local execution. The recommended installation uses `npx`:

```json
{
  "mcpServers": {
    "gambot": {
      "command": "npx",
      "args": ["-y", "gambot-mcp"],
      "env": {
        "GAMBOT_TOKEN": "gmbt_your_token_here"
      }
    }
  }
}
```

Place the configuration in the MCP client’s server configuration. `GAMBOT_TOKEN` can be omitted for tokenless onboarding mode. In that mode, the agent guides account creation and browser-based Meta signup; after WhatsApp is connected, the resulting token can be added to unlock the full tool set.

`GAMBOT_API_BASE` can override the default API base URL. A hosted server is also available at `https://mcp.gambot.co.il/mcp` using Streamable HTTP with OAuth or bearer-token authentication.

## Tools and capabilities

- Send free-text messages during an open 24-hour conversation window, or send approved templates outside it.
- Check delivery status, conversation-window state, sender numbers, conversations, and individual message histories.
- List, inspect, create, and upload media for WhatsApp templates, including variables, media headers, and buttons.
- Create, search, update, segment, tag, and bulk-update contacts, with consent and spam controls.
- Create campaign audiences from lists, templates, tags, contacts, or spreadsheet data, with opt-out and delivery handling.
- Inspect conversation response SLAs, including waiting time, warning levels, breaches, owners, and business-hour settings.
- Identify Click-to-WhatsApp contacts and segment template recipients by button interaction.
- Manage leads and perform confirmed bulk lead updates by IDs or filters.

## Limitations and notes

Free-text messages cannot be used after the 24-hour window closes; use an approved template instead. Templates must be approved by Meta before they can be sent, although a campaign can be scheduled before approval if approval is completed before its run time.

`gambot_list_conversations` returns contact-level metadata and a last-message preview, not complete message content. Use the single-conversation history tool for one contact or transcript analytics for content across a period.

Bulk contact and lead changes require an explicit confirmation call after a preview. Marketing recipients are affected by consent, opt-out, and spam rules. The WhatsApp Business API payment method is separate from Meta Ads billing; a payment-related delivery failure may require a payment method in Meta Business Settings.

_Full upstream README: https://allmcps.com/mcp/gambot-whatsapp-business-api/readme_

