HTTP Trigger Overview
The HTTP trigger allows external systems to initiate your workflow execution by making HTTP requests to a designated endpoint. This enables on-demand workflow execution, webhook integration, and API-driven automation.
How HTTP triggers work
When you deploy a workflow with an HTTP trigger:
- External systems send HTTP POST requests to a CRE gateway
- The request specifies your workflow ID in the JSON-RPC body along with the input payload
- Requests must be cryptographically signed using a private key corresponding to an authorized EVM address in the target workflow
- CRE validates the signature against your configured
authorizedKeys - If authorized, your workflow callback executes with the request payload
When to use HTTP triggers
HTTP triggers are ideal for:
- Webhook integration: Receive events from external services (GitHub, payment processors, etc.)
- On-demand execution: Allow users or systems to trigger specific workflow logic when needed
- API gateway patterns: Create authenticated endpoints that execute blockchain operations
- Event bridging: Connect offchain systems events to workflows
The complete HTTP trigger journey
This section provides everything you need to work with HTTP triggers:
-
Configuration & Handler - Learn how to configure HTTP triggers in your workflow code and write handler functions to process incoming requests
-
Testing in Simulation - Test your HTTP trigger locally using the
cre workflow simulatecommand before deploying -
Triggering Deployed Workflows - Understand the JSON-RPC format and JWT authentication required to trigger your deployed workflows
-
Testing with Local JWT Server - Run a local proxy server that automatically generates JWT tokens and sends authenticated requests to the CRE gateway for testing your deployed workflows
Quick comparison: Simulation vs Production
| Aspect | Simulation | Production |
|---|---|---|
| Authorization | Optional (can use empty config) | Required (authorizedKeys must be configured) |
| Trigger method | CLI with --input flag | HTTP POST to gateway endpoint with JWT |
| Endpoint | Local simulator | CRE gateway (https://01.gateway.zone-a.cre.chain.link) |
| Use case | Development, testing, debugging | Live integrations, webhooks, production APIs |
Key concepts
Authorization keys
Authorization keys are EVM addresses that are permitted to trigger your workflow. When you configure an HTTP trigger, you specify one or more authorizedKeys:
authorizedKeys: [
{
type: "KEY_TYPE_ECDSA_EVM",
publicKey: "0xYourEVMAddress",
},
]
Only requests signed by the corresponding private keys will be accepted by the CRE gateway.
Payload
The HTTP trigger payload contains:
input: The JSON data from the HTTP request bodykey: The authorized key that signed the request
Your callback function receives this payload and can process the input data to perform workflow logic.
Next steps
Start by learning how to configure HTTP triggers and write handler functions:
- Configuration & Handler - Set up your first HTTP trigger
Or explore the SDK reference for detailed API documentation:
- HTTP Trigger SDK Reference - Complete API documentation