Workflow Triggers

Learn about the different types of triggers that can start your ForgeZap workflows. From user interactions to data changes, triggers are the starting point of automation.

What are Triggers?

Triggers are events that start workflow execution. They can be user actions, data changes, scheduled times, or external signals that initiate your automated processes.

Trigger Types

Component Events

User interactions with components trigger workflows.

  • • Button clicks
  • • Form submissions
  • • Input changes
  • • Component interactions

Data Events

Changes in data sources trigger workflows.

  • • Database record creation
  • • Data updates
  • • API responses
  • • File uploads

Time Events

Scheduled times and intervals trigger workflows.

  • • Specific times
  • • Recurring schedules
  • • Delays and timeouts
  • • Date-based triggers

External Events

External systems trigger workflows via webhooks.

  • • Webhook calls
  • • API notifications
  • • Email triggers
  • • Third-party integrations

Manual Events

Manual execution of workflows by users.

  • • Manual workflow execution
  • • Admin-triggered workflows
  • • Testing and debugging
  • • One-time operations

Component Event Triggers

Button Click Triggers

The most common trigger type. Execute workflows when users click buttons:

Add a Button component to your canvas
Create a new workflow
Set trigger to "Button Click"
Select the specific button component
Add actions to execute when clicked

Form Submission Triggers

Execute workflows when forms are submitted:

Create a form with input fields
Set up form submission workflow
Access form data in workflow actions
Validate and process form data

Data Event Triggers

Database Change Triggers

Execute workflows when database records are created, updated, or deleted:

Record Creation

text
// Trigger when new record is created
Trigger: Database Record Created
Table: customers
Condition: status = 'new'

Record Update

text
// Trigger when record is updated
Trigger: Database Record Updated
Table: orders
Condition: status = 'completed'

API Response Triggers

Execute workflows based on API responses:

Monitor API endpoint responses
Trigger on specific response codes
Process response data
Handle errors and retries

Time-Based Triggers

Scheduled Triggers

Execute workflows at specific times or intervals:

Daily Schedule

text
// Run every day at 9:00 AM
Schedule: Daily
Time: 09:00
Timezone: UTC

Weekly Schedule

text
// Run every Monday at 2:00 PM
Schedule: Weekly
Day: Monday
Time: 14:00

Interval Schedule

text
// Run every 30 minutes
Schedule: Interval
Interval: 30 minutes

Delay Triggers

Execute workflows after a specified delay:

Wait for a specific duration
Execute follow-up actions
Send reminders and notifications

Webhook Triggers

External System Integration

Receive webhook calls from external systems to trigger workflows:

Webhook Configuration

text
// Webhook endpoint
URL: https://forgezap.com/webhook/your-workflow-id
Method: POST
Authentication: API Key or Signature

Payload Processing

javascript
// Access webhook data
"{{webhook.payload.user_id}}"
"{{webhook.payload.event_type}}"
"{{webhook.headers.authorization}}"

Common Webhook Use Cases

E-commerce

  • • Order status updates
  • • Payment confirmations
  • • Inventory changes
  • • Customer notifications

SaaS Integration

  • • User account changes
  • • Subscription updates
  • • Feature usage events
  • • System notifications

Trigger Configuration

Setting Up Triggers

Create a new workflow
Select trigger type from the list
Configure trigger-specific settings
Test the trigger to ensure it works
Activate the workflow

Trigger Conditions

Add conditions to make triggers more specific:

Filter by specific values
Check user permissions
Validate data before execution
Time-based conditions

Best Practices

Trigger Selection

Choose the most appropriate trigger type for your use case. Component events are great for user interactions, while data events work well for automated processes.

Performance

Be mindful of trigger frequency. High-frequency triggers can impact performance, so consider using conditions to limit unnecessary executions.

Testing

Always test your triggers thoroughly before deploying workflows. Use manual execution to verify trigger behavior and workflow logic.