A workflow can start automatically from a trigger, or manually from code.
Trigger automatically
Click the trigger panel on the Start node, or click "Edit trigger", to open the "Configure bot trigger" panel. There you set when and under what conditions the workflow starts.
Available triggers
No automatic trigger: never starts on its own. You start it from code.
On conversation started: when a new conversation begins, before a ticket is created.
On ticket created: when a new ticket is created, or when an existing ticket's type is changed.
On ticket reopened: when a ticket is reopened.
On ticket closed: when a ticket is closed.
On ticket status update: when a ticket's status changes.
On no customer response (after agent message): when the customer has not replied after a delay you set.
On no agent reply: when no agent has replied after a delay you set.
On customer comment: when the customer posts a new message in a conversation. This is the one to pick if you want a customer reply to start your workflow.
On agent comment: when an agent posts a new message.
On agent note: when an agent adds an internal note.
AI based trigger: started by Kai, based on a description you write in plain language.
On AI question: when a customer asks a question in the AI Chatbar.
Workflows built on a CRM pipeline have their own two triggers instead: On entry added to pipeline and On stage changed.
Delay
"On no customer response" and "On no agent reply" add a delay setting: a number plus a unit (minutes, hours or days) that sets how long to wait before the workflow starts. The minimum is 1.
Channels
Each trigger can be limited to the channels you choose. "On conversation started" has separate toggles for Widget and Email, plus WhatsApp, Instagram, Facebook, Slack and Telegram. Every other trigger has one combined "Widget & email" toggle alongside the same messaging channels.
Audience
Choose who the workflow runs for: all people (the default), users only (signed in), or leads only (anonymous visitors). This lets you run different workflows for different groups on the same trigger.
Priority
If two or more published workflows share the same trigger, audience and channel settings, only one of them starts: the one with the highest priority number. The default is 10. If they have equal priority, one is picked at random, so give the workflow you want to win a higher number. Gleap shows a conflict warning in the trigger panel when it detects overlapping workflows.
Manually start a workflow
You can always start a workflow from code. Use the following method to do so.
Gleap.startBot("BOT_ID");Once the trigger settings are configured, click "Publish". The workflow goes live and starts automatically whenever the conditions you defined are met. Until then it stays a draft and never runs for a customer.
If you want to check a workflow before it goes live, you can run it in the messenger and watch each step in real time. See "Workflow debugging & testing before publishing".