Enable Chat on a Workflow
Add the New Chat Request trigger so a workflow can be started as a chat and responds to messages.
Coming soon
A workflow becomes chat-enabled when its trigger is New Chat Request. This is the canonical chat trigger: it's a webhook that runs the workflow synchronously and hands it a message, a conversation id, and any attachments.
Add the trigger
- Open the workflow in the Workflow Editor.
- Add or replace the trigger — choose New Chat Request from the trigger palette.
- Configure the Mode (see below).
- Save and deploy.
Once deployed, the workflow becomes selectable as a workflow chat: in Enterprise Edition it appears
under the Workflows cascade of the AI Hub composer's provider popup, labelled
project — workflow; in Community Edition it appears on the standalone Chats page, grouped under
its project.
The request shape
The New Chat Request trigger receives a JSON body shaped like:
{
"conversationId": "a stable id for the conversation",
"message": "the user's text",
"attachments": [
{"file_entry": {}}
]
}conversationIdties successive turns together so the workflow (and any chat memory) can keep context across messages.messageis the user's text for this turn.attachmentscarries any files the user uploaded (see Start a workflow chat).
Because the trigger runs synchronously, whatever the workflow returns becomes the reply shown in the chat.
Hosted vs. embedded
The trigger's Mode decides where the chat is consumed:
| Mode | Behavior |
|---|---|
| Hosted Chat (default) | ByteChef provides the chat UI — the workflow is listed in the AI Hub composer's Workflows cascade (and on the Community Edition Chats page). Nothing else to build. |
| Embedded Chat | The workflow is hidden from those listings; you invoke its webhook from your own interface. |
Pick Hosted Chat when you want ByteChef to provide the chat UI, and Embedded Chat when you're building the front end yourself and just want the trigger contract.
Workflows with multiple triggers
A workflow can have more than one trigger — for example a New Chat Request trigger and a Slack trigger on a specific channel. When a user picks the workflow from the Workflows cascade, the chat is bound to the chat trigger specifically. Other triggers on the same workflow keep firing independently from their own sources.
Other webhook triggers
Hosted workflow chats are calibrated for the New Chat Request trigger and its
{ message, conversationId, attachments } body. A workflow built on a different webhook
trigger can still be invoked, but the trigger must accept that same body shape (or read
the equivalent keys from its parameters) for the message to reach the workflow.
How is this guide?
Last updated on