Webhook
Overview
The Webhook action lets Advanced Form Integration (AFI) send your form submissions to any external URL as an outgoing HTTP request. Whenever a connected form is submitted, AFI builds a request (with your chosen method, headers, body, and authentication) and posts it to the endpoint you specify. This is the universal connector: if a service accepts incoming webhooks or has a REST API, you can reach it even when there is no dedicated AFI integration for it.
Common uses include sending leads to a custom API, triggering an automation in tools like Make or n8n, posting to a serverless function, or relaying data to an in-house application. The Webhook action is a PRO feature.
What You Can Configure
- HTTP method: POST, GET, PUT, PATCH, or DELETE.
- Destination URL, with merge tags supported.
- Content type: JSON or form-urlencoded.
- Authentication: Basic, Bearer token, API key (header or query), or a custom header.
- Headers and body, using either a key/value builder or raw JSON.
- HMAC request signing (optional) so the receiver can verify the payload.
- A Send test request button to verify everything before saving.
Step 1: Choose the Webhook Action
Create or edit an integration, set up your trigger (the form whose data you want to send), then in the Action section:
- In the
Action > Platformdropdown, select Webhook [PRO]. If you do not see it, activate it on the plugin settings page first. - In the
Taskdropdown, select Send Data to Webhook.
Step 2: Set the Method and URL
Pick the HTTP Method the endpoint expects (POST is the most common for sending data), then enter the destination URL. The URL must start with http:// or https://. You may include merge tags in the URL if the endpoint needs a dynamic value.
Note: for GET and HEAD requests, AFI automatically moves the data to the query string instead of the body, so the request is well-formed.
Step 3: Content Type and Authentication
Set the Content Type to match what the endpoint expects. application/json sends a JSON body, and application/x-www-form-urlencoded sends classic form-style data.
Then choose an Authentication method. AFI adds the correct header (or query parameter) for you:
- None / Legacy: no auth, or the older
username|passwordfield for existing setups. - Basic Auth: enter a username and password.
- Bearer Token: sends
Authorization: Bearer <token>. - API Key: send a named key either as a header or as a query parameter.
- Custom Header: any header name and value you need.
Step 4: Build the Headers and Body
Both Headers and Body offer two modes. Use the link above each field to switch between them:
- Key/value builder: add rows of name and value. This is the easiest way to construct a payload, and merge tags work in the values.
- Raw JSON: paste a complete JSON object. Useful for complex or nested payloads.
If you leave the body empty, AFI sends the entire form submission as the payload. Add rows (or raw JSON) only when you want to control the exact shape and field names.
Step 5: Sign the Request (Optional)
If the receiving endpoint verifies signatures, enable HMAC signing. Enter a Secret, choose the Header name the receiver expects, and pick the Algorithm (sha256, sha1, or sha512). AFI computes a hash of the request body and adds it as the chosen header, in the format algorithm=signature. Leave the secret empty to disable signing.
Step 6: Send a Test Request
Before saving, click Send test request to fire the configured request immediately. AFI uses a small sample payload (merge tags resolve to sample values), so this checks your URL, authentication, and headers without needing a real submission. The response appears right below, showing the method, URL, status code, and the response body.
Step 7: Save
Apply Conditional Logic if you only want to send certain submissions, then click Save Integration. From now on, every matching form submission is sent to your endpoint automatically.
Reliability Notes
- If the endpoint returns HTTP 429 (rate limited), AFI retries once, honoring the
Retry-Afterheader. - The destination URL is validated, so only
httpandhttpsaddresses are allowed. - If you use raw JSON for headers or body and the JSON is invalid, the request is stopped and the error is recorded in the integration log instead of sending a broken request.
- Every request and its response are saved to the AFI log, so you can review what was sent and what came back.