Building Multi-Step AI Workflows
أعجبك هذا الفيديو؟ تابع دروس الذكاء الاصطناعي المجانية الجديدة على YouTube.
اشتركSo far, each automation has used a single AI call. In this lesson, you will learn to chain multiple AI steps together to handle more complex tasks. Multi-step AI workflows are where no-code automation becomes truly powerful.
Why Chain Multiple AI Steps?
A single AI call handles one task well. But many real-world workflows need the AI to:
- Analyze the input first
- Decide what to do based on the analysis
- Generate different outputs for different scenarios
Trying to do all of this in one prompt often produces inconsistent results. Breaking it into steps gives you better control and reliability.
Pattern: Classify Then Act
The most common multi-step pattern is classify then act. The first AI call categorizes the input, and subsequent steps handle each category differently.
Example: Smart Customer Support Router
Step 1 (AI - Classify):
Classify this customer message into exactly one category:
- BILLING
- TECHNICAL
- SALES
- SPAM
Respond with only the category name.
Step 2 (Router/Filter):
- If response contains "BILLING" → go to billing path
- If response contains "TECHNICAL" → go to technical path
- If response contains "SALES" → go to sales path
- If response contains "SPAM" → stop (no action)
Step 3 (AI - Generate Response): Each path has its own AI call with a specialized prompt:
- Billing path: "You are a billing specialist. Draft a response about..."
- Technical path: "You are a tech support agent. Draft a response about..."
- Sales path: "You are a sales representative. Draft a response about..."
Building the Smart Router in Zapier
Step 1: Email Trigger
- Trigger: Gmail → "New Email"
- Filter out automated emails (as learned in the email lesson)
Step 2: Classify with AI
- Add OpenAI → "Conversation"
- System prompt:
You are an email classifier. Classify the email into exactly one category.
Respond with ONLY the category name in uppercase:
BILLING, TECHNICAL, SALES, or SPAM
- User message: Map the email body
- Temperature: 0.0 (deterministic classification)
- Max Tokens: 10
Step 3: Add Paths
- Add Paths by Zapier (available on paid plans)
- Path A: Condition: OpenAI response exactly matches "BILLING"
- Path B: Condition: OpenAI response exactly matches "TECHNICAL"
- Path C: Condition: OpenAI response exactly matches "SALES"
Step 4: Add Specialized AI to Each Path
In Path A (Billing):
- Add OpenAI → "Conversation"
- System prompt: "You are a billing support specialist for a SaaS company. Draft a helpful response addressing the customer's billing concern. Be empathetic and provide clear next steps."
- Map the original email body as the user message
In Path B (Technical):
- Add OpenAI → "Conversation"
- System prompt: "You are a technical support engineer. Draft a response that acknowledges the issue, asks clarifying questions if needed, and provides initial troubleshooting steps."
In Path C (Sales):
- Add OpenAI → "Conversation"
- System prompt: "You are a sales development representative. Draft a warm response that addresses the prospect's interest, highlights key product benefits, and suggests a meeting."
Step 5: Deliver the Responses
Each path ends with a delivery action:
- Save as Gmail draft
- Post to a Slack channel specific to that team
- Create a ticket in your support system
Building the Smart Router in Make
Make's visual canvas is ideal for multi-step workflows because you can see all the paths at once.
The Visual Layout
[Gmail] → [AI Classifier] → [Router] → [AI Billing] → [Slack #billing]
→ [AI Technical] → [Slack #tech-support]
→ [AI Sales] → [Slack #sales]
Step-by-Step
- Gmail module: Watch Emails
- OpenAI module: Classify the email (temperature 0.0)
- Router: Add three paths
- Filter on each path:
- Path 1: Result contains "BILLING"
- Path 2: Result contains "TECHNICAL"
- Path 3: Result contains "SALES"
- OpenAI module on each path: Generate a specialized response
- Slack module on each path: Post to the appropriate team channel
Pattern: Enrich Then Summarize
Another powerful pattern processes data in two passes.
Step 1 (AI - Enrich): Extract structured data from unstructured input Step 2 (AI - Summarize): Create a human-readable summary from the structured data
Example: Meeting Notes Processor
Step 1 prompt:
Extract the following from these meeting notes:
- ATTENDEES: [list of names]
- DECISIONS: [numbered list of decisions made]
- ACTION_ITEMS: [numbered list with owner and deadline]
- OPEN_QUESTIONS: [list of unresolved items]
Respond in the exact format above.
Step 2 prompt:
Write a brief meeting summary email (under 100 words) from this structured data.
Include the key decisions and action items. Use a professional but friendly tone.
Start with "Hi team," and end with "Let me know if I missed anything."
The first AI call structures the data reliably. The second AI call turns it into polished communication.
Error Handling in Multi-Step Workflows
When you chain AI calls, each step can fail. Here is how to handle errors:
In Zapier
- Add a Filter after each AI step to check that the response is not empty
- Use Paths to create a fallback: if the classifier returns something unexpected, route to a "manual review" path
In Make
- Right-click any module and select "Add error handler"
- Choose "Resume" to continue with a default value
- Choose "Ignore" to skip the rest of the path
- Choose "Break" to stop the scenario and retry later
Best Practices
- Validate classifier output - Check that the AI returned one of your expected categories
- Set a fallback category - "If none of the paths match, route to GENERAL"
- Log unexpected responses - Add a step that saves unexpected AI outputs to a spreadsheet for review
- Use low temperature for classifiers - Temperature 0.0 gives the most consistent classifications
Key Takeaways
- Multi-step workflows use multiple AI calls, each handling one specific task
- The "classify then act" pattern is the most versatile: categorize first, then route to specialized prompts
- Use temperature 0.0 for classification steps and 0.3-0.5 for response generation
- Make's visual canvas is excellent for building and visualizing branching workflows
- Always add error handling and fallback paths for production automations
التالي · الدرس 8 من 8
Best Practices and Next Steps
قراءة 6 دقيقة
أنهيت 7 من 8 درسًا

اسأل Byte عن هذا الدرس
محادثة خاصة حول هذا الدرس. قرأ Byte الدرس كاملًا، ويجيب خلال ثوانٍ، ويُظهر القسم الذي تأتي منه كل إجابة. يمكنك السؤال بأي لغة.
الأسئلة والأجوبة
أسئلة عامة حول هذا الدرس. يجيب AI Tutor فورًا بلغتك، ويراجع فريق FreeAcademy الإجابات، ويمكن لكل المتعلمين قراءتها.

