How to Trigger a Workflow From a Webhook
What Is a Webhook
A webhook is an HTTP request that one system sends to another when something happens. Instead of your workflow constantly checking another service for updates (polling), the other service pushes data to you the moment an event occurs. This is faster, more efficient, and uses fewer resources than polling.
When Stripe processes a payment, it can send a webhook to your URL with the full transaction details. When someone submits a Typeform, it sends the answers to your URL. When a GitHub repository gets a push, it notifies your URL with the commit data. Your workflow receives this data and acts on it instantly.
How Webhook Triggers Work on the Platform
The platform provides a unique webhook URL for each app mode you configure. When an external service sends an HTTP POST to that URL, the platform receives the data, matches it to your account and app, and triggers the associated workflow. The incoming data becomes the initial set of workflow variables that all downstream steps can access.
The URL follows the pattern: https://api.aiappsapi.com/{accountID}/{app}/{mode}. The mode maps to a handler that processes the incoming data and can trigger your workflow chain.
Step-by-Step Setup
In your app configuration, define a new mode that will receive the webhook. This mode maps to a handler function that processes the incoming data. The mode name becomes part of your webhook URL.
Your webhook URL is constructed from your account ID, app name, and mode name. Copy this URL from your admin panel or construct it from these parts. This is the URL you will provide to the external service.
In the sending service (Stripe, PayPal, a form builder, etc.), find the webhook or notification settings. Paste your webhook URL and select which events you want to receive. Most services let you choose specific event types so you only receive relevant notifications.
Create your workflow in the Chain Commands visual builder. The first node receives the webhook payload as input variables. Add steps to process the data, make decisions, update databases, send notifications, or whatever your automation needs to do with the event.
Trigger a test event in the external service. Most payment processors and form builders have test modes or "send test webhook" buttons. Verify that your workflow receives the data, processes it correctly, and completes all steps. Check the webhook payload format matches what your workflow expects.
Common Webhook Trigger Sources
Payment Processors
Stripe and PayPal send webhooks for payment completed, payment failed, subscription created, refund issued, and dispute opened. Your workflow can update customer records, send confirmation emails, provision access, or alert your team depending on the event type. The platform already has built-in mode handlers for Stripe and PayPal webhooks.
Form and Survey Tools
When someone submits a form on an external service, the webhook sends all form fields to your workflow. Your automation can store the data, run it through AI qualification, add the contact to your email list, and send a thank-you message, all within seconds of the submission.
E-Commerce Platforms
Shopify, WooCommerce, and other e-commerce platforms send webhooks for new orders, inventory changes, and customer events. Your workflow can sync this data with your own systems, trigger fulfillment processes, or update AI-powered customer profiles.
Custom Applications
Any application you build, including custom AI apps on this platform, can send webhooks to trigger workflows. This lets you connect app actions to automated follow-up processes without embedding the automation logic inside the app itself.
Webhook Triggers vs Scheduled Triggers
Webhook triggers react immediately when something happens. Scheduled triggers run at fixed times regardless of events. Use webhooks when you need real-time response to external events. Use schedules for recurring tasks that happen at regular intervals. Many systems use both: a webhook captures incoming data immediately, and a scheduled workflow processes accumulated data in batches at set times.
Connect any external service to your workflows with webhooks. React to events in real time.
Get Started Free