ByteChef LogoByteChef
PlatformAutomationBuildAI HubWorkflow Chats

Enable Chat on a Workflow

Add the New Chat Request trigger so a workflow can be started as a chat and responds to messages.

A workflow is chat-enabled when its trigger is the Chat component's New Chat Request trigger. This trigger is a static webhook that runs the workflow synchronously and passes it a message, a conversation ID, and any attachments.

Add the trigger

  1. Open the workflow in the Workflow Editor.
  2. Add or replace the trigger: select Chat > New Chat Request.
  3. Set the Mode (see Hosted vs. embedded).
  4. Build the rest of the workflow so that its last step returns the reply, for example an AI Agent step or the Chat component's Response to Chat Request action.
  5. Deploy the project and enable the workflow in the target environment.

With Hosted Chat mode, the deployed workflow appears on the Chats page, grouped under its project.

Trigger reference

Properties

PropertyTypeDefaultDescription
ModeSelectHosted ChatHosted Chat uses the ByteChef chat interface. Embedded Chat requires your own chat interface.

Output

FieldTypeDescription
conversationIdString (required)A stable ID for the conversation. Successive turns with the same ID share context, for example in chat memory.
messageStringThe user's text for this turn.
attachmentsArray of filesFiles the user attached (see Attachments). Empty when there are none.

The hosted Chats page and the @bytechef/chat widget send these fields as a multipart/form-data request to /webhooks/<id> (or /webhooks/<id>/sse for streamed replies). Because the trigger runs synchronously, the workflow's result becomes the reply shown in the chat.

Hosted vs. embedded

ModeBehavior
Hosted Chat (default)ByteChef provides the chat UI: the workflow is listed on the Chats page.
Embedded ChatThe workflow is not listed on the Chats page. Your own interface calls its webhook.

Select Hosted Chat when ByteChef should provide the chat UI. Select Embedded Chat when you build the front end yourself.

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. The Chats page binds the chat to the New Chat Request trigger. The other triggers keep firing from their own sources.

Other webhook triggers

The Chats page lists only workflows with a New Chat Request trigger in Hosted Chat mode. A workflow built on a different webhook trigger can be called from your own interface, but that trigger must accept the same message, conversationId, and attachments fields for the message to reach the workflow.

How is this guide?

Last updated on

On this page