create_automation
Creates an automation that is active straight away and runs whenever a lead matches it.
Create automation · Changes data · Acts outside your account
Creates an automation that is active straight away and runs whenever a lead matches it. By default it triggers when a new lead is identified, on the first visit only, immediately. The action is set by trigger.then, and its settings go in trigger.actions. For example, Slack uses { sentToSlack: { sendMessagesTo } } and a webhook uses { sentToWebhook: { url } }. To send leads to an email campaign, pass actions: [{ emailCampaign: "<campaignId from list_campaigns>" }]. Without trigger.then, the action is send-to-slack, or send-to-emailCampaign when actions has a campaign. It acts outside the account for every future matching lead (messages, CRM records, campaign emails). Confirm with the user before calling. Returns the created automation with its _id. Errors (405) include a missing campaign or an invalid campaign ID.
| Connection | Account URL, team member URL or OAuth |
|---|
Parameters
| Parameter | Type | Required | Accepts | Description |
|---|---|---|---|---|
websiteId | string | Yes | any | Website ID from list_websites. |
name | string | Yes | any | Name shown in the automation list. |
trigger | object | Yes | any | The rule and the action settings; each key below has a default. |
trigger.when | string | No | 7 values | What starts it (default new-lead-is-identified). |
trigger.then | string | No | 16 values | The action: where matching leads go. Without it, send-to-slack, or send-to-emailCampaign when actions has a campaign. |
trigger.trigger | string | No | only-on-first-visit, on-every-visit, none | only-on-first-visit (default), on-every-visit or none. |
trigger.interval | string | No | immediately, after-session, daily, weekly, monthly | immediately (default), after-session, daily, weekly or monthly. |
trigger.repeatWindowHours | integer | No | 7 values | Act at most once per company or person in this many hours (12, 24, 72, 168, 720, 2160 or 4320); leave out for no limit. |
trigger.dedupeScope | string | No | contact, company | What counts as the same for the repeat limit: contact (default) or company. |
trigger.contactSelectionStrategy | string | No | flexible-job-titles, exact-job-titles, flexible-find-at-least-one-job-titles | How contacts are matched to your job titles: flexible-job-titles (default), exact-job-titles or flexible-find-at-least-one-job-titles. |
trigger.maxContactsToSend | integer | No | min 1 | Most contacts sent per company (default 1). |
trigger.filter | string | No | any | A saved filter id from list_filters; only leads matching it. |
trigger.emailVerification | object | No | any | Which emails count: allowOnlyValidEmails, allowCatchAllEmails, allowGuessedEmails, allowWithoutEmails (true/false). |
trigger.actions | object | No | any | The action settings, e.g. { sentToSlack: { sendMessagesTo: '#leads' } } or { sentToWebhook: { url } }. HubSpot: { sentToHubspot: { assignContactsTo, createDeal: true, pipelineId, dealStageId, dealAmount } } also creates a deal per lead (pipeline and stage ids from list_crm_pipelines); without createDeal only the contact and its company are created. |
actions | object[] | No | any | Shortcut for email campaigns only: a list whose item has emailCampaign set to a campaign id from list_campaigns, e.g. [{ "emailCampaign": "64f..." }]. Other items are ignored; put other action settings in trigger.actions. |
actions[].emailCampaign | string | No | any | A campaign id from list_campaigns. |
Accepted values
The exact values these fields take; anything else is refused.
trigger.when
new-lead-is-identified · new-intent-data-triggered · new-prospector-lead · new-web-scraping-signal · new-scout-lead · new-linkedin-engagement · new-tag-added-to-lead
trigger.then
send-to-slack · send-to-hubspot · send-to-pipedrive · send-to-salesforce · send-to-zoho · send-to-gohighlevel · trigger-webhook · send-to-zapier · send-to-clay · send-to-emailCampaign · send-to-linkedinCampaign · send-email-alert · send-csv-on-email · send-to-googleAdsCampaign · send-to-linkedinAdsAudience · send-to-metaAdsAudience
trigger.repeatWindowHours
12 · 24 · 72 · 168 · 720 · 2160 · 4320
Tool definition
What your assistant receives from tools/list:
{
"name": "create_automation",
"title": "Create automation",
"annotations": {
"title": "Create automation",
"readOnlyHint": false,
"destructiveHint": false,
"idempotentHint": false,
"openWorldHint": true
},
"inputSchema": {
"type": "object",
"properties": {
"websiteId": {
"type": "string",
"description": "Website ID from list_websites."
},
"name": {
"type": "string",
"description": "Name shown in the automation list."
},
"trigger": {
"type": "object",
"properties": {
"when": {
"type": "string",
"enum": [
"new-lead-is-identified",
"new-intent-data-triggered",
"new-prospector-lead",
"new-web-scraping-signal",
"new-scout-lead",
"new-linkedin-engagement",
"new-tag-added-to-lead"
],
"description": "What starts it (default new-lead-is-identified)."
},
"then": {
"type": "string",
"enum": [
"send-to-slack",
"send-to-hubspot",
"send-to-pipedrive",
"send-to-salesforce",
"send-to-zoho",
"send-to-gohighlevel",
"trigger-webhook",
"send-to-zapier",
"send-to-clay",
"send-to-emailCampaign",
"send-to-linkedinCampaign",
"send-email-alert",
"send-csv-on-email",
"send-to-googleAdsCampaign",
"send-to-linkedinAdsAudience",
"send-to-metaAdsAudience"
],
"description": "The action: where matching leads go. Without it, send-to-slack, or send-to-emailCampaign when actions has a campaign."
},
"trigger": {
"type": "string",
"enum": [
"only-on-first-visit",
"on-every-visit",
"none"
],
"description": "only-on-first-visit (default), on-every-visit or none."
},
"interval": {
"type": "string",
"enum": [
"immediately",
"after-session",
"daily",
"weekly",
"monthly"
],
"description": "immediately (default), after-session, daily, weekly or monthly."
},
"repeatWindowHours": {
"type": "integer",
"enum": [
12,
24,
72,
168,
720,
2160,
4320
],
"description": "Act at most once per company or person in this many hours (12, 24, 72, 168, 720, 2160 or 4320); leave out for no limit."
},
"dedupeScope": {
"type": "string",
"enum": [
"contact",
"company"
],
"description": "What counts as the same for the repeat limit: contact (default) or company."
},
"contactSelectionStrategy": {
"type": "string",
"enum": [
"flexible-job-titles",
"exact-job-titles",
"flexible-find-at-least-one-job-titles"
],
"description": "How contacts are matched to your job titles: flexible-job-titles (default), exact-job-titles or flexible-find-at-least-one-job-titles."
},
"maxContactsToSend": {
"type": "integer",
"minimum": 1,
"description": "Most contacts sent per company (default 1)."
},
"filter": {
"type": "string",
"description": "A saved filter id from list_filters; only leads matching it."
},
"emailVerification": {
"type": "object",
"description": "Which emails count: allowOnlyValidEmails, allowCatchAllEmails, allowGuessedEmails, allowWithoutEmails (true/false)."
},
"actions": {
"type": "object",
"description": "The action settings, e.g. { sentToSlack: { sendMessagesTo: '#leads' } } or { sentToWebhook: { url } }. HubSpot: { sentToHubspot: { assignContactsTo, createDeal: true, pipelineId, dealStageId, dealAmount } } also creates a deal per lead (pipeline and stage ids from list_crm_pipelines); without createDeal only the contact and its company are created."
}
},
"description": "The rule and the action settings; each key below has a default."
},
"actions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"emailCampaign": {
"type": "string",
"description": "A campaign id from list_campaigns."
}
}
},
"description": "Shortcut for email campaigns only: a list whose item has emailCampaign set to a campaign id from list_campaigns, e.g. [{ \"emailCampaign\": \"64f...\" }]. Other items are ignored; put other action settings in trigger.actions."
}
},
"required": [
"websiteId",
"name",
"trigger"
]
}
}list_automations
Lists a website's automations: rules that act when a lead matches, for example sending to Slack, a CRM, a webhook, Zapier, an email or LinkedIn campaign, or an email alert.
get_automation
Returns the full setup of one automation: name, isActive, when (trigger event), then (action), trigger, interval, frequency settings (repeatWindowHours, dedupeScope), contact selection, email verification rules, filter and the action settings, plus draft (true = unfinished, never runs) and errorMessage (why the last run failed, null when fine).