Webhook Integration
Enabling the Webhook Integration allows Frill to call a script on your server when one or more events happen in the Frill system. Webhooks can be thought of as event listeners or push notifications. They allow you to build or set up integrations, which subscribe to certain events on Frill.co. When one of those events is triggered, we'll send a HTTP POST payload to the webhook's configured URL. Webhooks can be used to update an external issue tracker, trigger CI builds, update support tickets, or even send alerts to your email address.
Configuring webhooks can be done through the Frill Settings page. Simply log in, click on your profile avatar in the top header bar, then select Settings, then click on Webhooks.
Webhook Response
When Frill triggers a webhook URL on your site it will send data in the following format:
Parameter name | Description |
triggered_at | Date / time the event was generated (UTC timezone) |
event | Event name - see table below |
data | Data associated with the event |
data_type | The type of the data |
|
Events
Event | Description |
idea.created | An Idea was created in Frill |
idea.updated | An Idea was update in Frill |
idea.deleted | An Idea was deleted in Frill |
idea.archived | Idea was archived |
idea.statusChanged | Idea status was changed |
idea.roadmapChanged | An idea was shown / hidden from the road map |
idea.merged | Idea was merged into another idea |
idea.voted | Someone voted on an idea |
idea.unvoted | Someone unvoted an idea / removed their vote |
comment.created | A comment was created |
comment.updated | A comment was update |
comment.deleted | A comment was update |
note.created |
A note was created |
note.updated | A note was update |
note.deleted | A note was update |
announcement.created | An announcement was created |
announcement.published | An announcement was published |
announcement.updated | An announcement was update |
announcement.deleted | An announcement was delete |
Authenticating Hooks
When Frill posts the webhook data to your server, it will also send a header that will contain a signature your server can use to check that the payload hasn't been tampered with and that the request actually came from Frill.
To authenticate the hook you'll need the
Webhook Secret from the
Company Settings > Webhook page.
Here is an example of how to verify the signature (in PHP):
// $payload is the array of data send from Frill // $webhookSecret is the API Key from the Frill Webhook Settings page // $frillSignature is the Signature string sent as a HTTP Header $payloadJson = json_encode($payload); $webhookSecret = 'SECRET_FROM_THE_SETTINGS_PAGE' $frillSignature = isset($_SERVER['HTTP_SIGNATURE']) ? $_SERVER['HTTP_SIGNATURE'] : (isset($_SERVER['SIGNATURE']) ? $_SERVER['SIGNATURE'] : ''); $computedSignature = hash_hmac('sha256', $payloadJson, $webhookSecret); if ($computedSignature != $frillSignature) { die('Signatures do not match!'); } // All good