Creating Workflows
Learn how to create and manage workflows in Autorun
Creating Workflows
Workflows are the heart of Autorun. Learn how to create, configure, and manage them effectively.
What is a Workflow?
A workflow is a series of automated tasks that run in sequence or parallel based on your configuration. Each workflow consists of:
- Triggers: Events that start the workflow
- Actions: Tasks that are performed
- Conditions: Logic that controls flow
- Integrations: Connections to external services
Creating Your First Workflow
Step 1: Open the Workflow Builder
Navigate to your dashboard and click the "Create Workflow" button.
The Autorun dashboard with the workflow builderStep 2: Configure Your Trigger
Choose what event will start your workflow:
trigger:
type: webhook
path: /api/new-user
method: POSTAutorun supports webhooks, scheduled tasks, file uploads, and more. See the Triggers Reference for a complete list.
Step 3: Add Actions
Define what happens when the workflow runs:
actions:
- name: Send Welcome Email
type: email
config:
to: "{{ trigger.data.email }}"
subject: "Welcome to Autorun!"
template: welcome
- name: Create User Profile
type: database
config:
table: users
operation: insert
data:
email: "{{ trigger.data.email }}"
created_at: "{{ now() }}"Video Walkthrough
Watch this detailed walkthrough of creating a complete workflow:
Advanced Features
Conditional Logic
Add conditions to control when actions run:
actions:
- name: Send Premium Welcome
type: email
condition: "{{ trigger.data.plan === 'premium' }}"
config:
template: premium-welcomeParallel Execution
Run multiple actions simultaneously:
actions:
- name: parallel-tasks
type: parallel
tasks:
- send-email
- create-profile
- notify-slackUse parallel execution for independent tasks to reduce workflow execution time.
Testing Your Workflow
Before deploying, test your workflow:
autorun test workflow.yaml --dry-runBest Practices
- Keep it Simple: Start with basic workflows and add complexity gradually
- Use Descriptive Names: Make actions easy to understand
- Add Error Handling: Always include fallback actions
- Test Thoroughly: Test with various inputs before deploying
Learn about Integrations to connect your workflows with external services.
Example: Complete Workflow
Here's a complete example of a customer onboarding workflow:
name: Customer Onboarding
description: Automated onboarding process for new customers
trigger:
type: webhook
path: /onboard
actions:
- name: Validate Data
type: validation
config:
schema: customer-schema
- name: Create Account
type: database
config:
table: customers
operation: insert
- name: Send Welcome Package
type: parallel
tasks:
- name: Welcome Email
type: email
config:
template: welcome
- name: Slack Notification
type: slack
config:
channel: "#new-customers"
- name: Create Onboarding Tasks
type: project-management
config:
tool: asana
template: customer-onboardingTroubleshooting
Common issues and solutions:
- Workflow not triggering: Check your trigger configuration and permissions
- Action failing: Review action logs and ensure all required fields are provided
- Timeout errors: Consider breaking long workflows into smaller parts
For more help, check our Troubleshooting Guide or reach out to support.