Building workflow steps: actions, conditions, waits and AI steps

Once the trigger fires, the workflow runs its steps. A step can create a ticket, check a value, wait for a reply or ask AI to read a chat. You can mix the four types of step in any order.
StepWhat it doesExample
ActionDoes one task in tawk.to or in another appCreate a deal, send an email, post to Slack
ConditionChecks your data and picks the next stepContinue only if the chat has the tag lead
WaitPauses the run for a set time, or until something happensWait 5 minutes for an agent to reply
AI stepFollows instructions that you write in plain languageSummarize why the customer is unhappy

Before you start

Add, move and remove steps

  • Add the first step: under the trigger, click Action, Condition, Wait or AI step.
  • Add a step after another step: click Add step below it, then select the type of step.
  • Edit a step: click the step in the outline. Its settings open on the right.
  • Move a step: drag the handle (⋮⋮) on the left of the step.
  • Delete a step: click the trash icon of the step.
Steps are numbered and run from top to bottom, unless a Condition sends the run to another step. An orange dot marks a step that still needs setup.

Actions

An action does one task: it creates a record, sends a message, changes a record or calls another app. To set one up, select a Category, then an Action.

You can leave fields marked optional empty. Most text fields accept live details from the run, such as the visitor's email or the new ticket number. See Using runtime data in workflows.

This table shows where each action is in the Category list:
CategoryActions
CommunicationSend email · Send SMS · Send WhatsApp message · Reply to inbox conversation · Create ticket · Send Slack notification · Fetch conversation
PipelineCreate card · Update card fields · Move card to stage · Archive card · Delete triggered card · Delete created card
ActivitiesCreate activity · Update activity · Complete created activity · Delete created activity
ContactsUpdate contact fields · Update organization fields · Add note to contact · Add note to organization
KnowledgeCreate FAQ · Create shortcut · Update shortcut · Create Knowledge Base article · Update Knowledge Base article · Update table field
FeedbackAdd issue in Feedback · Update issue in Feedback · Add issue to Roadmap · Move issue to Roadmap stage · Add issue to Changelog · Find Feedback issues
PublishPublish to Changelog
Developer toolsHTTP request
Connected appsRun connector tool
The sections below group the actions by the job they do.

Send a message

  • Send email sends from a connected property inbox. In To, CC and BCC, put commas between addresses.
  • Send SMS sends from a connected Twilio inbox. Include the country code in the phone number, for example +14155550123.
  • Send WhatsApp message starts a conversation with an approved WhatsApp template.
  • Reply to inbox conversation replies in the conversation, through that conversation's inbox.
    • An email reply answers the email that started the workflow, so the workflow needs the Inbound message received trigger. To email other people, use Send email.
    • On WhatsApp, a text reply works only within 24 hours of the customer's last message. After that, reply with a WhatsApp template.
  • Send Slack notification posts to a Slack channel through an incoming webhook. You must connect the webhook before you can save the workflow. See Sending Slack alerts with workflows.

Create a record

  • Create ticket creates a ticket and, by default, emails the requester. To stop this email, turn off Notify requester by email. Your team still gets the usual new-ticket notification. See Adjusting mail notifications.
  • Create card adds a card (a deal) to a pipeline. Create activity adds an activity, such as a follow-up task. For a full example, see Creating deals from chats with workflows.
  • Create FAQ, Create shortcut and Create Knowledge Base article add an FAQ, a public property shortcut or an article in a Knowledge Base site.
  • Add issue in Feedback adds an issue to your Feedback board.

Change or remove a record

Some actions work on a record that already exists. In Card or Activity, you choose which one:
  • The card that triggered this run, if the workflow starts from a Pipeline event
  • a card from your pipelines
  • a card or activity that an earlier step in the same run created
This applies to Move card to stage, Archive card, Complete created activity and Delete created activity.

Delete created card works only on a card that an earlier step in the same run created. In Created record from step, select that step. Delete triggered card deletes the card that started the run.

Move card to stage can move any card, not only one that an earlier step created.

The other update actions change fields on a card, activity, contact, organization, shortcut, Knowledge Base article, Feedback issue or table record. Add note to contact and Add note to organization add an internal note.

Note: Update Knowledge Base article replaces the article's whole body, including images and tables, with the text that you give it.

Read data for later steps

  • Fetch conversation reads the transcript of a conversation into the run, so that a later AI step can read it. You cannot put the transcript straight into a ticket or a message. To send it, ask an AI step to copy it, then use the AI step's answer.
  • Find Feedback issues finds the issues that match your criteria. Under Match issues where, click Add criterion. You can match on Status, Category, Board, Roadmap column, Tags, Date, Minimum votes, Approval and Not in a changelog yet.
    • Maximum issues can be from 1 to 100. If you leave it empty, the maximum is 50. Issues over the limit wait for the next run.

Publish product updates

Publish to Changelog creates a changelog entry from a Title, a Summary and a Body. In Linked issues, use the issue IDs from an earlier Find Feedback issues step. In Publishing, select Save as a draft or Publish right away.

Together with an AI step, these two actions can write your product updates for you: find the issues you shipped, have AI write the entry, then save it as a draft for review.
Important: Publish right away moves the linked issues to your completed status. It also emails everyone who follows them.

Call another app

  • Run connector tool runs one tool from an app that you have connected in Integrations, for example Shopify. The list is empty until you connect an app.
  • HTTP request calls any public API, for example your store's order API.
    • Select the Method (GET, POST, PUT, PATCH or DELETE). Add Headers and a JSON body if the API needs them.
    • To send an API key, add a header and select Secret. tawk.to stores the value securely and sends it only to https:// URLs.
    • By default, the step fails if the response code is outside 200 to 299. To keep the run going, turn on Continue even if the request fails. A later Condition step can then check the status.
    • Runtime data in a URL is not URL-encoded. If a value can contain spaces, ? or &, encode it first.
    • In the JSON body, put each {{ }} value inside quotation marks, for example {"text": "{{trigger.name}}"}. tawk.to inserts the value safely, even when it contains quotation marks or line breaks.
For apps that have no step of their own, these guides show a ready-made HTTP request: Posting to Microsoft Teams with workflows, Adding leads to Notion with workflows and Creating ClickUp tasks with workflows.

Conditions

A Condition step checks your data and decides which step runs next. Use it when the workflow should act only in some cases, for example only for chats tagged lead, or only for deals worth more than 1,000.
  1. Add a Condition step.
  2. In the IF branch, select All conditions match or Any condition matches.
  3. Add one or more conditions. Each condition has a field, an operator and a value.
  4. In Then go to, select the next step for this branch, or End workflow.
  5. To add an ELSE IF branch, click Add branch.
  6. In ELSE, use Otherwise go to to select what happens when no branch matches.
In the outline, the steps of each branch show under their IF, ELSE IF or ELSE label.

Act on one tag

The Chat tagged trigger fires for any tag, and its filter cannot pick one tag. To act on one tag only, make a Condition the first step: Chat · Tags contains lead. In ELSE, select End workflow.

For more about triggers and their filters, see Choosing what triggers a workflow.

How branches are checked

  • The workflow checks the branches from top to bottom and takes the first one that matches.
  • The operators and values that you can select depend on the field.
  • The value can be a Fixed value that you type, or Runtime data. For runtime data, enter one reference on its own, for example {{trigger.card.value}}.
  • If your field is not in the list, for example the answer of an AI step, select Advanced field path. Then select Custom path… and type the path, for example nodes.classify.output. Also set the Value type: Text, Number or Yes or no.

Waits

A Wait step pauses the run. Select a Wait type.

Delay for a period of time

The run pauses for a fixed time (seconds, minutes, hours or days), then continues. For example, wait 90 days after a deal is lost, then create a win-back task.

Wait for an event

The run pauses until something happens, up to a time limit. With this you can build rules like "If nobody replies in 5 minutes, alert the team."
  1. Select the Product area and the Event, for example Omnichannel Inbox > Outbound message sent.
  2. In Record to wait for, select the record. Usually this is the record that started the run, for example The triggering Omnichannel conversation. To continue on this event for any record in your property, select Any record.
  3. Set Timeout after, for example 5 minutes.
  4. Optional: to continue only for some events, for example replies from an agent, select Only continue when the arriving event matches conditions.
  5. Under If nothing arrives before the timeout, select a step, End workflow or End the run as timed out.
The outline then shows two routes: Event arrives and Nothing arrives. Steps on the Nothing arrives route cannot use the event's data, because the event never came.

AI steps

An AI step reads what you point it at and follows your instructions. It can rate a lead, summarize a chat, sort an issue or draft a message. Later steps use its answer.

Before you start: AI steps need AI Assist turned on, the add-on active and AI credits available. If any of these is missing, the builder shows a warning on the step, and the step fails when it runs.
  1. Add an AI step.
  2. In Instruction, say what to do, where the data is and how to format the answer.
  3. Optional: select a Model. Workflow default suits most tasks. Each model shows its credit price.
  4. Optional: set a Step limit. This is the most model calls the step can make before it must answer. The default is 25.
  5. Optional: under Tools, select what the AI can use: Call public APIs, Send Slack notifications, Read conversations or tools from your connected apps under Connectors.

What an AI step costs

The step shows an Estimated cost per run, for example ≈ 3 credits per run. Each started block of 8 model calls costs the model's credit price, so a run that makes more calls costs more.

Output fields

By default, an AI step gives one text answer. Output fields give you named values instead, for example a title, a summary and a category, so that later steps can use each one on its own.
  1. In the AI step, click Add output field.
  2. Type a name for the field, for example title.
  3. Select a type: Text, Number or Yes or no.
  4. Tell the AI what to put in the field.
  5. Select Required if the AI must always give this value.
  6. Optional: set a Max length, or a list of allowed values, for example new, improvement, fix.
Note: A step with output fields makes one model call and cannot use tools. To give the step tools, remove its output fields.

Write instructions that work

  • Say where the data is. For example: "The chat transcript is in nodes.fetch_chat.output." The runtime data guide lists the paths.
  • Ask for a fixed format. For example: "Start your reply with INTENT=HOT, INTENT=WARM or INTENT=COLD." A Condition can then check if the answer contains INTENT=HOT. If the step needs no tools, an output field with allowed values does the same job.
  • Set a length limit when the answer goes into a Slack message or a task, for example "3 sentences or fewer".
  • Give each AI step one job. Several short AI steps give better results than one long instruction.

Fix errors before you save

The builder checks the workflow when you save. These are the messages you can see, and what to do:
MessageWhat to do
Add at least one step before saving.Add a step under the trigger.
Step N: fill in the required action fields.Open the step and fill in the fields that are not marked optional.
Step N: the AI step needs instructions.Write an Instruction for the AI step.
Step N: an AI step with output fields can't use tools.Remove the tools or the output fields.
Step N: every branch needs at least one complete condition.Complete each condition (field, operator and value), or remove the branch.
Step N is unreachable.No route leads to this step. Point a Then go to at it, or remove it.
Step N creates a routing cycle.The steps make a loop. Change the next step of one of them.
Step N uses runtime data that is not available on every route to that step.The step uses data from a step that does not always run before it. Move the step, or use data from a step on every route.
No Slack destination is configured.Connect a Slack webhook to the Slack step, or remove the step.
When a saved workflow fails during a run, the run shows where and why. See Testing, monitoring and troubleshooting workflow runs.

Related guides


Have a question we haven't covered or need support?

Was this article helpful?

0 out of 0 liked this article

Still need help? Message Us