Day 20 of 28 Β· OpenClaw Challenge
Workflows β Chaining Tools Together
β± 7 min
π Intermediate
On Day 13, you learned about multi-step tasks β one instruction, multiple actions. Today we go further: reusable workflows that trigger automatically.
A workflow is a multi-step task that you define once and the agent runs every time a condition is met.
What makes a workflow different from a one-off task?
A one-off task: "Prepare me for my meeting with Acme." The agent does it once.
A workflow: "Every time I have a client meeting, prepare a briefing 30 minutes before." The agent does it automatically, every time, forever.
Workflows are the bridge between "I have an assistant I can ask" and "I have an assistant that runs my processes."
Knowledge Check
What's the key difference between a multi-step task and a workflow?
A
Workflows cost more per execution
B
Workflows use more tools
C
Multi-step tasks are faster
D
A multi-step task runs once when you ask β a workflow runs automatically every time a trigger fires
Both involve multiple steps. The difference is reusability. A workflow is a template that triggers automatically β you define it once, and it runs every time the conditions are met.
Anatomy of a workflow
Every workflow has three parts:
Trigger β what starts the workflow ("when a client emails," "30 minutes before a meeting," "when a PR is merged")
Steps β the sequence of actions ("read the email, log it in the CRM, draft a reply, notify the account manager")
Output β what happens at the end ("send the draft for review," "post a summary in Slack")
I want to set up a workflow: when a client emails us, log it in our CRM, draft a reply, and ping the account manager on Slack.
Here's the workflow I'll create:
**Trigger**: New email from any contact tagged "Client"
**Steps**:
1. Read the email and extract key details
2. Log the interaction in your CRM (date, subject, summary)
3. Draft a reply matching your professional tone
4. Find the assigned account manager for this client
5. Send a Slack DM to the account manager with the email summary
**Output**: Draft saved in your email, Slack notification sent, CRM updated
Shall I activate this workflow?
Client email workflow activated β
I'll handle every client email automatically from now on. You'll see drafts in your inbox ready to review and send.
β» Replay conversation
Knowledge Check
In the client email workflow, how many different tools does the agent use?
B
It doesn't use tools β it just sends notifications
C
Four β email (read + draft), CRM (log), contact lookup (find account manager), and Slack (notify)
D
Two β email and Slack
The workflow chains four tool integrations: email for reading and drafting, CRM for logging, contact data for finding the account manager, and Slack for notifications. One trigger, four coordinated actions.
Real workflow examples
Here are workflows that OpenClaw users build:
New hire onboarding: When HR creates a new employee record β agent sets up their email, adds them to Slack channels, schedules intro meetings with their team, and sends a welcome packet.
Bug response: When a monitoring alert fires β agent checks the logs, identifies the likely cause, opens a GitHub issue, and pings the on-call engineer.
Weekly reporting: Every Friday at 4pm β agent collects data from your project tools, generates a progress report, and emails it to stakeholders.
Invoice processing: When an invoice PDF arrives via email β agent reads the invoice, extracts the amount and due date, logs it in your accounting spreadsheet, and sets a payment reminder.
Knowledge Check
What's the common pattern across all these workflow examples?
A
They all require developer skills to set up
C
They all run on a schedule
D
They all have a trigger, a series of automated steps, and a defined output
Every workflow follows the same pattern: something triggers it, a series of steps execute automatically, and there's a clear output. The trigger, steps, and output vary β but the structure is always the same.
Building workflows that last
A few tips for creating workflows that keep working reliably:
Start simple β build a 2-step workflow first. Add steps after you verify it works.
Add error handling β what should happen if the CRM is down? If the Slack message fails? Build in fallbacks.
Review regularly β check your workflow logs weekly. Are they firing correctly? Are the outputs still relevant?
Keep humans in the loop β for high-stakes workflows (sending to clients, processing payments), always require human approval before the final step.
Final Check
You're building a workflow that sends invoices to clients. Should you include a human approval step?
A
Only if the invoice is above $1,000
B
No β the whole point of automation is removing humans from the process
C
Yes β sending financial documents to clients is high-stakes and should require human review
D
Only the first time β then let it run fully automated
High-stakes actions (client communications, financial documents, code deployments) should always include a human review step. Automation handles the prep work β you handle the final approval. That's the right balance of speed and safety.
βοΈ
Day 20 Complete
"Workflows run your processes automatically. One trigger, many steps, zero manual effort."
Tomorrow β Day 21
When Things Go Wrong
Agents aren't perfect. Let's learn how to handle errors, retries, and edge cases gracefully.