← PagerDuty + Data Stores integrations

Add or update a single record with Data Stores API on New or Updated Incident from PagerDuty API

Pipedream makes it easy to connect APIs for Data Stores, PagerDuty and 1000+ other apps remarkably fast.

Trigger workflow on
New or Updated Incident from the PagerDuty API
Next, do this
Add or update a single record with the Data Stores API
No credit card required
Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜

Trusted by 500,000+ developers from startups to Fortune 500 companies

Adyen logo
Brex logo
Carta logo
Checkr logo
Chameleon logo
DevRev logo
LinkedIn logo
Netflix logo
New Relic logo
OnDeck logo
Replicated logo
Scale AI logo
Teamwork logo
Warner Bros. logo
Xendit logo

Developers Pipedream

Getting Started

This integration creates a workflow with a PagerDuty trigger and Data Stores action. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Select this integration
  2. Configure the New or Updated Incident trigger
    1. Connect your PagerDuty account
    2. Select a Service ID
    3. Optional- Select one or more Events
  3. Configure the Add or update a single record action
    1. Connect your Data Stores account
    2. Configure Data Store
    3. Select a Key
    4. Configure Value
  4. Deploy the workflow
  5. Send a test event to validate your setup
  6. Turn on the trigger

Details

This integration uses pre-built, source-available components from Pipedream's GitHub repo. These components are developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

Trigger

Description:Emit new event each time an incident is created or updated
Version:0.1.1
Key:pagerduty-new-or-updated-incident

PagerDuty Overview

PagerDuty's APIs allow you to integrate the powerful incident response
capabilities of PagerDuty with your own custom applications. With PagerDuty's
APIs, you can build applications to optimize your incident response process,
collaborate with teams more effectively, and analyze data from your incident
response process. Here are some examples of what you can do with PagerDuty's
APIs:

  • Create and manage automated incident response workflows
  • Automatically trigger actions based on incident response events
  • Enable communication between PagerDuty and other third party applications
  • Pull data from your previous incident response processes to identify best
    practices
  • Create custom reporting tools and insights into incident response processes
  • Monitor multiple teams and services at once

Trigger Code

import constants from "../../common/constants.mjs";
import commonWebhook from "../common-webhook.mjs";

export default {
  ...commonWebhook,
  type: "source",
  key: "pagerduty-new-or-updated-incident",
  name: "New or Updated Incident",
  version: "0.1.1",
  description: "Emit new event each time an incident is created or updated",
  methods: {
    ...commonWebhook.methods,
    getMetadata({
      id, occurred_at, data,
    }) {
      return {
        id,
        summary: `Incident ${data.incident?.id || data.id} has been created or updated`,
        ts: Date.parse(occurred_at),
      };
    },
    getEventTypes() {
      return constants.INCIDENT_EVENT_TYPES;
    },
    getHookName() {
      return "New or Updated Incident";
    },
  },
};

Trigger Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
LabelPropTypeDescription
PagerDutypagerdutyappThis component uses the PagerDuty app.
N/Adb$.service.dbThis component uses $.service.db to maintain state between executions.
N/Ahttp$.interface.httpThis component uses $.interface.http to generate a unique URL when the component is first instantiated. Each request to the URL will trigger the run() method of the component.
Service IDserviceIdstringSelect a value from the drop down menu.
EventswebhookEventstring[]Select a value from the drop down menu:incident.acknowledgedincident.annotatedincident.delegatedincident.escalatedincident.reassignedincident.reopenedincident.resolvedincident.status_update_publishedincident.triggeredincident.unacknowledgedincident.responder.addedincident.responder.repliedincident.priority_updatedservice.createdservice.deletedservice.updated

Trigger Authentication

PagerDuty uses OAuth authentication. When you connect your PagerDuty account, Pipedream will open a popup window where you can sign into PagerDuty and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any PagerDuty API.

Pipedream requests the following authorization scopes when you connect your account:

About PagerDuty

Real-Time Operations and Incident Response

Action

Description:Add or update a single record in your [Pipedream Data Store](https://pipedream.com/data-stores/).
Version:0.0.8
Key:data_stores-add-update-record

Data Stores Overview

With the Data Stores API, you can build applications that:

  • Store data for later retrieval
  • Retrieve data from a store
  • Update data in a store
  • Delete data from a store

Action Code

import app from "../../data_stores.app.mjs";

export default {
  key: "data_stores-add-update-record",
  name: "Add or update a single record",
  description: "Add or update a single record in your [Pipedream Data Store](https://pipedream.com/data-stores/).",
  version: "0.0.8",
  type: "action",
  props: {
    app,
    dataStore: {
      propDefinition: [
        app,
        "dataStore",
      ],
    },
    key: {
      propDefinition: [
        app,
        "key",
        ({ dataStore }) => ({
          dataStore,
        }),
      ],
      description: "Enter a key for the record you'd like to create or select an existing key to update.",
    },
    value: {
      propDefinition: [
        app,
        "value",
      ],
    },
  },
  async run({ $ }) {
    const {
      key,
      value,
    } = this;
    const exists = await this.dataStore.has(key);
    const parsedValue = this.app.parseValue(value);
    await this.dataStore.set(key, parsedValue);
    // eslint-disable-next-line multiline-ternary
    $.export("$summary", `Successfully ${exists ? "updated the record for" : "added a new record with the"} key, \`${key}\`.`);
    return {
      key,
      value: parsedValue,
    };
  },
};

Action Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI.

LabelPropTypeDescription
Data StoresappappThis component uses the Data Stores app.
Data StoredataStoredata_store

Select an existing Data Store or create a new one.

KeykeystringSelect a value from the drop down menu.
Valuevalueany

Enter a string, object, or array.

Action Authentication

The Data Stores API does not require authentication.

About Data Stores

Use Pipedream Data Stores to manage state throughout your workflows.

More Ways to Connect Data Stores + PagerDuty

Add or update multiple records with Data Stores API on New or Updated Incident from PagerDuty API
PagerDuty + Data Stores
 
Try it
Delete All Records with Data Stores API on New or Updated Incident from PagerDuty API
PagerDuty + Data Stores
 
Try it
List keys with Data Stores API on New or Updated Incident from PagerDuty API
PagerDuty + Data Stores
 
Try it
List Records with Data Stores API on New or Updated Incident from PagerDuty API
PagerDuty + Data Stores
 
Try it
Delete a single record with Data Stores API on New or Updated Incident from PagerDuty API
PagerDuty + Data Stores
 
Try it
New On-Call Rotation from the PagerDuty API

Emit new event each time a new user rotates onto an on-call rotation

 
Try it
New or Updated Incident from the PagerDuty API

Emit new event each time an incident is created or updated

 
Try it
Acknowledge Incident with the PagerDuty API

Acknowledge an incident. See the docs here

 
Try it
Find Oncall User with the PagerDuty API

Find the user on call for a specific schedule. See the docs here

 
Try it
Resolve Incident with the PagerDuty API

Resolve an incident. See the docs here

 
Try it
Trigger Incident with the PagerDuty API

Trigger an incident. See the docs here

 
Try it
Add or update a single record with the Data Stores API

Add or update a single record in your Pipedream Data Store.

 
Try it