Webhooks: Connect AIWU to External Services
After this setup, external services will be able to trigger AIWU actions — and AIWU will be able to send data to any external service — using webhooks. No code required for basic setups.
In this article: Incoming Webhooks (receive) · Outgoing Webhooks (send) · Practical Examples · Common Issues
Before You Start
You’ll need:
- AIWU plugin v4.9+ installed
- For incoming webhooks: the external service that will send data (e.g., Stripe, Typeform, Zapier)
- For outgoing webhooks: the URL of the external service that will receive data
- Basic understanding of HTTP requests
- Time needed: ~15 minutes
Webhook Types in AIWU
| Type | Direction | Use case |
|---|---|---|
| Incoming webhook | External → AIWU | External service triggers an AIWU workflow |
| Outgoing webhook | AIWU → External | AIWU workflow sends data to external service |
Incoming Webhooks — Receive Data from External Services
Step 1: Create an Incoming Webhook Endpoint
Go to WordPress Admin → AI Copilot → Workflows → Webhooks → New Incoming Webhook.
Give it a name (e.g., “Stripe Payment Webhook”). Click Save.
What you should see: A unique webhook URL like:
https://yoursite.com/wp-json/aiwu/v1/webhook/incoming/abc123xyz
Copy this URL — you’ll paste it into your external service.
Step 2: Create a Workflow Triggered by the Webhook
Go to Workflows → New Workflow.
Set the trigger to Incoming Webhook. Select the webhook you just created.
The workflow will receive the webhook payload as variables: {{webhook.field_name}}.
Step 3: Configure the External Service
In your external service (e.g., Stripe, Typeform, Zapier), find the webhook/notification settings and paste your AIWU webhook URL.
Available Webhook Data in Workflows
| Variable | Description |
|---|---|
{{webhook.body}} |
Full raw payload as JSON string |
{{webhook.field_name}} |
Any top-level field from the payload |
{{webhook.timestamp}} |
When the webhook was received |
{{webhook.source_ip}} |
Sender’s IP address |
Outgoing Webhooks — Send Data to External Services
Add a Webhook Action to Any Workflow
In any workflow, click Add Action → Send Webhook (HTTP Request).
Outgoing Webhook Action Fields
| Field | Description | Example |
|---|---|---|
| URL | Destination endpoint | https://api.example.com/notify |
| Method | HTTP method | POST, GET, PUT, PATCH, DELETE |
| Headers | Key-value pairs | Authorization: Bearer {{token}} |
| Body | JSON payload — supports variables | {"message": "{{generated_text}}", "user": "{{user_email}}"} |
| Timeout | Seconds to wait for response | 30 |
The webhook response is available as {{webhook_response}} in subsequent workflow actions.
Practical Examples
Example 1: Typeform Submission → AI Summary → Slack
- Create incoming webhook in AIWU, paste URL into Typeform’s webhook settings
- Trigger: Incoming Webhook
- Action 1: Generate Text — “Summarize this form response: {{webhook.answers}}”
- Action 2: Send Slack — “New form submission:n{{generated_text}}”
Example 2: AIWU Workflow → External CRM
- Trigger: WooCommerce New Customer
- Action: Send Webhook (POST)
- URL:
https://your-crm.com/api/contacts - Headers:
{"Authorization": "Bearer YOUR_CRM_TOKEN"} - Body:
{"email": "{{billing_email}}", "name": "{{billing_first_name}} {{billing_last_name}}", "source": "woocommerce"}
- URL:
Example 3: Zapier Integration
AIWU works seamlessly with Zapier:
- Zapier → AIWU: Use Zapier’s “Webhooks by Zapier” action with your AIWU incoming webhook URL
- AIWU → Zapier: Use AIWU’s outgoing webhook with your Zapier “Catch Hook” URL
Verify It Works
- For incoming: Go to Workflows → [workflow] → Test Run and use “Simulate Webhook” to send a test payload. Check the Logs tab for execution results.
- For outgoing: Run the workflow and check the Logs tab. A successful HTTP action shows the response status code (200 = success).
Common Issues
Problem: Incoming webhook URL returns 404.
Fix: Go to WordPress Admin → Settings → Permalinks and click Save (this flushes rewrite rules). The webhook endpoint requires WordPress permalinks to be enabled.
Problem: Outgoing webhook gets a 401 Unauthorized response.
Fix: Check your Authorization header. Most APIs require Bearer YOUR_TOKEN — make sure the format matches what the API expects. Some APIs use X-API-Key or basic auth instead.
Problem: Webhook payload variables not populating (empty values).
Fix: Send a test request first and check what field names the incoming payload uses. Variable names are case-sensitive and must exactly match the JSON keys from the sender.
Problem: Outgoing webhook times out.
Fix: Increase timeout in the webhook action settings. If the destination server is slow, consider setting timeout to 60 seconds. For very slow endpoints, trigger the workflow with async execution.
Still stuck? Check the troubleshooting guide or the full Webhooks in Workflows reference.
What’s Next
- 🟢 See a workflow using webhooks: First Workflow: Post → Telegram — real example with outgoing webhook
- 🟡 PHP integration: PHP Helper Functions — trigger webhooks from theme code
- 🔵 Full workflow reference: Actions in Workflow Builder — all available action types
- 📖 REST API: REST API Quick Start — alternative to webhooks for two-way integration
Last verified: AIWU v.4.9.2 · Updated: 2026-02-25
