WarpBuild LogoWarpBuild Docs
Triggers

Manual Trigger

Start workflows manually

Manual Trigger

The Manual trigger enables you to start workflows manually. This is useful for testing and debugging workflows, or running workflows that are not triggered by an external event.

Configuration

Input Schema

The Manual trigger allows you to provide test data that mimics other trigger types. This is essential for testing and debugging workflows without waiting for real events to occur.

Test Data Examples

Test integration triggers with realistic event data:

{
  "event": "pull_request",
  "action": "opened", 
  "repository": "https://github.com/ExampleOrg/ExampleRepo",
  "ref": "refs/heads/feature-branch",
  "commit": "abc123def456789",
  "author": {
    "username": "developer",
    "email": "[email protected]"
  },
  "pullRequest": {
    "id": 123,
    "title": "Add new feature",
    "base": "main",
    "head": "feature-branch"
  }
}

Common integration event types to test:

  • GitHub: pull_request, push, issues, release
  • Slack: message, app_mention, reaction_added
  • Database: record.created, record.updated, record.deleted

Test webhook triggers with HTTP-style payloads:

{
  "method": "POST",
  "endpoint": "/test-webhook",
  "headers": {
    "content-type": "application/json",
    "authorization": "Bearer test-token",
    "user-agent": "TestClient/1.0"
  },
  "body": {
    "userId": "user_123",
    "action": "order_completed",
    "data": {
      "orderId": "order_456",
      "amount": 99.99,
      "currency": "USD"
    },
    "timestamp": "2024-01-15T10:30:00Z"
  },
  "query": {
    "source": "test",
    "version": "v1"
  },
  "remoteIp": "192.168.1.100"
}

Test cron triggers with scheduling context:

{
  "cronExpression": "0 9 * * 1-5",
  "timezone": "America/New_York", 
  "scheduledTime": "2024-01-15T09:00:00-05:00",
  "actualTime": "2024-01-15T09:00:02-05:00",
  "defaultInput": {
    "reportType": "daily",
    "includeMetrics": true
  }
}

Useful for testing:

  • Scheduled report generation
  • Maintenance workflows
  • Data synchronization processes

Test any workflow with custom data:

{
  "testMode": true,
  "testData": {
    "customField1": "value1", 
    "customField2": 42,
    "customField3": ["item1", "item2", "item3"]
  },
  "environment": "development",
  "timestamp": "2024-01-15T10:30:00Z"
}

Best practices for manual testing:

  • Use realistic data that matches production patterns
  • Include edge cases and error conditions
  • Test with both valid and invalid data
  • Verify all required fields are present

Ensure that the mandatory fields for the trigger type are provided in the input. Missing required fields will prevent workflow execution.

Debugging and Best Practices

Testing Guidelines

  • Start simple: Begin with minimal valid payloads, then add complexity
  • Test edge cases: Include boundary conditions and error scenarios
  • Validate schemas: Ensure your test data matches expected trigger formats
  • Use realistic data: Mirror production data patterns as closely as possible
  • Test error handling: Verify workflows handle invalid or missing data gracefully

Common Issues

Debugging Tips

# Add debugging output to your workflows
- id: debug_trigger_data
  type: script
  input:
    script: |
      console.log('Manual trigger data:', {
        triggerType: typeof trigger,
        triggerKeys: Object.keys(trigger || {}),
        triggerData: trigger
      });
      
      return { 
        debugInfo: 'Check logs for trigger details',
        triggerReceived: !!trigger 
      };

Last updated on