Workflow Actions

Learn about the actions that workflows can perform. From updating components to sending notifications, actions are what make your workflows powerful and useful.

What are Actions?

Actions are the tasks that workflows perform when triggered. They can update components, save data, send notifications, make API calls, and much more.

Action Categories

Component Actions

Modify component properties and behavior.

  • • Update component properties
  • • Show/hide components
  • • Navigate between views
  • • Reset form fields

Data Actions

Perform database operations and data management.

  • • Save data to database
  • • Update existing records
  • • Delete records
  • • Query and filter data

Communication Actions

Send notifications and communicate with users.

  • • Send email notifications
  • • Show toast messages
  • • Send push notifications
  • • Create system alerts

API Actions

Integrate with external services and APIs.

  • • Make HTTP requests
  • • Call external APIs
  • • Send webhooks
  • • Process API responses

System Actions

Perform system operations and utilities.

  • • Set variables
  • • Execute calculations
  • • Log events
  • • Handle errors

Component Actions

Update Component Properties

Modify component properties dynamically during workflow execution:

Text Updates

text
// Update text component
Component: Text
Property: content
Value: "Welcome, {{user.name}}!"

// Update button text
Component: Submit Button
Property: text
Value: "Processing..."

Visibility Changes

text
// Show/hide components
Component: Success Message
Property: visible
Value: true

Component: Error Message
Property: visible
Value: false

Form Management

Manage form state and user interactions:

Reset form fields to default values
Enable/disable form fields
Set form field values
Validate form data

Data Actions

Database Operations

Perform database operations to manage your application data:

Create Records

text
// Create new customer record
Action: Create Database Record
Table: customers
Data: {
  "name": "{{form.name}}",
  "email": "{{form.email}}",
  "phone": "{{form.phone}}",
  "created_at": "{{now()}}"
}

Update Records

text
// Update existing record
Action: Update Database Record
Table: orders
Where: id = "{{order.id}}"
Data: {
  "status": "completed",
  "completed_at": "{{now()}}"
}

Delete Records

text
// Delete record
Action: Delete Database Record
Table: temp_data
Where: created_at < "{{dateSub(now(), '7 days')}}"

Data Queries

Execute queries to retrieve and process data:

Run SQL queries
Filter and sort data
Aggregate and calculate values
Store query results in variables

Communication Actions

Email Notifications

Send email notifications to users and administrators:

User Notification

text
// Send welcome email
Action: Send Email
To: "{{user.email}}"
Subject: "Welcome to {{app.name}}!"
Body: "Hi {{user.name}}, welcome to our platform!"

Admin Alert

text
// Send admin notification
Action: Send Email
To: "admin@example.com"
Subject: "New Order Received"
Body: "Order #{{order.id}} for ${{order.total}} has been placed."

Toast Messages

Show temporary messages to users in the interface:

Success messages for completed actions
Error messages for failed operations
Information messages for user guidance
Warning messages for important notices

API Actions

HTTP Requests

Make HTTP requests to external APIs and services:

GET Request

text
// Fetch data from API
Action: HTTP Request
Method: GET
URL: "https://api.example.com/users/{{user.id}}"
Headers: {
  "Authorization": "Bearer {{api_token}}"
}

POST Request

text
// Send data to API
Action: HTTP Request
Method: POST
URL: "https://api.example.com/orders"
Headers: {
  "Content-Type": "application/json"
}
Body: {
  "customer_id": "{{user.id}}",
  "total": "{{order.total}}"
}

Webhook Calls

Send webhook notifications to external systems:

Notify external systems of events
Send structured data payloads
Handle webhook responses
Retry failed webhook calls

System Actions

Variable Management

Set and manage variables for data storage and processing:

Set Variables

text
// Set workflow variables
Action: Set Variable
Name: "user_count"
Value: "{{queryResult.length}}"

Action: Set Variable
Name: "current_time"
Value: "{{now()}}"

Use Variables

text
// Use variables in other actions
"{{variables.user_count}}"
"{{variables.current_time}}"
"{{variables.calculated_total}}"

Calculations and Logic

Perform calculations and execute business logic:

Mathematical calculations
String manipulations
Date and time operations
Conditional logic execution

Action Configuration

Setting Up Actions

Add action to your workflow
Configure action-specific parameters
Set up error handling
Test action execution

Action Sequencing

Actions execute in sequence. Use conditions and delays to control execution flow:

Actions run in order from top to bottom
Use conditions to skip actions
Add delays between actions
Handle action failures gracefully

Best Practices

Action Order

Plan the sequence of actions carefully. Some actions depend on the results of previous actions, so order matters for successful workflow execution.

Error Handling

Always include error handling for actions that might fail. Use try-catch logic and provide fallback actions for critical operations.

Performance

Consider the performance impact of actions. Batch operations when possible and avoid unnecessary API calls or database operations.