Build a workflow

Automate replies, routing and publishing with triggers, logic and actions, then test and publish safely.

On this page
  1. How a workflow is put together
  2. Create a workflow
  3. Outline or canvas
  4. Tell people outside the inbox: Send email and Post to a channel
  5. The AI Agent step
  6. Ask a person: Request approval
  7. Test before you go live
  8. Save draft or Publish
  9. Versions and run history
  10. Messaging rules to keep in mind

A workflow is an automation that runs on its own when something happens: a message arrives, someone comments, a lead comes in or a timer fires. You build it on a canvas, test it and publish it.

New to workflows? Start with Workflows in 5 minutes: it builds a first one step by step.

Workflows live under Workflows in the sidebar. To build and change them you need Build & edit workflows (workspace owners and managers have it by default). See Team members, roles and access.

How a workflow is put together

Every workflow is a chain of blocks, in three groups:

  • Triggers start the workflow, for example New message, New comment, Lead form submitted, Post published, Inbound webhook, Schedule or Manual.
  • Logic decides where to go next: Condition / branch, Split (A/B), AI classify, Wait for reply, Delay / wait, Go to step and Request approval.
  • Actions do the work, for example Send message, Send WhatsApp template, Assign agent / team, Add tags, Notify team, Send email, Post to a channel, HTTP request, Create draft post and AI Agent.

Some triggers watch your publishing and accounts for you:

  • Post performs well / poorly starts when a published post reaches a number of likes, comments, shares, views, engagements or an engagement rate within the hours you choose, or is still below it when that time is up. It uses the numbers your analytics already sync, so it can start up to a few hours later, and it runs once per post and account.
  • Approval is taking too long starts when a post has waited for approval longer than the hours you set since it was last submitted. It runs once per submission.
  • Account needs attention starts when a connected account needs reconnecting, its login is expiring, it is disconnected, or its analytics need reconnecting.
  • New AI insight starts when AI insights for your analytics are written or rewritten, so you can share the headline with your team or a client.

The Start block controls who can enter (Target users) and When the same contact triggers it again, for example Only once per contact, ever.

Create a workflow

  1. Go to Workflows and click Create workflow, or start from a template.
  2. Type a name in the box at the top.
  3. Click Blocks to open the list. Search for a block and add a trigger.
  4. Add the next steps and connect them in order. Click any block to change its settings.
  5. In text fields, use Insert variable to add details such as {{contact.first_name}}.

Many action steps have two exits: Next and If it fails. Connect If it fails to a fallback such as Notify team.

Outline or canvas

The switch above the workflow shows it two ways:

  • Canvas: the blocks and their connections. Drag, connect and arrange steps here.
  • Outline: the steps as a list, in the order a run goes through them: Start, the triggers, then each step with a short summary. Branches, such as a condition's paths, an approval's Approved / Rejected / Timed out or If it fails, are indented under the step they come from. A badge shows a step's errors or warnings. Tap a step to change its settings, or Add a step to add one at the end.

On a phone the builder opens on the outline, because the canvas is small there. Switch to Canvas to connect or move steps; your phone remembers the choice. Steps that aren't connected yet are listed under Not connected yet.

Tell people outside the inbox: Send email and Post to a channel

Send email emails a Subject and Text (both can use variables) from the app's email address. Choose who gets it:

  • Teammates: people, inbox teams, roles such as Managers, or The conversation's assignee / The post's owner. Clients and viewers never get it.
  • Other email addresses: fixed addresses, separated by commas. Variables aren't allowed here.
  • Also email the contact: the contact's saved email address.

Each person gets their own copy. Contacts who opted out of messages or whose data was erased are never emailed, even when their address is typed in. One step sends to at most 20 people. A workspace's workflows can send 100 emails an hour. The step fails, and If it fails runs, when nobody can be emailed or the limit is reached. With white-label branding on, the email carries your agency's name.

Post to a channel posts a Title and Text to one of the workspace's Slack, Microsoft Teams or webhook destinations, whatever events that destination follows. Workspace owners and managers set the destinations up under Workspace Settings → Notifications. If a destination has customer previews turned off, customer details from variables are left out of the message.

Dry run never sends emails or channel posts.

The AI Agent step

AI Agent lets an AI do a task inside the workflow. You set:

  • Instructions: what the agent should do. Be specific.
  • What it works on: the text it reads (empty = the incoming message). It is treated as data, never as instructions.
  • Result: Only save variables, or Send a reply and save variables (this needs a conversation).
  • Output fields: each field becomes {{vars.<name>.<field>}} for later steps, for example a Condition / branch.
  • Tools: Search the web, Open web pages, Read the contact, Add a Google Sheets row and Create / update a HubSpot contact.

Tools that change something are blocked unless you tick Run without asking for them. Or turn on Ask a person before blocked actions run: the workflow then pauses and asks an approver first. Organization owners and admins decide which connected-app tools each workspace may use under Workflows → Integrations → App tool access.

The step uses AI credits. Without AI, or with no credits left, it fails and If it fails runs. See AI Employees and AI settings.

Ask a person: Request approval

The Request approval step pauses the workflow until someone decides. Set a Title, a Message, What's being approved, the Approvers, Time out after (minutes) (5 minutes to 7 days) and, if you like, Remind approvers every (minutes). The step has three exits: Approved, Rejected and Timed out.

Approvers are notified and decide on Workflows → Approvals, on Home or in the inbox conversation, with Approve or Reject.

When an approver is on time off with a delegate (see Teams, routing, SLAs and CSAT), the delegate is notified too and can decide for them while the time off lasts. The delegate must be allowed to approve here: an approver of the same step, or someone who can approve posts or manage workflows in this workspace. The card and the activity log show who decided for whom.

Test before you go live

  • Dry run tests the canvas as it is now, even unsaved, against a sample event. Nothing is sent, no contact changes and there's no waiting.
  • Run now runs the saved, active workflow for real. Only Manual triggers fire. Under Run on, pick No conversation, A conversation or A contact's latest conversation.
  • The problems button at the top shows errors and warnings, or No problems. Click a problem to jump to its step.

Save draft or Publish

What you edit is a draft. What runs is the published version.

  • Save draft (Ctrl/⌘+S) saves your edits without changing what runs. The draft is also saved automatically a few seconds after you edit.
  • Publish turns the draft into a new version and puts it live. Add a note under What changed? (optional). Errors must be fixed first. Warnings ask you to tick I've checked these — publish anyway. Publishing a workflow that is off also switches it on.
  • The pill under the name shows Not published, Live: v3 or Live: v3 · draft has changes.
  • The switch next to Save draft pauses the workflow and turns it back on.

Runs already waiting on a delay or a question finish on the version they started on.

Versions and run history

Click History to see every published version. You can View one, compare it with the version before, or Restore it into the draft (nothing goes live until you publish). To throw away draft edits, choose Discard unpublished changes under More actions (⋯).

Click Runs to see recent real runs; open one to see which steps ran and where it stopped.

Messaging rules to keep in mind

  • On Messenger, Instagram and WhatsApp Business (Cloud API) you can only send free-form messages within 24 hours of the customer's last message.
  • Outside that window, WhatsApp only accepts an approved template, so use Send WhatsApp template.
  • Automated messages can't use Meta's 7-day Human Agent extension; that is only for replies a person writes.

Your plan may limit how many workflows a workspace can have. See Plans and billing.