Custom webhooks

Custom webhooks integrate P4 Plan with external services, which enables you to share information between the applications. When a custom webhook runs, P4 Plan sends an HTTP post request with a JSON payload to the specified endpoint URL. You can use any endpoint that can process the request.

The custom webhook should have a valid POST API endpoint, and the headers should cover all required headers that the P4 Plan API needs to perform the call. Together with the project selector and the events, the user can select which updates they want to trigger API calls against their webhooks.

For example, updating the status on an item will trigger a custom webhook with this request body:

Copy
{ taskID: '31717', event: 'status' }

Including the headers that have been added to the custom webhook:

Copy
Accept: 'application/json',
'Content-Type': 'application/json',

Use the following steps to create a custom webhook:

1. Click your user name in the toolbar and select Webhooks from the drop-down menu.

The Webhooks panel appears.

2. Click Add new.

3. The Add new webhook panel opens.

4. Set the Type to Custom.

5. Use the Project drop-down menu to select one or more projects to use with the webhook.

6. Enter a Name for the webhook.

7. Enter a URL for the webhook.

8. Use the Webhook events drop-down menu to select which events should trigger the webhook to connect with the external service.

9. If the endpoint uses an SSL/TLS certificate that cannot be verified, such as a self-signed certificate, click Insecure SSL.

10. Use the Headers section to provide authentication details for the external service. This consists of a Key and a Value.

To learn more about specific authentication methods and header requirements, see the documentation for the service or application to which you are connecting.

11. To provide more headers, click Add header.

12. To activate the webhook, tick the Active check box.

13. Provide an optional Description to explain the webhook's purpose or other relevant information.

14. Click Create.

The webhook appears in the Webhooks panel.