Week 5 • Lesson 6 of 8 • 65 mins

Advanced Workflows: Conditional Logic & Routers

Building smart automations that make decisions based on data.

Smart Workflows: Making Decisions

Basic automations follow linear paths. Smart automations make decisions — this is where automation becomes truly powerful.

1. The Router Concept

A router splits your workflow into different paths based on conditions:

IF [Condition] THEN → Path A
ELSE IF [Condition] THEN → Path B
ELSE → Path C

Example — Customer Feedback Router:

  • Branch A (Sentiment score > 8 AND contains "love"): → Add to Case Study collection + send thank-you email
  • Branch B (Sentiment score < 3 OR contains "angry"): → Alert manager in Slack immediately + create high-priority ticket
  • Branch C (Everything else): → Add to weekly review spreadsheet

The Router Build in Make.com:

  1. Add a "Switch" module after your AI sentiment analysis
  2. Add routes for each condition (equal to / contains / greater than / etc.)
  3. Connect different actions to each route
  4. Add a "default" route for anything that doesn't match

2. The Loop Pattern

When you need to process multiple items (rows, files, records) one by one:

  • Iterator: Take an array of items and process each one
  • Aggregator: Collect results from multiple iterations back into one output

Example — Process 50 leads from a sheet:

  1. Watch for new row in Google Sheet
  2. Iterator: Get all rows where Status = "Pending"
  3. For each row: AI research company → AI draft email → Add to Slack approval queue
  4. Aggregator: Update all processed rows to "Processed" status

3. The Filter Pattern

Only continue if conditions are met:

  • Filter: Only proceed if "Budget > ₹50,000" AND "Industry = Tech"
  • Why: Saves AI costs, reduces noise, prevents irrelevant outreach

Common Filter Use Cases:

  • Only process if email is not empty
  • Only route to sales if lead score > 7
  • Only send to Slack if urgency score > 8
  • Only generate proposal if deal size > ₹1,00,000

4. Error Handling Workflows

Every automation needs three fallbacks:

Success path: Normal flow → Mark as "Completed" Error path: If AI fails or API times out → Save to "Needs Review" sheet + Alert Slack → Mark as "Error" Timeout path: If no response in 24 hours → Send reminder to you → Mark as "Stale"

Retry Logic:

  • First failure → Wait 60 seconds → Retry
  • Second failure → Wait 5 minutes → Retry
  • Third failure → Alert human → Stop

5. Data Transformation

Data rarely comes in the right format. Transform it:

  • Text parsing: Extract "budget" from "My budget is around ₹1L" → "100000"
  • Date formatting: Convert "March 15" to "2024-03-15" for Google Sheets
  • Split: "John, [email protected]" → Separate name and email columns
  • Join: Combine first name + last name → Full name
  • Math operations: Multiply quantity × price → Total

6. The Parallel Execution Pattern

For speed, run independent steps simultaneously:

  • Instead of: Step 1 → Step 2 → Step 3 (sequential)
  • Use: Steps A, B, C all start at once → Merge at end (parallel)

Example:

  • Lead comes in → AI does 3 things at once:
    • Research company
    • Look up competitor mentions
    • Find LinkedIn profile
  • All 3 complete → AI synthesizes all 3 → Single output to you

7. Testing All Paths

Critical: You must test every branch, not just the happy path:

  • Test what happens when sentiment is extremely positive
  • Test what happens when sentiment is extremely negative
  • Test what happens when data is missing (empty cells)
  • Test what happens when AI returns an error
  • Test what happens when Slack is down

⚠️ Common Mistakes

  • Creating infinite loops: Automation triggers itself → runs again → triggers again. Fix: Add a "run ID" filter so the automation doesn't trigger on its own outputs.
  • Not having fallbacks: If something goes wrong and there's no error path, the automation silently dies and you never know.
  • Testing only happy paths: Only testing what happens when everything works. Real failures come from unexpected inputs, not ideal ones.
  • Over-complicating early: Start with 2 branches, not 10. Add complexity only when the simple version works reliably.
  • No logging: Make.com keeps an operation log. Check it weekly to spot failures before they become crises.

The Complexity Check: If your automation has more than 20 steps, consider splitting it into two separate automations connected by a trigger. Easier to debug, easier to maintain.

What's Next: You're building sophisticated systems. Let's make sure they're sustainable.

Hands-on Practicals

The Multi-Branch Router

Create a Google Form with open-ended feedback. Build a Make.com workflow with: 1) AI sentiment analysis, 2) Router based on score (positive/negative/neutral), 3) Different actions per branch. Test with 15 feedback entries.

The Filter Chain

Create a Google Sheet with 50 'leads' (some real, some fake). Build an automation that: 1) Reads all rows, 2) Filters for budget > ₹100,000 AND industry = 'Tech', 3) Creates tasks only for filtered rows. Measure efficiency improvement over manual filtering.

The Error Recovery System

Design an error handling workflow: 1) If AI fails to process → Save to 'Needs Review' sheet, 2) If API rate limited → Wait 60 seconds and retry (max 3 times), 3) If still fails → Send notification to manager. Document the complete flow.

Knowledge Check

What is the primary purpose of a 'Router' in an automation workflow?

Why is it important to test error paths in an automation?

What causes 'infinite loops' in automation and how do you prevent them?