How It Works
The flow looks like this:- Webhook arrives: Stripe sends a POST request to your webhook endpoint
- Your app receives: Your application receives the webhook and extracts the payload
- superglue processes: Your app triggers a superglue workflow with the webhook data
- Workflow executes: superglue processes, transforms, and validates the data
- Actions taken: Additional API calls, database updates, or notifications as needed
Installation
Basic Setup
1. Create Integrations
First, set up integrations for the services you’ll be calling from your webhook workflows.2. Create Webhook Processing Workflows
Stripe Payment Webhook
Stripe Subscription Webhook
3. Set Up Your Webhook Endpoints
Create endpoints in your application that receive webhooks and trigger superglue workflows.Express.js Example
Next.js API Route Example
Sending Workflow Results to Webhooks
You can configure superglue to automatically send workflow execution results to a webhook URL. This is useful for:- Notifying external systems when workflows complete
- Triggering downstream processes (e.g. AWS Lambda functions)
- Logging workflow results to external monitoring systems
Basic Usage
Simply add awebhookUrl
in the options when executing a workflow:
Webhook Payload Format
The webhook will receive a POST request with the following JSON payload:Important Notes
- Fire-and-forget: Webhook notifications are sent asynchronously and won’t delay the workflow response
- Retries: Failed webhook deliveries are automatically retried 3 times with a 10-second delay
- Timeout: Webhook requests have a 10-second timeout
- No blocking: Webhook failures don’t affect the workflow execution or response
Advanced Patterns
Workflow Chaining
Process webhooks that trigger multiple downstream actions:Testing
1. Use Webhook Testing Tools
2. Test Workflows Independently
Other Webhook Providers
The same pattern works for any service that sends webhooks. Examples:- Plaid:
webhook_type: "TRANSACTIONS"
for bank account updates - GitHub:
action: "opened"
for new pull requests - Shopify:
topic: "orders/create"
for new orders - Twilio:
MessageStatus: "delivered"
for SMS updates
Best Practices
- Idempotency: Handle duplicate webhooks gracefully
- Fast Response: Respond to webhooks quickly (< 10s), do heavy processing asynchronously
- Verify Signatures: Always verify webhook signatures in production
- Graceful Failures: Return appropriate HTTP status codes
- Monitoring: Log webhook processing for debugging
- Schema Validation: Use superglue’s schema validation to ensure data integrity