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
-
Trigger: New Typeform Submission
- Select your form
- Map response fields
-
Filter: Check Lead Score
IF {{score}} >= 80 -
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
- Error Handling - Always have a fallback path
- Rate Limits - Respect API limitations
- Logging - Track automation runs for debugging
- Testing - Use test mode before going live
- Documentation - Document complex workflows
Debugging Workflows
When automations fail, systematic debugging saves hours of frustration.
Common Failure Points
| Symptom | Likely Cause | Solution |
|---|---|---|
| Trigger not firing | Permissions expired | Re-authenticate the connection |
| Action fails silently | Missing required field | Check all required fields are mapped |
| Partial data | Field mapping changed | Verify source field names haven't changed |
| Intermittent failures | Rate limiting | Add delays between actions |
| Wrong data format | Type mismatch | Add a formatter step to convert types |
The Debug Checklist
When an automation fails, work through this sequence:
- Check the run history - Most platforms show exactly where the failure occurred
- Verify credentials - Connections expire; re-authenticate if needed
- Test with sample data - Use a known-good input to isolate the issue
- Review recent changes - Did the source app update their API?
- 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:
- First attempt - Run immediately
- Failure detected - Wait 5 minutes
- Second attempt - Try again
- If still failing - Alert a human
Pattern 3: The Dead Letter Queue
For critical processes, never lose data:
- If the main action fails, write the record to a "failed" spreadsheet
- Process failed records manually or with a separate automation
- 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:
- Break into sub-workflows - Modular workflows are easier to debug
- Add checkpoints - Log completion of major sections
- Use unique identifiers - Pass a tracking ID through all steps
- 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