Flow Document Reference
A flow is one JSON document. You send it to create, update and validate, and get it back from Get a flow. This page lists every field. GET /v2.0/flows/schema returns the same guide in a form an AI agent can read.
A complete example
An assistant collects a name, a date and a time, and the flow books a store visit in Google Calendar or offers other times.
{
"name": "Book a store visit",
"description": "Books a visit to the Kesari Loom store in Google Calendar, or offers the next free times.",
"trigger": {
"type": "ai_tool",
"config": {}
},
"inputs": [
{
"key": "name",
"label": "Customer name",
"type": "string",
"description": "The customer's full name",
"required": true
},
{
"key": "date",
"label": "Visit date",
"type": "date",
"description": "Preferred visit date, YYYY-MM-DD",
"required": true
},
{
"key": "time",
"label": "Visit time",
"type": "string",
"description": "Preferred start time, for example 11:30 AM",
"required": true
}
],
"steps": [
{
"id": "slot",
"type": "google_calendar",
"label": "Is that time free?",
"config": {
"action": "check_availability",
"connectionId": "6741f0a19d2b4e0011ac0a01",
"calendarId": "primary",
"timezone": "Asia/Kolkata",
"date": "{{ input.date }}",
"time": "{{ input.time }}",
"durationMin": 45,
"workStart": "10:00",
"workEnd": "20:00",
"workDays": [
1,
2,
3,
4,
5,
6
],
"maxSlots": 4
}
},
{
"id": "is_free",
"type": "condition",
"label": "Free?",
"config": {
"logic": "AND",
"rules": [
{
"left": "{{ steps.slot.requested.free }}",
"operator": "is_true",
"right": ""
}
]
},
"branches": {
"yes": [
{
"id": "book",
"type": "google_calendar",
"label": "Book the visit",
"config": {
"action": "create_event",
"connectionId": "6741f0a19d2b4e0011ac0a01",
"calendarId": "primary",
"timezone": "Asia/Kolkata",
"date": "{{ input.date }}",
"time": "{{ input.time }}",
"durationMin": 45,
"title": "Store visit: {{ input.name }}",
"description": "Phone: {{ contact.phone }}",
"failIfBusy": true
}
},
{
"id": "tag_visit",
"type": "update_contact",
"label": "Tag the customer",
"config": {
"addTags": [
"Store visit"
]
}
},
{
"id": "booked",
"type": "return",
"label": "Tell the AI",
"config": {
"message": "Booked {{ steps.book.label }} for {{ input.name }}. Confirm the time and share the store address."
}
}
],
"no": [
{
"id": "offer",
"type": "return",
"label": "Offer other times",
"config": {
"message": "{{ steps.slot.summary }} Ask the customer to pick one of these times."
}
}
]
}
}
],
"settings": {
"answerMode": "wait",
"timeoutSec": 25
}
}Top-level fields
Flow fields
| Parameter | Type | Description |
|---|---|---|
| name | string | 1 to 120 characters. Shown in the dashboard and run history |
| description | string | Up to 600 characters. For an ai_tool flow, this is what the assistant reads to decide when to call it, unless you give the tool its own description |
| status | string | active or paused. A new flow saved through the API is paused unless you send active. An update keeps the current status when you leave it out. A flow with no steps is always saved paused |
| trigger | object | { type, config }. type is ai_tool, event, webhook, payment or schedule. See Triggers belowDefault: { type: ai_tool, config: {} } |
| inputs | array | ai_tool flows: the details the assistant collects before it calls the flow. Up to 30. See Inputs |
| steps | array | The steps, in order. See Steps below. A flow with no steps can be saved, but not switched on |
| settings | object | { answerMode, timeoutSec, maxSteps }. See Settings |
| version | number | Update only: the version you read. A different current version answers 409 VERSION_CONFLICT |
Inputs
| Parameter | Type | Description |
|---|---|---|
| key | string | Lowercase letters, digits and _, starting with a letter. Up to 40 characters. Unique. Use it as {{ input.<key> }}. orgId, contactId, phoneNumber, myPhoneNumber, masterId and userId are reserved |
| label | string | Up to 80 characters. The name shown in the dashboard |
| type | string | string, number, boolean, date or enum. A date arrives as ISO 8601 textDefault: string |
| description | string | Up to 300 characters. What the assistant reads to know what to ask for. Be precise and give the format, such as "Preferred date, YYYY-MM-DD" |
| required | boolean | The assistant must collect it before calling the flowDefault: false |
| options | string[] | enum only: 1 to 30 choices, up to 80 characters each |
| askAi | boolean | false leaves the input out of what the assistant collectsDefault: true |
Settings
| Parameter | Type | Description |
|---|---|---|
| answerMode | string | ai_tool flows only. wait: the assistant waits for the Reply to the AI step before it answers the customer. background: the run is queued and the assistant only learns that it started. Use background for every other triggerDefault: wait |
| timeoutSec | number | 3 to 120. How long a run may take when someone waits for its answer: an ai_tool flow in wait mode, or a webhook flow with responseMode wait. Other runs get up to 120 secondsDefault: 20 |
| maxSteps | number | 1 to 200. The most steps the document may hold, counting steps inside paths, and the most a run may carry outDefault: 50 |
Step fields
Every step has the same outer fields. What goes in config depends on its type.
Fields on every step
| Parameter | Type | Description |
|---|---|---|
| id | string | 4 to 32 letters, digits, _ or -. Unique in the whole flow, including steps inside paths. Later steps read its results as {{ steps.<id>.<field> }} |
| type | string | One of the 13 step types below |
| label | string | Up to 120 characters. The name shown in the dashboard and run history |
| enabled | boolean | false skips the step. Run history shows it as skippedDefault: true |
| continueOnError | boolean | true lets the flow carry on when this step fails. {{ steps.<id> }} then holds the errorDefault: false |
| config | object | The step's settings. Every text value can hold {{ }} references |
| branches | object | If / else and Choose a path only. A map of path key to a list of steps. Keys are 1 to 40 letters, digits, _ or - |
What saving checks
- The fields above, their types and their limits.
- Step ids are unique and every step type exists. Only If / else and Choose a path have branches.
- In an
ai_toolflow, every{{ input.<key> }}matches an input. - Every
{{ steps.<id> }}names a step in the flow. - The flow has no more steps than
settings.maxSteps. - Each trigger’s and each step’s own rules, listed below.
- WhatsApp template steps match an approved template. See Template blanks.
A missing connection or amount does not stop a save. The step fails with a clear message when it runs, so test before you switch on. Errors come back as details: [{ path, message }], for example steps[1].config.
Triggers
trigger is { type, config }. Each type below lists its config and what {{ input }} holds when it runs.
ai_tool: AI assistant
An AI assistant calls the flow as a tool in a chat. The flow’s inputs become what the assistant collects from the customer before it calls. config is {}. {{ input.<key> }} holds each collected value. {{ contact.* }} and {{ conversation.* }} are the customer and the chat.
- Write each input’s
descriptionfor the assistant: what to ask for, in what format. - End every path with a Reply to the AI step whose message tells the assistant what happened and what to say.
settings.answerMode:waitto let the assistant use the answer (keep the flow quick),backgroundfor a slow flow whose result it does not need.- The flow does nothing until it is given to an assistant. See Flows in AI assistants.
The complete example at the top of this page is an ai_tool flow.
event: Event
The flow runs each time a Sendiee event happens on your account. The events are the same as the Automation Builder’s, for example contact.created, contact.lead_categorized, whatsapp.new_message, instagram.new_message, teambox.conversation_assigned and campaign.reply.
Event config
| Parameter | Type | Description |
|---|---|---|
| eventType | string | The event, for example contact.lead_categorized. Flows use the same events as the Automation Builder (dashboard, Automations) |
| conditions | object | { logic: AND | OR, rules: [{ field, operator, value }] }. field starts with data., such as data.category. Operators: eq, neq, contains, gt, lt, exists |
{{ input.<field> }}holds the event’s fields, withoutdata.:{{ input.category }},{{ input.previousCategory }}.- The customer is the event’s contact:
{{ contact.name }},{{ contact.phone }}. - Events that a flow caused itself, such as a contact change made by an Update the customer step, do not start flows. This stops a flow from looping.
- One flow runs at most 5 times a minute for the same customer, and 120 times a minute in all.
{
"name": "Hot lead alert",
"description": "Tells the owner on WhatsApp when a lead turns Hot.",
"trigger": {
"type": "event",
"config": {
"eventType": "contact.lead_categorized",
"conditions": {
"logic": "AND",
"rules": [
{
"field": "data.category",
"operator": "eq",
"value": "Hot"
}
]
}
}
},
"steps": [
{
"id": "alert",
"type": "send_message",
"label": "Tell the owner",
"config": {
"channel": "whatsapp",
"from": "917012345678",
"to": "919800000000",
"kind": "template",
"templateName": "hot_lead_alert",
"language": "en",
"bodyParameters": [
"{{ contact.name }}",
"{{ contact.phone }}"
]
}
}
],
"settings": {
"answerMode": "background"
}
}webhook: Webhook
Another system sends a request to the flow’s own web address. The address is made when the flow is saved and contains a secret, so the API never returns it. Copy it from the flow’s page in the dashboard.
Webhook config
| Parameter | Type | Description |
|---|---|---|
| responseMode | string | ack: answer the sender at once and run in the background. wait: run straight away and answer with the Reply to the AI step (keep the flow quick; settings.timeoutSec applies)Default: ack |
| contactField | string | Which field of the request holds the customer's phone or id, such as {{ body.phone }}. With it, {{ contact.* }} is filled and Send a message can reach the customer |
| platform | string | The channel of that customer: whatsapp, instagram or messengerDefault: whatsapp |
| verify | object | { type: none | hmac, header, algo, secret, prefixHeader }. With hmac, the request must carry a signature of its raw body in header (default x-signature), made with algo (sha256 default, sha1 or sha512) and secret. prefixHeader names a timestamp header for senders that sign timestamp.body |
| allowGet | boolean | Also run the flow on GET requests. Otherwise a GET only answers with a short hintDefault: false |
{{ input.body.<field> }}holds the request body, such as{{ input.body.name }}.input.query,input.headersandinput.methodhold the rest. Authorization, cookie and API key headers are removed.- Bodies up to 256 KB. The same body sent again within 5 minutes runs once; the repeat is answered
{ ok: true, duplicate: true }. - A paused flow answers
409. A wrong signature answers401. Too many requests in a minute answer429. When the month’s runs are used up it answers429with codeQUOTA.
{
"name": "Website enquiry",
"description": "Saves enquiries from the kesariloom.in contact form and welcomes the customer on WhatsApp.",
"trigger": {
"type": "webhook",
"config": {
"responseMode": "ack",
"contactField": "{{ body.phone }}",
"platform": "whatsapp",
"verify": {
"type": "none"
}
}
},
"steps": [
{
"id": "save_row",
"type": "google_sheets",
"label": "Save the enquiry",
"config": {
"action": "append_row",
"connectionId": "6741f0a19d2b4e0011ac0a01",
"spreadsheetId": "1kQ7vR2xLm9TbW4zYp8NcE3sHd6FjU0aGi5oKe1qVt2",
"sheetName": "Enquiries",
"columns": [
{
"column": "Date",
"value": "{{ now.date }}"
},
{
"column": "Name",
"value": "{{ input.body.name }}"
},
{
"column": "Phone",
"value": "{{ input.body.phone }}"
},
{
"column": "Looking for",
"value": "{{ input.body.saree }}"
},
{
"column": "Status",
"value": "New"
}
]
}
},
{
"id": "welcome",
"type": "send_message",
"label": "Welcome on WhatsApp",
"config": {
"channel": "whatsapp",
"from": "917012345678",
"kind": "template",
"templateName": "enquiry_welcome",
"language": "en",
"bodyParameters": [
"{{ input.body.name }}"
]
}
}
],
"settings": {
"answerMode": "background"
}
}Your website then sends the form to the flow’s address:
# FLOW_WEBHOOK_URL: copy it from the flow's page in the dashboard
curl -X POST "$FLOW_WEBHOOK_URL" \
-H "Content-Type: application/json" \
-d '{ "name": "Meera Nair", "phone": "919876543210", "saree": "Kanchipuram silk" }'{
"ok": true,
"queued": true,
"runId": "6741c5d29d2b4e0011ac3302"
}With responseMode: "wait", the answer is the Reply to the AI step’s data object when it has one, otherwise { ok, runId, status, message }.
payment: Payment
The flow runs when Razorpay or Cashfree reports that a payment link was paid, partly paid, expired or cancelled. It needs that payment account connected on the Connections page. For Razorpay, the connection shows the address and secret to add in Razorpay’s webhook settings. Links made by a Cashfree payment link step report back on their own.
Payment config
| Parameter | Type | Description |
|---|---|---|
| provider | string | razorpay or cashfree |
| connectionId | string | The payment connection made on the Connections page. A flow without one never runs |
| events | string[] | At least one of paid, partially_paid, expired, cancelled |
| onlyFromFlows | string[] | Only links created by these flows (flowIds). Empty: any link on the account |
| platform | string | The channel to reach the customer on: whatsapp, instagram or messengerDefault: whatsapp |
{{ input.* }}holds the payment:event,amount,amountPaid,currency,status,url,linkId,referenceId,paymentId,orderId,method,paidAt,customer.name,customer.email,customer.phone,notes.<key>andprovider.- The customer is found from the link: from the ids a Sendiee payment link step saves on it, otherwise from the phone on the link.
- The same report from the provider runs the flow once.
{
"name": "Payment received",
"description": "Tags the customer and thanks them on WhatsApp when a Razorpay payment link is paid.",
"trigger": {
"type": "payment",
"config": {
"provider": "razorpay",
"connectionId": "6741f0a19d2b4e0011ac0a02",
"events": [
"paid"
],
"onlyFromFlows": [],
"platform": "whatsapp"
}
},
"steps": [
{
"id": "mark_paid",
"type": "update_contact",
"label": "Tag as paid",
"config": {
"addTags": [
"Paid"
]
}
},
{
"id": "thank",
"type": "send_message",
"label": "Thank the customer",
"config": {
"channel": "whatsapp",
"from": "917012345678",
"kind": "template",
"templateName": "payment_received",
"language": "en",
"bodyParameters": [
"{{ input.customer.name }}",
"{{ input.amountPaid }}"
]
}
}
],
"settings": {
"answerMode": "background"
}
}schedule: Schedule
The flow runs at set times. Each run counts as one flow run and shows in run history.
Schedule config
| Parameter | Type | Description |
|---|---|---|
| frequency | string | hourly, daily, weekly or monthly |
| time | string | 24-hour HH:mm, such as 09:00. Required for daily, weekly and monthly. For hourly only the minutes count: 00:30 runs at half past |
| everyHours | number | hourly only, and then required: 1, 2, 3, 4, 6, 8 or 12. Counted from midnight: 6 runs at 00:00, 06:00, 12:00 and 18:00 |
| days | number[] | weekly only, and then required: the days to run, 0 = Sunday to 6 = Saturday |
| dayOfMonth | number | monthly only, and then required: 1 to 28, so every month has the day |
| timezone | string | An IANA time zone such as Asia/Kolkata. Empty: the workspace's time zone, and Asia/Kolkata when it has none |
{{ input.scheduledAt }}is when it ran (ISO).{{ input.schedule }}is the schedule in words, such as “Every Monday at 9 AM (Asia/Kolkata)”.- A scheduled run has no customer and no chat. A Send a message step needs a number in
to(the owner’s, a team member’s, or one from a sheet row) and, on WhatsApp, your number infrom. Update the customer and Update the chat steps have nothing to update. - A switched-off flow does not run on its schedule.
Saving refuses a schedule that breaks these rules, with one of these messages:
- “Choose how often the flow runs: every few hours, daily, weekly or monthly”
- “Choose the time the flow runs, like 09:00”
- “Choose every 1, 2, 3, 4, 6, 8 or 12 hours”
- “Choose at least one day of the week”
- “Choose a day of the month from 1 to 28”
- “Unknown timezone” followed by the value you sent
{
"name": "Monday enquiry summary",
"description": "Every Monday at 9 AM, tells the owner how many enquiries are still new.",
"trigger": {
"type": "schedule",
"config": {
"frequency": "weekly",
"time": "09:00",
"days": [
1
],
"timezone": "Asia/Kolkata"
}
},
"steps": [
{
"id": "new_rows",
"type": "google_sheets",
"label": "Read new enquiries",
"config": {
"action": "get_rows",
"connectionId": "6741f0a19d2b4e0011ac0a01",
"spreadsheetId": "1kQ7vR2xLm9TbW4zYp8NcE3sHd6FjU0aGi5oKe1qVt2",
"sheetName": "Enquiries",
"filterColumn": "Status",
"filterValue": "New",
"limit": 200
}
},
{
"id": "summary",
"type": "send_message",
"label": "Tell the owner",
"config": {
"channel": "whatsapp",
"from": "917012345678",
"to": "919800000000",
"kind": "template",
"templateName": "weekly_summary",
"language": "en",
"bodyParameters": [
"{{ steps.new_rows.count }}"
]
}
}
],
"settings": {
"answerMode": "background"
}
}Steps
Each step type below lists its config and the results later steps can read as {{ steps.<id>.<result> }}. Steps that send, write or charge are only pretended in a practice run. Steps that only read (a sheet lookup, a calendar check, a GET request) run for real.
Send a message (send_message)
Sends a WhatsApp text or approved template, or an Instagram or Messenger text with an optional image. To the customer, or to a number you set, such as the owner's.
Send a message config
| Parameter | Type | Description |
|---|---|---|
| channel | string | whatsapp, instagram, messenger, or same (the channel the customer wrote on; send a text)Default: whatsapp |
| from | string | WhatsApp: your business number with country code, no + (917012345678). Empty: the number the customer wrote to. Instagram and Messenger: an account id from GET /v2.0/flows/accounts. Empty: the account the customer wrote to, or your only one |
| to | string | Empty: the customer. WhatsApp also takes a number with country code (919800000000) to alert your team |
| kind | string | text or template. Templates are WhatsApp onlyDefault: text |
| text | string | The message, for kind text and on Instagram and Messenger |
| templateName | string | Template: the name of an approved WhatsApp template (GET /v2.0/templates) |
| language | string | Template: its language code, such as en |
| bodyParameters | string[] | Template: one value per blank in the message, in order |
| headerParameters | string[] | Template: one value per blank in a text header |
| mediaUrl | string | Template: the link to the image, video or document when the header is one |
| imageUrl | string | Instagram and Messenger: an https link to an image to send |
| defaultCountryCode | string | WhatsApp: the country code to add to a number written without one, such as 91 |
| Result | Type | Meaning |
|---|---|---|
| sent | boolean | true when the message went out |
| wamid | string | WhatsApp: the message id |
| messageId | string | Instagram and Messenger: the message id |
| to | string | Who it went to |
| from | string | The number or account it went from |
| skipped | boolean | true with sent: false and a reason when Sendiee chose not to send, for example to a contact on your private list. The flow carries on |
- A flow with no chat (schedule, webhook, payment, and test runs started from the API) has no number the customer wrote to. Set
fromon WhatsApp steps in those flows, or the step fails with "Choose which WhatsApp number to send from." - Saving checks every WhatsApp template step against your approved templates. See Template blanks below.
- Who a message can reach depends on Meta's messaging windows. See Messaging windows below.
{
"id": "alert",
"type": "send_message",
"label": "Tell the owner",
"config": {
"channel": "whatsapp",
"from": "917012345678",
"to": "919800000000",
"kind": "template",
"templateName": "hot_lead_alert",
"language": "en",
"bodyParameters": [
"{{ contact.name }}",
"{{ contact.phone }}"
]
}
}Update the customer (update_contact)
Saves details, custom fields, the lead category and tags on the customer's contact.
Update the customer config
| Parameter | Type | Description |
|---|---|---|
| fields | array | [{ key, value }]. key is name, email, notes, businessName, addressLine1, addressLine2, city, state, postalCode, country, custom.<field key>, or lead_category |
| addTags | string[] | Tag names to add |
| removeTags | string[] | Tag names to remove |
| createMissingTags | boolean | Create a tag in addTags that does not exist yetDefault: true |
| contactId | string | Update this contact instead of the run's customer |
| Result | Type | Meaning |
|---|---|---|
| updated | boolean | true when something changed |
| contactId | string | The contact that was updated |
| fields | object | The values written, by key |
| addedTags | string[] | Tags added |
| removedTags | string[] | Tags removed |
- Setting
lead_categoryworks like a change in the dashboard: it is recorded in the category history and firescontact.lead_categorized, so follow-ups and automations react. Flows themselves do not start on changes a flow made. - Typed custom fields are saved typed: a number becomes a number, a date becomes YYYY-MM-DD. File custom fields are skipped.
- The step needs a customer. In a run with no contact it fails with "No contact to update".
{
"id": "qualify",
"type": "update_contact",
"label": "Save the details",
"config": {
"fields": [
{
"key": "city",
"value": "{{ input.city }}"
},
{
"key": "custom.saree_type",
"value": "{{ input.saree_type }}"
},
{
"key": "lead_category",
"value": "Hot"
}
],
"addTags": [
"Wedding order"
],
"removeTags": []
}
}Update the chat (update_conversation)
Changes the customer's chat in your inbox: its status, who it is assigned to, or unassigns it. It works like the same change made in Teambox.
Update the chat config
| Parameter | Type | Description |
|---|---|---|
| action | string | set_status, assign or unassignDefault: set_status |
| statusKey | string | set_status, and then required: a statusKey from GET /v2.0/flows/inbox |
| teamId | string | assign, and then required: a teamId from GET /v2.0/flows/inbox |
| agentId | string | assign: an agentId on that team. Empty: the team's round robin picks someone |
| Result | Type | Meaning |
|---|---|---|
| updated | boolean | true when the change was made |
| conversationId | string | The chat that changed |
| status | string | Its inbox status |
| assignedAgentName | string | Who it is assigned to now |
| assignedTeamName | string | The team it is assigned to now |
- The step needs a live chat with the customer. Without one it fails with "No inbox conversation found for this contact".
- Assigning and unassigning need Teambox. GET /v2.0/flows/inbox returns
teamboxConfigured.
{
"id": "to_sales",
"type": "update_conversation",
"label": "Hand over to Sales",
"config": {
"action": "assign",
"teamId": "671f0a2b9d2b4e0011ab4401"
}
}Google Sheets (google_sheets)
Adds, finds, updates or reads rows in a Google Sheet. Row 1 of the tab must hold the column names. Columns in the settings are matched without regard to case; in results, use each name exactly as written in row 1.
Google Sheets config
| Parameter | Type | Description |
|---|---|---|
| action | string | append_row, find_row, update_row or get_rowsDefault: append_row |
| connectionId | string | A Google connection made on the Connections page |
| spreadsheetId | string | The sheet's link or its id |
| sheetName | string | The tabDefault: Sheet1 |
| columns | array | append_row and update_row: [{ column, value }], at least one |
| lookupColumn | string | find_row and update_row: the column to search |
| lookupValue | string | find_row and update_row: the value to look for |
| matchMode | string | equals or contains. Case does not matterDefault: equals |
| appendIfMissing | boolean | update_row: add the row when no row matchesDefault: false |
| filterColumn | string | get_rows: only rows whose column has filterValue |
| filterValue | string | get_rows: the value to keep |
| limit | number | get_rows: 1 to 500 rowsDefault: 50 |
| Result | Type | Meaning |
|---|---|---|
| rowNumber | number | append_row, find_row, update_row: the row's number in the sheet |
| row | object | The row by column name: {{ steps.<id>.row.Email }} |
| found | boolean | find_row and update_row: whether a row matched |
| updated | boolean | update_row: whether the row was changed |
| count | number | get_rows: how many rows matched. rows holds up to limit of them |
| rows | array | get_rows: the rows, {{ steps.<id>.rows.0.Name }} |
- A column you map that is not in row 1 fails the step and names the column.
{
"id": "find_order",
"type": "google_sheets",
"label": "Find the order",
"config": {
"action": "find_row",
"connectionId": "6741f0a19d2b4e0011ac0a01",
"spreadsheetId": "1kQ7vR2xLm9TbW4zYp8NcE3sHd6FjU0aGi5oKe1qVt2",
"sheetName": "Orders",
"lookupColumn": "Order",
"lookupValue": "{{ input.order_number }}",
"matchMode": "equals"
}
}Google Calendar (google_calendar)
Checks free times, books, finds, moves and cancels appointments. Events it books are linked to the customer, so a later flow can find and change them.
Google Calendar config
| Parameter | Type | Description |
|---|---|---|
| action | string | check_availability, create_event, list_events, reschedule_event or cancel_eventDefault: check_availability |
| connectionId | string | A Google connection with Calendar, made on the Connections page |
| calendarId | string | The calendarDefault: primary |
| timezone | string | IANA time zone. Empty: the workspace's, and Asia/Kolkata when it has none |
| date | string | YYYY-MM-DD |
| time | string | 10:30, 10.30 am and 2 PM all work |
| durationMin | number | Length of the appointment in minutesDefault: 30 |
| workStart | string | check_availability: opening time, such as 09:00 |
| workEnd | string | check_availability: closing time, such as 18:00 |
| workDays | number[] | check_availability: working days, 0 = SundayDefault: [1,2,3,4,5,6] |
| intervalMin | number | check_availability: minutes between suggested start times. Default: the duration |
| bufferMin | number | Minutes to keep free around other eventsDefault: 0 |
| minNoticeMin | number | check_availability: how soon a slot may startDefault: 0 |
| maxSlots | number | check_availability: free times to suggest, up to 20Default: 6 |
| title | string | create_event: the event titleDefault: Appointment |
| description | string | create_event: the event notes |
| attendees | string[] | create_event: email addresses to invite |
| addMeet | boolean | create_event: add a Google Meet linkDefault: false |
| failIfBusy | boolean | create_event and reschedule_event: fail when the time is takenDefault: true |
| eventId | string | reschedule_event and cancel_event: the event, usually {{ steps.<find step>.first.eventId }} |
| onlyThisContact | boolean | list_events: only this customer's appointmentsDefault: true |
| daysAhead | number | How many days ahead to look |
| limit | number | list_events: up to 100 eventsDefault: 10 |
| Result | Type | Meaning |
|---|---|---|
| requested.free | boolean | check_availability: whether the asked-for time is free |
| available | boolean | check_availability: whether there is a free time |
| slots | array | check_availability: free times, slots.0.label |
| summary | string | check_availability and list_events: the result in words, ready for the AI |
| booked | boolean | create_event: true when booked |
| eventId | string | create_event: the new event's id |
| label | string | create_event and reschedule_event: the time in words |
| meetLink | string | create_event: the Google Meet link, when added |
| found | boolean | list_events: whether any appointment was found |
| first | object | list_events: the next appointment, first.eventId, first.label |
| events | array | list_events: all appointments found |
| rescheduled | boolean | reschedule_event: true when moved |
| cancelled | boolean | cancel_event: true when cancelled |
- The usual shape: check_availability, then If / else on
{{ steps.<id>.requested.free }}, book on yes, and reply with the summary on no.
{
"id": "slot",
"type": "google_calendar",
"label": "Is that time free?",
"config": {
"action": "check_availability",
"connectionId": "6741f0a19d2b4e0011ac0a01",
"calendarId": "primary",
"timezone": "Asia/Kolkata",
"date": "{{ input.date }}",
"time": "{{ input.time }}",
"durationMin": 45,
"workStart": "10:00",
"workEnd": "20:00",
"workDays": [
1,
2,
3,
4,
5,
6
],
"maxSlots": 4
}
}Razorpay payment link (razorpay_payment_link)
Creates a Razorpay payment link for the customer. Send its url with a Send a message step.
Razorpay payment link config
| Parameter | Type | Description |
|---|---|---|
| connectionId | string | A Razorpay connection made on the Connections page |
| amount | string/number | In rupees, not paise: 499 |
| currency | string | The currencyDefault: INR |
| description | string | What the payment is for |
| referenceId | string | Your own reference, such as an order number. Default: a short unique id |
| customerName | string | Default: the contact's name |
| customerEmail | string | Default: the contact's email |
| customerPhone | string | Default: the contact's phone |
| expiresIn | number | How long the link stays valid, with expiresUnit (minutes, hours or days). 15 minutes to 180 days. Empty: no expiry |
| notifySms | boolean | Razorpay also texts the linkDefault: false |
| notifyEmail | boolean | Razorpay also emails the linkDefault: false |
| reminders | boolean | Razorpay sends remindersDefault: false |
| acceptPartial | boolean | Allow part payments, with minPartialAmountDefault: false |
| callbackUrl | string | Where the customer lands after paying |
| notes | array | [{ key, value }] saved on the link. Sendiee adds the contact and flow ids, which a Payment trigger uses to find the customer |
| extraFields | array | [{ key, value }] merged into Razorpay's request by dot path, for any field the provider accepts |
| Result | Type | Meaning |
|---|---|---|
| url | string | The link to send the customer |
| id | string | The provider's link id |
| status | string | The link's status |
| amount | number | The amount |
| currency | string | The currency |
| referenceId | string | The reference used |
| expiresAt | string | When it expires, or null |
{
"id": "pay_link",
"type": "razorpay_payment_link",
"label": "Create the payment link",
"config": {
"connectionId": "6741f0a19d2b4e0011ac0a02",
"amount": "{{ input.amount }}",
"currency": "INR",
"description": "Advance for {{ input.saree_type }}",
"expiresIn": 24,
"expiresUnit": "hours",
"notes": [
{
"key": "purpose",
"value": "advance"
}
]
}
}Cashfree payment link (cashfree_payment_link)
The same as the Razorpay step, with Cashfree. Cashfree needs the customer's phone number.
Cashfree payment link config
| Parameter | Type | Description |
|---|---|---|
| connectionId | string | A Cashfree connection made on the Connections page |
| amount … extraFields | various | The same fields as the Razorpay step: amount, currency, description, referenceId, customerName, customerEmail, customerPhone, expiresIn, expiresUnit, notifySms, notifyEmail, reminders, acceptPartial, minPartialAmount, notes and extraFields |
| returnUrl | string | Where the customer lands after paying |
| paymentMethods | string | Allowed methods, such as upi,cc,dc,nb |
| upiIntent | boolean | Open the UPI app directlyDefault: false |
| notifyFlow | boolean | The link reports back to Sendiee, so a Payment trigger flow hears when it is paidDefault: true |
| Result | Type | Meaning |
|---|---|---|
| url … expiresAt | various | The same results as the Razorpay step: url, id, status, amount, currency, referenceId and expiresAt |
| qrCode | string | A QR code image of the link, base64 |
{
"id": "pay_link",
"type": "cashfree_payment_link",
"label": "Create the payment link",
"config": {
"connectionId": "6741f0a19d2b4e0011ac0a03",
"amount": "{{ input.amount }}",
"currency": "INR",
"description": "Advance for {{ input.saree_type }}",
"expiresIn": 2,
"expiresUnit": "days",
"notifyFlow": true
}
}Call an API (http_request)
Calls another system: your own server, n8n, Zapier, a CRM. The address must start with https:// and use a domain name, not an IP address.
Call an API config
| Parameter | Type | Description |
|---|---|---|
| method | string | GET, POST, PUT, PATCH or DELETEDefault: POST |
| url | string | https:// address on a domain name |
| headers | array | [{ key, value, enabled }] |
| auth | object | { type: none } (default), { type: bearer, token }, { type: basic, username, password }, or { type: api_key, apiKeyName, apiKeyValue, apiKeyIn: header | query }. Never put a key in a flow that the owner did not give you |
| bodyMode | string | json (body is an object), raw (body is text) or none. GET sends no bodyDefault: json |
| body | object | string | What to send. Values can hold {{ }} references |
| timeoutSec | number | 1 to 60 secondsDefault: 15 |
| failOnError | boolean | Fail the step when the answer is not 2xx. false lets you check ok and status yourselfDefault: true |
| Result | Type | Meaning |
|---|---|---|
| ok | boolean | true for a 2xx answer |
| status | number | The HTTP status |
| body | object | string | The answer as data when it is JSON: {{ steps.<id>.body.<field> }} |
| text | string | The answer as text |
- Credentials in
authand in headers named like Authorization or X-API-Key come back masked. See Credentials are always masked on the overview.
{
"id": "crm_push",
"type": "http_request",
"label": "Send the lead to the CRM",
"config": {
"method": "POST",
"url": "https://crm.kesariloom.in/api/leads",
"headers": [
{
"key": "Content-Type",
"value": "application/json",
"enabled": true
}
],
"auth": {
"type": "bearer",
"token": "••••••"
},
"bodyMode": "json",
"body": {
"name": "{{ contact.name }}",
"phone": "{{ contact.phone }}",
"source": "WhatsApp"
},
"timeoutSec": 15,
"failOnError": true
}
}If / else (condition)
Checks one or more rules and goes down the yes path or the no path. Put the paths' steps in branches.yes and branches.no.
If / else config
| Parameter | Type | Description |
|---|---|---|
| logic | string | AND: every rule must hold. OR: one is enoughDefault: AND |
| rules | array | [{ left, operator, right }]. left is usually a {{ }} reference. No rules: the yes path |
| Result | Type | Meaning |
|---|---|---|
| result | boolean | true when the yes path was taken |
| matched | number[] | The positions of the rules that held |
- Operators:
eq,neq,contains,not_contains,starts_with,gt,gte,lt,lte,in(right is a comma list: "a, b"), andis_empty,is_not_empty,is_true,is_false, which need no right. - Text is compared without regard to case. gt, gte, lt and lte compare numbers.
{
"id": "is_free",
"type": "condition",
"label": "Free?",
"config": {
"logic": "AND",
"rules": [
{
"left": "{{ steps.slot.requested.free }}",
"operator": "is_true",
"right": ""
}
]
},
"branches": {
"yes": [
{
"id": "booked",
"type": "return",
"config": {
"message": "Booked."
}
}
],
"no": [
{
"id": "offer",
"type": "return",
"config": {
"message": "{{ steps.slot.summary }}"
}
}
]
}
}Choose a path (switch)
Picks one of several paths by a value. Each case has a key, and branches holds one list of steps per key, plus default.
Choose a path config
| Parameter | Type | Description |
|---|---|---|
| on | string | The value to look at, such as {{ input.choice }} |
| matchMode | string | exact or contains. Case does not matterDefault: exact |
| cases | array | [{ key, label, value }], at least one, keys unique. value may list alternatives separated by commas: "buy, price, order" |
| Result | Type | Meaning |
|---|---|---|
| branch | string | The key of the path taken, or default |
| value | any | The value that was checked |
| matched | string | The case that matched, or null |
{
"id": "route",
"type": "switch",
"label": "What do they want?",
"config": {
"on": "{{ input.topic }}",
"matchMode": "contains",
"cases": [
{
"key": "sales",
"label": "Buying",
"value": "buy, price, order"
},
{
"key": "support",
"label": "Help",
"value": "return, exchange, damaged"
}
]
},
"branches": {
"sales": [
{
"id": "to_sales",
"type": "update_conversation",
"config": {
"action": "assign",
"teamId": "671f0a2b9d2b4e0011ab4401"
}
}
],
"support": [
{
"id": "to_care",
"type": "update_conversation",
"config": {
"action": "set_status",
"statusKey": "open"
}
}
],
"default": []
}
}Wait (wait)
Pauses the run and carries on by itself later: after a while, at a date and time, or when the customer replies. A paused run is still one run.
Wait config
| Parameter | Type | Description |
|---|---|---|
| mode | string | delay, until or replyDefault: delay |
| amount | number | delay, and then required: how long, with unit (minutes, hours or days) |
| until | string | until, and then required: a date and time such as 2026-12-01 10:00, in the workspace's time zone (UTC when it has none) |
| timeoutAmount | number | reply: how long to wait for the reply, with timeoutUnit (default hours)Default: 24 |
| noTimeout | boolean | reply: wait as long as allowedDefault: false |
| Result | Type | Meaning |
|---|---|---|
| waited | boolean | delay and until: true once the run carries on |
| replied | boolean | reply: true when the customer replied |
| text | string | reply: what the customer wrote |
| timedOut | boolean | reply: true when no reply came in time |
- A wait is at most 30 days.
- Follow a reply wait with If / else on
{{ steps.<id>.replied }}. - In an ai_tool flow, the assistant is told the flow is in progress when the run reaches a Wait, so it does not wait for the rest.
- If the flow is switched off while a run waits, that run is cancelled when it would carry on.
- Test runs and practice runs do not wait. They carry straight on.
{
"id": "await_reply",
"type": "wait",
"label": "Wait for their answer",
"config": {
"mode": "reply",
"timeoutAmount": 24,
"timeoutUnit": "hours"
}
}Save a value (set_variable)
Works out values once and keeps them as {{ vars.<key> }} for later steps.
Save a value config
| Parameter | Type | Description |
|---|---|---|
| assignments | array | [{ key, value, transform, format, timezone }]. key: letters, digits and _ |
| transform | string | none, trim, upper, lower, number, date or json_parseDefault: none |
| format | string | date: the format, such as DD MMM YYYY, h:mm aDefault: YYYY-MM-DD HH:mm |
| timezone | string | date: the IANA time zone to show the date inDefault: UTC |
| Result | Type | Meaning |
|---|---|---|
| <key> | any | Each value, also readable as {{ vars.<key> }} |
- The value
nowwith the date transform gives the current time in the time zone you choose. Use it instead of{{ now.date }}, which is in UTC.
{
"id": "today",
"type": "set_variable",
"label": "Today in India",
"config": {
"assignments": [
{
"key": "today",
"value": "now",
"transform": "date",
"format": "DD MMM YYYY",
"timezone": "Asia/Kolkata"
},
{
"key": "total",
"value": "{{ input.qty * input.price }}",
"transform": "number"
}
]
}
}Reply to the AI (return)
Finishes the flow and hands a result to whoever started it. In an ai_tool flow the assistant reads the message before it answers the customer.
Reply to the AI config
| Parameter | Type | Description |
|---|---|---|
| message | string | Plain words for the assistant: what happened and what to say next |
| data | object | Structured result. A webhook flow with responseMode wait answers the caller with it |
| Result | Type | Meaning |
|---|---|---|
| message | string | The message |
| data | object | The data, or null |
- In an ai_tool flow, end every path with a Reply to the AI step.
{
"id": "booked",
"type": "return",
"label": "Tell the AI",
"config": {
"message": "Booked {{ steps.book.label }} for {{ input.name }}. Confirm the time and share the store address."
}
}Paths in If / else and Choose a path
A branching step holds its paths in branches: a map of path key to a list of steps. If / else uses yes and no. Choose a path uses each case’s key plus default. After a path ends, the flow carries on with the step after the branching step. A path can be empty, and paths can hold more branching steps. Steps inside paths count toward settings.maxSteps, and their ids must be unique across the whole flow.
Template blanks
WhatsApp refuses a template message whose values do not match the template’s blanks. So saving and POST /v2.0/flows/validate check every enabled WhatsApp template step against your approved templates:
- An approved template with that
templateNamemust exist, inlanguagewhen you give one. bodyParametersmust have exactly one value per blank in the message.{{1}}used twice is one blank.headerParametersmust have exactly one value per blank in a text header.- A header that is an image, video or document needs its link in
mediaUrl.
A step that breaks a rule gets one of these messages:
{
"error": true,
"code": "VALIDATION",
"message": "The template “hot_lead_alert” has 2 blanks in its message; this step fills 1.",
"details": [
{
"path": "steps[0].config",
"message": "The template “hot_lead_alert” has 2 blanks in its message; this step fills 1."
}
]
}Other messages: “There is no approved WhatsApp template called …”, “… blanks in its header; this step fills …”, and “… starts with an image: add its link to this step.” Only the number of values is checked, so a value can be a {{ }} reference.
Messaging windows
Meta decides when a business may message someone, and Meta can change these rules. Check Meta’s documentation for the current ones.
- WhatsApp: a text reaches the customer only within 24 hours of their last message to you. To alert your team, or to reach a customer who has not written in the last 24 hours, send an approved template.
- Instagram and Messenger: there are no templates. A message reaches someone only inside Meta’s messaging window, which opens when they message you and lasts 24 hours from their last message. See Meta’s Messenger Platform policy overview and the Instagram Platform documentation.
Test before you switch on