Form Webhooks
Use Basin to repost submission data to other apps and services.
Configuring a webhook
If you only need to forward submission data to a single app or service, then a custom webhook is a great solution. Basin supports the following types of payloads for custom webhooks:
- JSON
- Data wrapped JSON
- Form URL encoded
- Customer.IO
- Microsoft Teams
- MailerLite
- Pardot Form Handler
- Custom Webhook Template
To setup a custom webhook in Basin, go to the Integrations page in your form dashboard, enter your desired URL in the input field, save, and you're all set!
When a submission is received by an endpoint with a configured webhook URL, Basin will queue up a post on your behalf. If the webhook fails, we will retry up to 15 times over the course of 24-28 hours with an exponential backoff. The format of our webhooks will be exactly what we receive on the inital form submission.
Webhook Triggering
Only submissions that are not flagged as spam will trigger a webhook by default. There is a checkbox to enable webhooks for all submsissions. This is an excellent strategy for bypassing any spam filtering by Basin.
Payload Types
JSON
{
"email": "example@example.com",
"name": "Example Name",
"id": "submission_id",
"attachments": [
{
"attachment_proxy_url": "proxy_url",
"public_url": "public_url"
}
]
}
Data wrapped JSON
{
"data": {
"email": "example@example.com",
"name": "Example Name",
"id": "submission_id",
"attachments": [
{
"attachment_proxy_url": "proxy_url",
"public_url": "public_url"
}
]
}
}
Customer.IO
{
"data": {
"email": "example@example.com",
"name": "Example Name",
"submission_id": "submission_id"
}
}
Form URL encoded/Pardot Form Handler
For Form URL encoded and the Pardot Form Handler, the form data is sent as is without any additional processing. Here is an example:
The only difference between the Form URL encoded and the Pardot Form Handler is when the submission has array values. Pardot Form Handlers do not support array values and require duplicate keys for each array value. The Pardot Form Handler payload type will properly send array values using multiple duplicate keys.MailerLite integration
The MailerLite payload type will send the submission data to MailerLite as follows:
Customer.IO integration
To integrate your form with Customer.io using webhooks, follow these steps:
- Open your Basin dashboard and navigate to the form you wish to integrate with Customer.io.
- Go to 'Integrations' and then 'Webhooks'.
- Click on 'Create a new webhook'.
- In the 'Webhook URL' field, enter the webhook URL provided by Customer.io for your form.
- In the 'Payload Format' field, select "Customer IO."
- Provide the necessary authentication headers. Use "Authorization" as the Header Name and "Basic YOUR_CUSTOMER_IO_API_KEY" as the Header Value, replacing YOUR_CUSTOMER_IO_API_KEY with your actual Customer.io API key.
With these steps, your form is now integrated with Customer.io and will send data via webhooks.
Microsoft Teams Integration
Seamlessly send submission data to your Microsoft Teams channels with our Basin-Teams integration. Head to our Microsoft Teams integration guide to get started.
Pardot Form Handler Integration
To integrate your form with Pardot using webhooks, follow these steps:
- Open your Basin dashboard and navigate to the form you wish to integrate with Pardot.
- Go to 'Integrations' and then 'Webhooks'.
- Click on 'Create a new webhook'.
- In the 'Webhook URL' field, enter the webhook URL provided by your Pardot form handler.
- In the 'Payload Format' field, select "Pardot."
- Provide any necessary authentication headers.
With these steps, your form is now integrated with Pardot and will send data via webhooks.
Custom Webhook Template
If none of the pre-built payloads meet your needs you can build your own custom webhook using our template builder.
Setup a custom webhook template
- Open your Basin dashboard and navigate to the form you wish to integrate with a custom webhook body.
- Go to 'Integrations' and then 'Webhooks'.
- Click on 'Create a new webhook'.
- In the 'Webhook URL' field, enter the webhook URL you wish to send the payload to.
- In the 'Payload Format' field, select "Custom."
- Provide any necessary authentication headers.
- Save the webhook.
- Edit the webhook body by following the link to 'Edit Custom Format'
Webhook templates support merge tags, placeholders for submission data that are dynamically replaced with the submission data when the webhook is sent. To learn more about merge tags, check out our docs here.
Custom Webhook Content Types
Basin supports several different content types for sending webhook data:
- application/json
- application/xml
- application/x-www-form-urlencoded
- multipart/form-data
- text/plain
- application/graphql