# Connect chat-triggered workflows

> Handle incoming Slack and WhatsApp messages with workflows and send replies through the right connection.

Incoming messages start workflows. Configure processing and replies explicitly; connecting a channel alone does not assign an assistant.

## Before you begin

You need owner or dashboard editor access to configure account connections and workflows. Slack installation appears only when Botchi has enabled its distributable Slack app. WhatsApp Business requires your own Meta app and production setup.

## Reply in Slack

1. Open **Tools**, select **Add tools**, then install **Slack** into your Slack workspace.
2. Create a workflow with **Slack — mention or direct message** or **Slack — /botchi command** as its event trigger.
3. Declare inputs for the reply channel and optional thread.
4. Map those inputs to **Reply channel** and **Thread** in the trigger's **Data** section.
5. Add an agent step if you want an agent to handle the message.
6. Add a slack.sendMessage step using those reply inputs.
7. Select the account connection on the sending step.
8. Filter the event trigger to the same connection.

Agent Slack tools can also list channels, read messages and send independently of these incoming workflows.

## Reply in WhatsApp

1. Connect your Meta app, webhook and account credentials using [social channel setup](/en/docs/tools/social-channels).
2. Create a workflow with **WhatsApp — message received** as its event trigger.
3. Declare an input for the sender's number.
4. Map it to **Reply address** in the trigger's **Data** section.
5. Select that input as the recipient on the sending step.
6. Choose the account connection for sending.
7. Filter the trigger to that connection, especially if you have several numbers.

Use numbers such as 393331234567, without a leading +. WhatsApp agent tools send messages; incoming messages are handled by workflows.

Free-form messages work within Meta's customer-service window. Outside it, use an approved template.

## Submit a WhatsApp template

Ask an agent connected to WhatsApp to submit a template. Supply its message, language, purpose and sample values for placeholders. The connection needs the WhatsApp Business Account ID.

Ask the agent to check the template's status afterward. Submission does not start automatic monitoring; wait for APPROVED before sending.

> **Watch out** — Meta controls business verification, number registration, production permissions and template approval. A submission from Botchi is not approval.

## Check the workflow identity

> **Rule** — Chat-triggered workflows run as their last editor and spend the account's shared Sparks. A mapped Slack member ID is event data, not a permission grant.

To restrict Slack senders, filter that event data with a **Condition** and leave the false lane empty.

## Related

- [Workflow triggers](/en/docs/workflows/triggers)
- [Social channels](/en/docs/tools/social-channels)
- [Connected accounts](/en/docs/tools/connected-accounts)
