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

# Workflows

Workflows are automated sequences that Kafka executes autonomously when triggered by an event.

<img src="https://mintcdn.com/brainbaselabs/exQYSXSDcC6isRCT/images/Workflow%20Editing.gif?s=8a069850b0d7355dd4a6e62f8aab4813" alt="Creating a workflow in Kafka" className="rounded-lg border border-gray-200 dark:border-gray-800" width="1144" height="720" data-path="images/Workflow Editing.gif" />

## How Workflows Work

Every workflow has two parts:

1. **Trigger** — What starts the workflow (time-based, app-based, or webhook-based)
2. **Instructions** — What Kafka does once triggered

Once activated, Kafka executes your instructions automatically without manual intervention.

## Trigger Types

**Time-based**

```text theme={null}
Daily at 9am
Every Monday at 10am
Hourly between 9am-5pm
```

**App-based**

```text theme={null}
When email arrives in Gmail
When new candidate added to Greenhouse
When Slack message contains keyword
```

**Webhook-based**

```text theme={null}
When external API call received
When form submitted on website
When payment processed
```

## Example Workflow

```yaml theme={null}
name: Daily Inbox Call
trigger: daily at 9 am

Content:
1. Scan through my email using @gmail for all emails in the last day
2. Summarize everything and the most important ones to call
3. Call me at [number], informing me of everything.
```

This workflow runs every morning, scans your inbox, and calls you with a summary — completely autonomously.

## Best Practices

**Start simple**
Begin with single-action workflows before building complex multi-step processes.

**Be specific with triggers**
"When email from [client@company.com](mailto:client@company.com) arrives" is better than "When email arrives."

**Test before deploying**
Run workflows manually first to verify they work as expected.

**Monitor and iterate**
Check workflow execution history and refine based on real performance.

**Use integrations**
Reference tools with `@gmail`, `@slack`, `@clickup` to connect workflows to your systems.

## When to Use Workflows

Use workflows for:

* **Recurring tasks** — Daily summaries, weekly reports, monthly cleanups
* **Event responses** — Auto-reply to emails, notify on form submissions
* **Data syncing** — Keep systems in sync automatically
* **Scheduled actions** — Send reminders, generate reports, run backups

Don't use workflows for:

* One-off tasks (just ask Kafka directly)
* Complex decision-making requiring human judgment
* Tasks that need real-time human collaboration (use Playbooks instead)
