Automations

Automations are the heart of Flow. Build visual workflows that trigger on events, process data, and take action.


Creating an Automation

Start a New Automation

  1. Navigate to Automations in the sidebar
  2. Click + New Automation
  3. Give your automation a name and description
  4. Click Create

You'll be taken to the visual workflow builder.

Choose a Trigger

Every automation needs a trigger. Click Add Trigger to choose:

Trigger Best For
Manual On-demand execution via UI or API
Webhook External HTTP events (Stripe, GitHub, etc.)
Schedule Time-based tasks using cron expressions
Slack Slack messages and commands
Teams Microsoft Teams messages and events
VoIP Incoming phone calls
SQS AWS SQS messages

Add Steps

Build your workflow by adding steps:

  1. Click the + button after any step
  2. Choose a step type from the palette
  3. Configure the step settings
  4. Connect steps to define the flow

Step Types

Flow provides these step types for building automations:

Connector

Execute operations on external services (APIs, databases, SaaS apps).

Connectors are created from OpenAPI specifications and support:

  • HTTP/REST APIs
  • Database connections (PostgreSQL, MySQL, MongoDB)
  • SaaS integrations (Salesforce, HubSpot, Stripe, Slack)

Each connector has multiple operations (e.g., "Send Message", "Get User", "Create Record").

Variable

Set or transform variables for use in later steps.

Use variables to:

  • Store intermediate results
  • Transform data formats
  • Prepare inputs for later steps

Condition

Branch your workflow based on logic.

IF order.total > 1000
  True Branch → Send VIP notification
  False Branch → Send standard confirmation

Loop

Iterate over a collection of items.

FOR EACH order IN orders
  → Process order
  → Send confirmation
END LOOP

Function

Execute custom code (JavaScript/TypeScript).

Use functions for:

  • Complex data transformations
  • Custom business logic
  • Calculations and validations

AI Agent

Invoke an AI agent for intelligent processing.

AI Agents can:

  • Analyze documents and extract data
  • Generate content
  • Make decisions based on context
  • Interact with users via chat

Smart Function

AI-generated code with SDK access for complex operations.

Describe what you need in natural language, and the AI generates and executes the code.

Smart Decision

AI-powered routing logic that decides the next step.

Provide a prompt describing the decision criteria, and the AI routes to the appropriate branch.

Human Interaction

Pause workflow for human input, approval, or form completion.

Interaction types:

Type Description
CONFIRMATION Simple "click to proceed" acknowledgment
APPROVAL Approve/reject with optional comment
SINGLE_CHOICE Select one option from a list
MULTIPLE_CHOICE Select multiple options
TEXT_INPUT Free text response
FORM JSON Schema-driven form
FILE_UPLOAD Upload files

VoIP

Execute voice operations (calls, IVR, AI voice sessions).

Use for:

  • Outbound calls
  • IVR menus
  • AI-powered voice conversations
  • Call routing

Database

Execute SQL queries directly against database connections.

Supported operations:

Operation Description
QUERY SELECT statements that return data
EXECUTE INSERT/UPDATE/DELETE that modify data
CALL Execute stored procedures
TRANSACTION Multiple statements in a transaction

ETL

Execute data pipeline jobs for extract, transform, load operations.

Use for:

  • Data synchronization
  • Batch processing
  • Data warehouse loading

Sub-Workflow

Call another workflow as a reusable component.

Break complex processes into smaller, reusable workflows.

Terminal Steps

End your workflow explicitly:

Step Description
SUCCESS Mark workflow as successfully completed
ERROR Mark workflow as failed with error details
END Exit a loop early

Data Expressions

Reference data anywhere using expressions with {{ }} syntax:

Expression Description
{{ input.field }} Trigger input data
{{ steps.stepName.output }} Output from a named step
{{ connections.dbName }} Reference a connection
{{ variables.counter }} Workspace variable
{{ secrets.apiKey }} Secret value

Expression Examples

// Access trigger data
{{ input.customer.email }}

// Access step output  
{{ steps.getUser.output.name }}

// Conditional
{{ input.amount > 100 ? "VIP" : "Standard" }}

// Array operations
{{ orders.filter(o => o.status == "pending") }}

Testing and Debugging

Test Your Automation

  1. Click Test in the toolbar
  2. Provide sample input data (JSON)
  3. Watch the execution step-by-step
  4. Check the output of each step

View Run History

  1. Click the Runs tab on your automation
  2. See all past executions
  3. Click a run to view details:
    • Input data
    • Output from each step
    • Error messages (if any)
    • Execution time per step

Debug Failed Runs

When a run fails:

  1. Open the failed run
  2. Find the step marked with
  3. Check the error message and stack trace
  4. Review the input data to that step
  5. Fix the issue and re-test

Managing Automations

Automation States

State Description
Draft Work in progress, not running
Active Live and processing triggers
Paused Temporarily stopped
Archived Removed from active list

Version History

Flow keeps a history of your changes:

  1. Click History in the automation toolbar
  2. See all previous versions
  3. Click to compare changes
  4. Restore any previous version

Best Practices