Custom Event Transformer Integration Guide

A Custom Event Transformer allows users to reliably convert a payload sent by integrations to a payload understood by PagerDuty, using JavaScript (ES5).

In PagerDuty

  1. Go to the Services menu and select Service Directory.
  2. On the Service Directory page:
    • If you are creating a new service for your integration, click +New Service and follow the steps outlined, selecting Custom Event Transformer in step 4.
    • If you are adding your integration to an existing service, click the name of the service you want to add the integration to. Then click the Integrations tab and click Add a new integration.
  3. Under Select the integration(s) you use to send alerts to this service search and select Custom Event Transformer.
  4. Click the Add Service or Add Integration button to save your new integration. You will be redirected to the Integrations page for your service.
  5. Find the Custom Event Transformer integration in the integrations list and click the cog icon to the right. On the integration details page, click the Show JavaScript button. You will have some pre-populated code which would create an event with the raw body of the request in the body.
  6. To update the JavaScript, click the Edit Integration button to the right.
  7. From this page you can update the JavaScript to convert the incoming payload as necessary for this integration. When you have completed your updates, click Save changes to save your new transformer. More details on creating a Custom Event Transformer can be found in our Developer Documentation.

FAQ

What tools can we integrate with using the Custom Event Transformer?

The Custom Event Transformer can be integrated with any tool that can send an HTTP request. The integration is built to allow the incoming payload to be manipulated into a format that PagerDuty understands.

Will the transformer automatically parse the body of my request?

The PD object contains both rawBody and body properties. If a valid Content-type is given in the request, the body property will contain the parsed data.

How does the custom event transformer deduplicate events?

The transformer deduplicates events based upon the incident_key property within the normalized_event object.

Start Using PagerDuty Today

Try PagerDuty free for 14 days — no credit card required.