Skip to main content

Automation Logic

Master the fundamentals of workflow automation with this guide to triggers, actions, and webhooks.

The "If This, Then That" Paradigm​

All automation follows a simple pattern:

Core Concepts​

Triggers​

Triggers are events that start your automation. They answer the question: "When should this run?"

Common Trigger Types:

  • Form submission
  • New email received
  • Calendar event created
  • Database record updated
  • Webhook received

Actions​

Actions are what happen after a trigger fires. They answer: "What should we do?"

Common Action Types:

  • Create record
  • Send notification
  • Update spreadsheet
  • Call API endpoint
  • Generate document

Conditions​

Conditions filter when actions should run. They answer: "Should we proceed?"

Real-World Example: Typeform to Slack​

Here's a practical automation that notifies your team when someone submits a form:

Configuration Steps​

  1. Trigger: New Typeform Submission

    • Select your form
    • Map response fields
  2. Filter: Check Lead Score

    IF {{score}} >= 80
  3. Action: Send Slack Message

    Channel: #sales
    Message: "New hot lead! {{name}} from {{company}}"

Webhooks Deep Dive​

Webhooks enable real-time communication between applications.

Incoming Webhooks​

Receive data from external services:

{
"event": "form.submitted",
"timestamp": "2024-01-15T10:30:00Z",
"data": {
"name": "John Doe",
"email": "john@example.com",
"score": 85
}
}

Outgoing Webhooks​

Send data to external services when events occur in your system.

Best Practices​

  1. Error Handling - Always have a fallback path
  2. Rate Limits - Respect API limitations
  3. Logging - Track automation runs for debugging
  4. Testing - Use test mode before going live
  5. Documentation - Document complex workflows

Debugging Workflows​

When automations fail, systematic debugging saves hours of frustration.

Common Failure Points​

SymptomLikely CauseSolution
Trigger not firingPermissions expiredRe-authenticate the connection
Action fails silentlyMissing required fieldCheck all required fields are mapped
Partial dataField mapping changedVerify source field names haven't changed
Intermittent failuresRate limitingAdd delays between actions
Wrong data formatType mismatchAdd a formatter step to convert types

The Debug Checklist​

When an automation fails, work through this sequence:

  1. Check the run history - Most platforms show exactly where the failure occurred
  2. Verify credentials - Connections expire; re-authenticate if needed
  3. Test with sample data - Use a known-good input to isolate the issue
  4. Review recent changes - Did the source app update their API?
  5. Check rate limits - Are you hitting the platform's usage caps?

Reading Error Messages​

Error messages often contain the solution. Common patterns:

"401 Unauthorized" → Re-authenticate the connection
"404 Not Found" → Record ID is invalid or deleted
"429 Too Many Requests" → Add delays between actions
"500 Internal Server Error" → Try again later; not your fault
"Field 'email' is required" → Ensure the email field is mapped

Error Handling Patterns​

Build resilient automations that gracefully handle failures.

Pattern 1: The Safety Net​

Always include an "else" path for unexpected conditions:

Pattern 2: Retry with Delay​

For flaky connections, implement automatic retries:

  1. First attempt - Run immediately
  2. Failure detected - Wait 5 minutes
  3. Second attempt - Try again
  4. If still failing - Alert a human

Pattern 3: The Dead Letter Queue​

For critical processes, never lose data:

  1. If the main action fails, write the record to a "failed" spreadsheet
  2. Process failed records manually or with a separate automation
  3. Include enough context to retry later

Multi-Step Workflow Strategies​

Complex automations require careful orchestration.

Sequential vs. Parallel​

Sequential: Each step waits for the previous one to complete

  • Use when: Step B depends on data from Step A
  • Example: Create contact → Wait → Add to campaign

Parallel: Steps run simultaneously

  • Use when: Steps are independent
  • Example: Send email AND update CRM AND log to spreadsheet

Managing Long Workflows​

For workflows with many steps:

  1. Break into sub-workflows - Modular workflows are easier to debug
  2. Add checkpoints - Log completion of major sections
  3. Use unique identifiers - Pass a tracking ID through all steps
  4. Set realistic timeouts - Long-running tasks need longer timeouts

Platform-Specific Tips​

Zapier​

  • Use "Filter" steps to prevent unnecessary runs
  • "Delay" actions prevent rate limiting
  • "Paths" enable complex branching logic
  • Check "Task History" for detailed debugging

Make (formerly Integromat)​

  • Use "Error Handlers" on critical modules
  • "Routers" enable parallel processing
  • "Iterators" process arrays item by item
  • Built-in "Break" and "Resume" for error recovery