Send Statamic form submissions to external webhooks (Zoho Flow, Make, Zapier, etc.).
composer require sennik/statamic-form-webhooksPublish the config file:
php artisan vendor:publish --tag=form-webhooks-configEdit config/form-webhooks.php:
'webhooks' => [
'contact' => [
'url' => env('WEBHOOK_CONTACT_URL'),
'fields' => '*', // all fields
],
'offerte' => [
'url' => env('WEBHOOK_OFFERTE_URL'),
'fields' => ['naam', 'email', 'telefoon'], // specific fields only
],
],Add the webhook URLs to your .env:
WEBHOOK_CONTACT_URL=https://example.com/webhook/contact
WEBHOOK_OFFERTE_URL=https://example.com/webhook/offerte
| Key | Type | Description |
|---|---|---|
url |
string |
The webhook endpoint (POST) |
fields |
string|array |
'*' to send all fields, or an array of field handles to send |
- A visitor submits a Statamic form
- The
FormSubmittedevent fires - The listener checks if a webhook is configured for that form handle
- If so, the submission data is POST'ed to the webhook URL
- Errors are logged but never interrupt the form submission
- PHP 8.2+
- Statamic 5.x or 6.x
MIT