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.

ai_tool flow
{
  "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

ParameterTypeDescription
namestring1 to 120 characters. Shown in the dashboard and run history
descriptionstringUp 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
statusstringactive 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
triggerobject{ type, config }. type is ai_tool, event, webhook, payment or schedule. See Triggers belowDefault: { type: ai_tool, config: {} }
inputsarrayai_tool flows: the details the assistant collects before it calls the flow. Up to 30. See Inputs
stepsarrayThe steps, in order. See Steps below. A flow with no steps can be saved, but not switched on
settingsobject{ answerMode, timeoutSec, maxSteps }. See Settings
versionnumberUpdate only: the version you read. A different current version answers 409 VERSION_CONFLICT

Inputs

ParameterTypeDescription
keystringLowercase 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
labelstringUp to 80 characters. The name shown in the dashboard
typestringstring, number, boolean, date or enum. A date arrives as ISO 8601 textDefault: string
descriptionstringUp 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"
requiredbooleanThe assistant must collect it before calling the flowDefault: false
optionsstring[]enum only: 1 to 30 choices, up to 80 characters each
askAibooleanfalse leaves the input out of what the assistant collectsDefault: true

Settings

ParameterTypeDescription
answerModestringai_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
timeoutSecnumber3 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
maxStepsnumber1 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

ParameterTypeDescription
idstring4 to 32 letters, digits, _ or -. Unique in the whole flow, including steps inside paths. Later steps read its results as {{ steps.<id>.<field> }}
typestringOne of the 13 step types below
labelstringUp to 120 characters. The name shown in the dashboard and run history
enabledbooleanfalse skips the step. Run history shows it as skippedDefault: true
continueOnErrorbooleantrue lets the flow carry on when this step fails. {{ steps.<id> }} then holds the errorDefault: false
configobjectThe step's settings. Every text value can hold {{ }} references
branchesobjectIf / 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_tool flow, 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 description for 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: wait to let the assistant use the answer (keep the flow quick), background for 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

ParameterTypeDescription
eventTypestringThe event, for example contact.lead_categorized. Flows use the same events as the Automation Builder (dashboard, Automations)
conditionsobject{ 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, without data.: {{ 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.
event flow
{
  "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

ParameterTypeDescription
responseModestringack: 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
contactFieldstringWhich 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
platformstringThe channel of that customer: whatsapp, instagram or messengerDefault: whatsapp
verifyobject{ 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
allowGetbooleanAlso 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.headers and input.method hold 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 answers 401. Too many requests in a minute answer 429. When the month’s runs are used up it answers 429 with code QUOTA.
webhook flow
{
  "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:

cURL
# 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

ParameterTypeDescription
providerstringrazorpay or cashfree
connectionIdstringThe payment connection made on the Connections page. A flow without one never runs
eventsstring[]At least one of paid, partially_paid, expired, cancelled
onlyFromFlowsstring[]Only links created by these flows (flowIds). Empty: any link on the account
platformstringThe 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> and provider.
  • 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.
payment flow
{
  "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

ParameterTypeDescription
frequencystringhourly, daily, weekly or monthly
timestring24-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
everyHoursnumberhourly 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
daysnumber[]weekly only, and then required: the days to run, 0 = Sunday to 6 = Saturday
dayOfMonthnumbermonthly only, and then required: 1 to 28, so every month has the day
timezonestringAn 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 in from. 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

ParameterTypeDescription
channelstringwhatsapp, instagram, messenger, or same (the channel the customer wrote on; send a text)Default: whatsapp
fromstringWhatsApp: 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
tostringEmpty: the customer. WhatsApp also takes a number with country code (919800000000) to alert your team
kindstringtext or template. Templates are WhatsApp onlyDefault: text
textstringThe message, for kind text and on Instagram and Messenger
templateNamestringTemplate: the name of an approved WhatsApp template (GET /v2.0/templates)
languagestringTemplate: its language code, such as en
bodyParametersstring[]Template: one value per blank in the message, in order
headerParametersstring[]Template: one value per blank in a text header
mediaUrlstringTemplate: the link to the image, video or document when the header is one
imageUrlstringInstagram and Messenger: an https link to an image to send
defaultCountryCodestringWhatsApp: the country code to add to a number written without one, such as 91
ResultTypeMeaning
sentbooleantrue when the message went out
wamidstringWhatsApp: the message id
messageIdstringInstagram and Messenger: the message id
tostringWho it went to
fromstringThe number or account it went from
skippedbooleantrue 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 from on 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.
send_message
{
  "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

ParameterTypeDescription
fieldsarray[{ key, value }]. key is name, email, notes, businessName, addressLine1, addressLine2, city, state, postalCode, country, custom.<field key>, or lead_category
addTagsstring[]Tag names to add
removeTagsstring[]Tag names to remove
createMissingTagsbooleanCreate a tag in addTags that does not exist yetDefault: true
contactIdstringUpdate this contact instead of the run's customer
ResultTypeMeaning
updatedbooleantrue when something changed
contactIdstringThe contact that was updated
fieldsobjectThe values written, by key
addedTagsstring[]Tags added
removedTagsstring[]Tags removed
  • Setting lead_category works like a change in the dashboard: it is recorded in the category history and fires contact.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".
update_contact
{
  "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

ParameterTypeDescription
actionstringset_status, assign or unassignDefault: set_status
statusKeystringset_status, and then required: a statusKey from GET /v2.0/flows/inbox
teamIdstringassign, and then required: a teamId from GET /v2.0/flows/inbox
agentIdstringassign: an agentId on that team. Empty: the team's round robin picks someone
ResultTypeMeaning
updatedbooleantrue when the change was made
conversationIdstringThe chat that changed
statusstringIts inbox status
assignedAgentNamestringWho it is assigned to now
assignedTeamNamestringThe 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.
update_conversation
{
  "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

ParameterTypeDescription
actionstringappend_row, find_row, update_row or get_rowsDefault: append_row
connectionIdstringA Google connection made on the Connections page
spreadsheetIdstringThe sheet's link or its id
sheetNamestringThe tabDefault: Sheet1
columnsarrayappend_row and update_row: [{ column, value }], at least one
lookupColumnstringfind_row and update_row: the column to search
lookupValuestringfind_row and update_row: the value to look for
matchModestringequals or contains. Case does not matterDefault: equals
appendIfMissingbooleanupdate_row: add the row when no row matchesDefault: false
filterColumnstringget_rows: only rows whose column has filterValue
filterValuestringget_rows: the value to keep
limitnumberget_rows: 1 to 500 rowsDefault: 50
ResultTypeMeaning
rowNumbernumberappend_row, find_row, update_row: the row's number in the sheet
rowobjectThe row by column name: {{ steps.<id>.row.Email }}
foundbooleanfind_row and update_row: whether a row matched
updatedbooleanupdate_row: whether the row was changed
countnumberget_rows: how many rows matched. rows holds up to limit of them
rowsarrayget_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.
google_sheets
{
  "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

ParameterTypeDescription
actionstringcheck_availability, create_event, list_events, reschedule_event or cancel_eventDefault: check_availability
connectionIdstringA Google connection with Calendar, made on the Connections page
calendarIdstringThe calendarDefault: primary
timezonestringIANA time zone. Empty: the workspace's, and Asia/Kolkata when it has none
datestringYYYY-MM-DD
timestring10:30, 10.30 am and 2 PM all work
durationMinnumberLength of the appointment in minutesDefault: 30
workStartstringcheck_availability: opening time, such as 09:00
workEndstringcheck_availability: closing time, such as 18:00
workDaysnumber[]check_availability: working days, 0 = SundayDefault: [1,2,3,4,5,6]
intervalMinnumbercheck_availability: minutes between suggested start times. Default: the duration
bufferMinnumberMinutes to keep free around other eventsDefault: 0
minNoticeMinnumbercheck_availability: how soon a slot may startDefault: 0
maxSlotsnumbercheck_availability: free times to suggest, up to 20Default: 6
titlestringcreate_event: the event titleDefault: Appointment
descriptionstringcreate_event: the event notes
attendeesstring[]create_event: email addresses to invite
addMeetbooleancreate_event: add a Google Meet linkDefault: false
failIfBusybooleancreate_event and reschedule_event: fail when the time is takenDefault: true
eventIdstringreschedule_event and cancel_event: the event, usually {{ steps.<find step>.first.eventId }}
onlyThisContactbooleanlist_events: only this customer's appointmentsDefault: true
daysAheadnumberHow many days ahead to look
limitnumberlist_events: up to 100 eventsDefault: 10
ResultTypeMeaning
requested.freebooleancheck_availability: whether the asked-for time is free
availablebooleancheck_availability: whether there is a free time
slotsarraycheck_availability: free times, slots.0.label
summarystringcheck_availability and list_events: the result in words, ready for the AI
bookedbooleancreate_event: true when booked
eventIdstringcreate_event: the new event's id
labelstringcreate_event and reschedule_event: the time in words
meetLinkstringcreate_event: the Google Meet link, when added
foundbooleanlist_events: whether any appointment was found
firstobjectlist_events: the next appointment, first.eventId, first.label
eventsarraylist_events: all appointments found
rescheduledbooleanreschedule_event: true when moved
cancelledbooleancancel_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.
google_calendar
{
  "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
  }
}

Creates a Razorpay payment link for the customer. Send its url with a Send a message step.

ParameterTypeDescription
connectionIdstringA Razorpay connection made on the Connections page
amountstring/numberIn rupees, not paise: 499
currencystringThe currencyDefault: INR
descriptionstringWhat the payment is for
referenceIdstringYour own reference, such as an order number. Default: a short unique id
customerNamestringDefault: the contact's name
customerEmailstringDefault: the contact's email
customerPhonestringDefault: the contact's phone
expiresInnumberHow long the link stays valid, with expiresUnit (minutes, hours or days). 15 minutes to 180 days. Empty: no expiry
notifySmsbooleanRazorpay also texts the linkDefault: false
notifyEmailbooleanRazorpay also emails the linkDefault: false
remindersbooleanRazorpay sends remindersDefault: false
acceptPartialbooleanAllow part payments, with minPartialAmountDefault: false
callbackUrlstringWhere the customer lands after paying
notesarray[{ key, value }] saved on the link. Sendiee adds the contact and flow ids, which a Payment trigger uses to find the customer
extraFieldsarray[{ key, value }] merged into Razorpay's request by dot path, for any field the provider accepts
ResultTypeMeaning
urlstringThe link to send the customer
idstringThe provider's link id
statusstringThe link's status
amountnumberThe amount
currencystringThe currency
referenceIdstringThe reference used
expiresAtstringWhen it expires, or null
razorpay_payment_link
{
  "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"
      }
    ]
  }
}

The same as the Razorpay step, with Cashfree. Cashfree needs the customer's phone number.

ParameterTypeDescription
connectionIdstringA Cashfree connection made on the Connections page
amount … extraFieldsvariousThe same fields as the Razorpay step: amount, currency, description, referenceId, customerName, customerEmail, customerPhone, expiresIn, expiresUnit, notifySms, notifyEmail, reminders, acceptPartial, minPartialAmount, notes and extraFields
returnUrlstringWhere the customer lands after paying
paymentMethodsstringAllowed methods, such as upi,cc,dc,nb
upiIntentbooleanOpen the UPI app directlyDefault: false
notifyFlowbooleanThe link reports back to Sendiee, so a Payment trigger flow hears when it is paidDefault: true
ResultTypeMeaning
url … expiresAtvariousThe same results as the Razorpay step: url, id, status, amount, currency, referenceId and expiresAt
qrCodestringA QR code image of the link, base64
cashfree_payment_link
{
  "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

ParameterTypeDescription
methodstringGET, POST, PUT, PATCH or DELETEDefault: POST
urlstringhttps:// address on a domain name
headersarray[{ key, value, enabled }]
authobject{ 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
bodyModestringjson (body is an object), raw (body is text) or none. GET sends no bodyDefault: json
bodyobject | stringWhat to send. Values can hold {{ }} references
timeoutSecnumber1 to 60 secondsDefault: 15
failOnErrorbooleanFail the step when the answer is not 2xx. false lets you check ok and status yourselfDefault: true
ResultTypeMeaning
okbooleantrue for a 2xx answer
statusnumberThe HTTP status
bodyobject | stringThe answer as data when it is JSON: {{ steps.<id>.body.<field> }}
textstringThe answer as text
  • Credentials in auth and in headers named like Authorization or X-API-Key come back masked. See Credentials are always masked on the overview.
http_request
{
  "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

ParameterTypeDescription
logicstringAND: every rule must hold. OR: one is enoughDefault: AND
rulesarray[{ left, operator, right }]. left is usually a {{ }} reference. No rules: the yes path
ResultTypeMeaning
resultbooleantrue when the yes path was taken
matchednumber[]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"), and is_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.
condition
{
  "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

ParameterTypeDescription
onstringThe value to look at, such as {{ input.choice }}
matchModestringexact or contains. Case does not matterDefault: exact
casesarray[{ key, label, value }], at least one, keys unique. value may list alternatives separated by commas: "buy, price, order"
ResultTypeMeaning
branchstringThe key of the path taken, or default
valueanyThe value that was checked
matchedstringThe case that matched, or null
switch
{
  "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

ParameterTypeDescription
modestringdelay, until or replyDefault: delay
amountnumberdelay, and then required: how long, with unit (minutes, hours or days)
untilstringuntil, 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)
timeoutAmountnumberreply: how long to wait for the reply, with timeoutUnit (default hours)Default: 24
noTimeoutbooleanreply: wait as long as allowedDefault: false
ResultTypeMeaning
waitedbooleandelay and until: true once the run carries on
repliedbooleanreply: true when the customer replied
textstringreply: what the customer wrote
timedOutbooleanreply: 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.
wait
{
  "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

ParameterTypeDescription
assignmentsarray[{ key, value, transform, format, timezone }]. key: letters, digits and _
transformstringnone, trim, upper, lower, number, date or json_parseDefault: none
formatstringdate: the format, such as DD MMM YYYY, h:mm aDefault: YYYY-MM-DD HH:mm
timezonestringdate: the IANA time zone to show the date inDefault: UTC
ResultTypeMeaning
<key>anyEach value, also readable as {{ vars.<key> }}
  • The value now with the date transform gives the current time in the time zone you choose. Use it instead of {{ now.date }}, which is in UTC.
set_variable
{
  "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

ParameterTypeDescription
messagestringPlain words for the assistant: what happened and what to say next
dataobjectStructured result. A webhook flow with responseMode wait answers the caller with it
ResultTypeMeaning
messagestringThe message
dataobjectThe data, or null
  • In an ai_tool flow, end every path with a Reply to the AI step.
return
{
  "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 templateName must exist, in language when you give one.
  • bodyParameters must have exactly one value per blank in the message. {{1}} used twice is one blank.
  • headerParameters must 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.