Quick Start
- Create an endpoint on your server to receive webhook payloads
- Configure the webhook URL in your tool settings (dashboard or API)
- Handle incoming requests and process the data
Example Endpoint (Node.js / Express)
Form Submission Webhooks
When a form is submitted, Ansa sends the data to your configured webhook URL.Payload Structure
Payload Fields
Configuring Form Webhooks
Set the webhook URL when creating or updating a form tool: In the Dashboard:- Go to Agents → Tools
- Edit your form tool
- Under Post-Submission Actions, set the Webhook URL
Execution Modes
Control how form submissions are processed:Handling Webhook Requests
Basic Handler
Next.js API Route
Python (Flask)
PHP (Laravel)
Post-Submission Actions
Beyond the primary webhook, you can configure additional actions:Slack Notifications
Send form submissions to a Slack channel:{{fieldName}}— Value of the form field{{_toolName}}— Name of the form tool
Multiple Webhooks
Send data to multiple endpoints:Retry Logic
Ansa automatically retries failed webhook deliveries:
After 5 failed attempts, the submission is marked as
webhook_failed. You can:
- Fix your endpoint and manually retry from the dashboard
- Query failed submissions via API and reprocess
Checking Submission Status
Response Handling
Ansa records your webhook response for debugging:Success Response
Return a 2xx status code:Error Response
Non-2xx responses trigger a retry:Timeout
Webhooks have a 30-second timeout. For long-running operations:- Acknowledge immediately with 200
- Process asynchronously (queue, background job)
Integration Examples
HubSpot CRM
Airtable
Google Sheets (via Apps Script)
Deploy a Google Apps Script as a web app:Best Practices
- Return 200 quickly — Acknowledge receipt before processing
- Use idempotency — Handle duplicate deliveries gracefully using
submissionId - Log everything — Store payloads for debugging
- Handle errors — Return appropriate status codes so Ansa can retry
- Secure your endpoint — Use HTTPS and consider IP allowlisting
Debugging
Check webhook delivery status in the dashboard:- Go to Leads or Form Submissions
- Find the submission
- View Webhook Response for success/error details
Next Steps
Form Tools
Configure form tools with webhooks
Post Actions
Set up Slack and email notifications