Design Principles
Event-Driven Thinking
Design automations around events rather than tasks:- Think: “What event should trigger this process?”
- Not: “What tasks do I need to automate?”
Strategic AI Usage
Use AI actions where they add the most value:- Information categorization - Classify incoming data into predefined groups
- Content analysis - Summarize or extract key details from unstructured text
- Decision-making based on data - Route workflows based on AI-assessed criteria
- Transforming unstructured data - Normalize inconsistent formats into structured fields
Maintainable Automations
- Clear names - Use descriptive automation and variable names that explain their purpose
- Document logic - Add comments for complex conditions so others can understand the reasoning
- Plan for failures - Account for external API failures and missing data scenarios
- Write defensive scripts - When using Execute Script, always provide fallback default values for inputs, handle data parsing errors gracefully, and make sure the script returns all expected output fields on every path — including error paths — so downstream actions don’t fail on missing data
- Test with real data - Verify all automation paths using actual business data, including edge cases and error conditions
Building Faster Automations
Performance optimization is most relevant when immediate action is needed after an automation is triggered, such as real-time user-facing updates or time-sensitive workflows. For background processes where a few extra seconds don’t matter, prioritize clarity and maintainability over raw speed.
Minimize Record Interactions
Updating fields on a record is one of the more time-consuming operations in an automation. Each interaction with the record adds latency, so reducing these touchpoints has a significant impact on overall speed.- Batch field updates - Instead of updating fields one at a time across multiple actions, consolidate all field changes into a single Update Record Fields action at the end of your automation.
- Use variables for intermediate data - Store temporary values in variables rather than writing them to the record. Variables are held in memory during execution and are much faster to read and write.
- Touch the record once - Structure your automation so it reads from the record at the beginning and writes back once at the end. This “read once, write once” pattern eliminates unnecessary round trips.
Consolidate Logic into Execute Script
Every action in an automation carries overhead. Chaining several Set Variable, Run Calculation, and other actions to implement what is fundamentally one logical step adds latency and makes the workflow harder to follow.- Replace action chains with Execute Script - If you have a sequence of Set Variable and Run Calculation actions with no platform operations between them, collapse them into a single Execute Script action. The script can parse inputs, validate fields, compute values, and return all results at once. This is typically the highest-impact optimization you can make.
- Know when to split scripts - Use separate scripts when a platform action (Send API Request, Search Records, AI Search) must happen between two blocks of logic, or when a single script would exceed roughly 200 lines and the halves are conceptually distinct.
- Avoid separate create and update actions - If you need to create a record and then immediately update it, set all the necessary field values in the Create Record action itself.
- Reduce loop iterations - Each line item processed adds time, especially if the loop body includes external calls to Snowflake or APIs. Filter or limit the scope of your data before entering a Repeat for Each loop.
Choose the Right Search Strategy
Not all search actions are interchangeable. Choosing the right one depends on the type of input.- AI Search for natural language input - When the search input comes from a user or contains free-text descriptions, use AI Search. It handles synonyms, partial matches, and variations that exact filters would miss. For example, a user searching for “lab gloves” will match “Laboratory Nitrile Gloves” through semantic matching.
- Search Records for system keys - When looking up a record by a machine-generated identifier like a record ID, tracking code, or system-assigned key, use Search Records with an exact-match filter. These values have a guaranteed format and don’t benefit from semantic matching.
Design for Efficiency
Structure your automation logic to avoid unnecessary work.- Validate early and gate with Switch - Place a validation step as the first action after the trigger. Check all required fields, formats, and business rules up front, then use a Switch action to route valid inputs to the main workflow and invalid inputs to an error output. This prevents expensive operations like API calls or record creation from running on bad data.
- Design automations as composable functions - Break complex workflows into smaller, focused automations with On-Demand Triggers, and call them from other automations using Run Automation. When the same logic appears in multiple automations (e.g., calling an external API and parsing its response), extracting it into a shared automation means fixing bugs or updating integrations in one place.
- Use async handoffs for slow external calls - If an automation makes a slow external API call (several seconds or more), consider splitting it into two automations: one that validates the input and creates a tracking record immediately, and a second that triggers on the record creation to handle the slow call in the background. The first automation returns quickly while the second processes asynchronously.
Common Patterns
Customer Journey Automation
Customer Journey Automation
Create connected automations for complete customer processes:
Approval Workflow
Approval Workflow
Combine AI decision-making with human approval:
Data Pipeline
Data Pipeline
Chain multiple data processing steps:
Alert System
Alert System
Monitor conditions and escalate appropriately:
Advanced Implementation
Automation Chaining
Building on the composable design approach, you can chain automations in sequence — where one automation’s output feeds the next as input — to orchestrate multi-step workflows that span different teams or systems.Complex Variable Structures
Beyond using variables for intermediate data storage, you can use Set Variable to build more complex data structures that evolve throughout your automation — aggregating results from loops, assembling payloads for API calls, or constructing dynamic content from multiple sources.Conditional Logic Trees
Build complex decision trees using nested IF conditions with AND/OR operators for nuanced routing scenarios that go beyond simple branching.Structured Outputs from Execute Script
Execute Script returns its result as a single text value. To break that result into individual fields that downstream actions and automation outputs can reference, follow this pattern:- Execute Script returns a structured result (e.g., a success flag, a request number, and an error message)
- File Reader (JSON mode) parses the result into individual fields
- Set Variable actions create named values from the parsed fields for use as workflow outputs
Integration Patterns
Coordinate across multiple external systems within a single automation. Use Send API Request actions to call services sequentially, storing each response in variables for use in subsequent calls. When calling external APIs, enable Continue on Error on the Send API Request action and add an Execute Script immediately after it. Pass the response status and body into the script so it can determine whether the call succeeded and extract a meaningful error message if it didn’t. This prevents a single failed API call from stopping the entire workflow and gives downstream actions useful information about what went wrong.Troubleshooting
Automation Not Triggering
Automation Not Triggering
- Automation is published (not draft)
- Testing with correct event type
- Record/data meets trigger conditions
Empty Variables
Empty Variables
- Correct variable names being used
- Previous action completed successfully
- Accessing correct variable structure level
AI Actions Not Working
AI Actions Not Working
- Input data is in expected format
- Sufficient context provided
- AI action receiving correct variables
Performance Issues
Performance Issues
- Search scope is appropriate
- Number of separate automations
- Data processing efficiency
- Whether field updates can be consolidated (see Building Faster Automations)
For complete action details and examples, see the Automation Actions Reference. For trigger configuration and use cases, see the Automation Triggers Reference.