Module 88: Workflow Automation
Orchestration
🏠The everyday picture
A wedding coordinator doesn't cook, decorate or play music, but makes sure each happens in the right order, follows up when the florist is late, and has a backup plan when it rains.
📘What it really is
-
Orchestration coordinates the steps of a workflow: their order, the data passed between them, decisions, retries and failures.
-
Building blocks:
- actions: call an API, write to the database, send a message, call an AI model;
- transformations: reshape data between steps (rename fields, filter, format dates);
- conditions and branches: if urgent, go one way; otherwise another;
- loops: repeat for each item in a list;
-
waits: pause for a time or for an event (a reply, an approval).
-
Reliability:
- retries with backoff for temporary failures (Module 84);
- error paths: what happens when a step fails for good (notify someone, save the item for review, a "dead letter" list);
- timeouts on every external call;
- state: record where each run got to, so failures can be resumed or investigated;
-
logs of every run with inputs and outputs (without secrets or unnecessary personal data, Module 79).
-
Where orchestration lives:
- in your own code (a job queue like BullMQ with Redis, or scheduled jobs; Module 94 goes deeper): full control, best for core business logic;
- in a workflow tool (n8n, Zapier, Make, Power Automate): fast to build, visual, many ready connectors; good for integrations between apps and for non-developers.
🖱️Try it
Draw the full orchestration for "new enquiry": trigger, each step, the data passed, every condition, what happens when the AI call fails, when the CRM is down, and when the same enquiry arrives twice. Mark which steps you'd build in your own code and which in a workflow tool.
✅Quick check
What's an error path?
Show the answer
What the workflow does when a step fails permanently, such as notifying someone or saving the item for review.
When is a workflow tool a better fit than your own code?
Show the answer
For integrations between apps that need to be built quickly and changed often, especially by non-developers.
