> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dogebot.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Flows and triggers

> Make a WhatsApp flow and pick what starts it.

A **flow** is what your WhatsApp bot does when something happens. The thing that starts a flow is called a **trigger**.

## Make your first flow

Let's make a bot that says hello when someone writes to your number.

**1. Pick your WhatsApp number**

In the bot picker at the top of the sidebar, pick your WhatsApp number.

**2. Make a new flow**

Open **Flows** and make a new flow. Pick what starts it: **When a WhatsApp message arrives**.

**3. Add a message block**

Add the **Send a WhatsApp message** block under the first block and connect them. Type:

```text theme={null}
Hi {wa_name|there}! Thanks for your message. We will answer you soon.
```

**4. Look at the chat preview**

The builder has a **chat preview**. It shows how your message looks in WhatsApp, with backup values too.

**5. Save**

Save the flow. You see: **Flow saved. It runs on the next message to your number.** Send a message to your number from another phone. Your bot answers!

> **What the customer sees**
>
> Sam writes "Hello?". The bot answers: **Hi Sam! Thanks for your message. We will answer you soon.**
>
> If Sam has no profile name, the bot answers: **Hi there! Thanks for your message. We will answer you soon.**

## What can start a flow?

> **When a WhatsApp message arrives**
>
> Runs for **every** message: text, photos, files and locations.
>
> Good for: a hello message, or a menu.

> **When a message matches keywords**
>
> Runs when a message **contains**, **starts with** or **equals** words you choose.
>
> Example: a flow with the keyword `price` that sends your price list, and one with `hours` that sends your opening hours.

> **When someone taps a button or choice**
>
> Runs whenever someone answers your buttons or a choice list.
>
> The choice they tapped is in `{wa_choice_title}`. See [WhatsApp variables](/whatsapp/whatsapp-variables).

> **When a web request arrives**
>
> Runs when another app (a form, a shop, Zapier or Make) sends data to your number's web address.
>
> * Each field it sends arrives as `{hook_field}`. For example `{hook_phone}`.
> * Set **Send messages to** to the customer's number, usually `{hook_phone}`. This is needed because the customer did not write to you first.
>
> See [Apps and services](/whatsapp/apps-and-services).

## Example: a simple menu

**1. Trigger**

**When a WhatsApp message arrives**.

**2. Ask with buttons**

Message: `Hi {wa_name|there}! What do you need?` with three buttons: **Prices**, **Opening hours** and **Talk to a person**.

**3. Under Prices**

Send your price list.

**4. Under Opening hours**

Send `We are open Monday to Friday, 9:00 to 17:00.`

**5. Under Talk to a person**

Add **Hand over to a person**, then send `A team member will answer you here soon.`

Each button runs its own blocks. See [WhatsApp blocks](/whatsapp/whatsapp-blocks) for every block.

> [!TIP]
>
> Don't want to start from nothing? Copy a [ready-made flow](/whatsapp/ready-made-flows) and change the words.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.