> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rootly.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Heroku

> Track Heroku builds and releases as pulses in Rootly, and run commands on dynos directly from incident workflows for deployment context and rollback.

## Overview

The Heroku integration connects Rootly to your Heroku apps via OAuth. Build and release events are automatically tracked as pulses so your team can correlate deployments with incidents — and the **Run Command on Heroku** workflow action lets you execute rollbacks or diagnostic scripts on a live dyno without leaving the incident response flow.

<CardGroup cols={2}>
  <Card title="Deployment Pulses" icon="rocket">
    Build starts, completions, and release events are automatically tracked as Rootly pulses and linked to matching services.
  </Card>

  <Card title="Run Commands on Dynos" icon="terminal">
    Execute one-off commands on a Heroku dyno from a workflow — output is streamed and posted to Slack.
  </Card>

  <Card title="Service Correlation" icon="link">
    Pulses are automatically associated with Rootly services that have a matching Heroku app name configured.
  </Card>

  <Card title="Scoped Monitoring" icon="filter">
    Choose which Heroku apps to monitor — Rootly only creates webhooks on the apps you explicitly list.
  </Card>
</CardGroup>

## Before You Begin

* You must be a Rootly admin to set up the integration
* You need a Heroku account with access to the apps you want to monitor

<Warning>
  Connect using a **Heroku service account** rather than a personal user account. If the connecting user leaves your organization, the OAuth token becomes invalid and the integration will stop working.
</Warning>

## Installation

<Steps>
  <Step title="Open the Heroku integration in Rootly">
    Go to **Configuration → Integrations**, find **Heroku**, and click **Setup**.

    <Frame>
      <img alt="Heroku integration in the integrations list" src="https://mintcdn.com/rootly/DEGWl8qg20zbzmSF/images/integrations/heroku/images-1.webp?fit=max&auto=format&n=DEGWl8qg20zbzmSF&q=85&s=b1bc2fca304aecaf5012e2c6607b66cd" width="864" height="212" data-path="images/integrations/heroku/images-1.webp" />
    </Frame>
  </Step>

  <Step title="Authorize Rootly in Heroku">
    Click **Connect Heroku Account**. You'll be redirected to Heroku to authorize Rootly's OAuth application. After approving, you'll be returned to Rootly with the integration connected.

    <Frame>
      <img alt="Heroku OAuth authorization screen" src="https://mintcdn.com/rootly/DEGWl8qg20zbzmSF/images/integrations/heroku/images-2.webp?fit=max&auto=format&n=DEGWl8qg20zbzmSF&q=85&s=aa7d32412ce9d1f8d392d5721d76cff0" width="864" height="392" data-path="images/integrations/heroku/images-2.webp" />
    </Frame>
  </Step>

  <Step title="Select apps to monitor">
    In the integration settings, add the names of the Heroku apps you want to track. Rootly creates webhooks on each listed app to receive build and release events.

    <Note>
      If you leave the app list empty, no webhooks are created and no pulses will be tracked. Add app names to enable pulse tracking.
    </Note>
  </Step>
</Steps>

## Pulse Events

Rootly ingests Heroku webhook events and records them as pulses on the incident timeline and service activity feed. Pulses are automatically linked to Rootly services with a matching **Heroku App Name** field.

### Build Events

| Event           | Pulse Summary                          |
| --------------- | -------------------------------------- |
| Build started   | `[Heroku][Build] {app_name} pending`   |
| Build succeeded | `[Heroku][Build] {app_name} succeeded` |
| Build failed    | `[Heroku][Build] {app_name} failed`    |

Each pulse includes the build ID, commit SHA, and the email of the user who triggered the build.

### Release Events

| Event            | Pulse Summary                             |
| ---------------- | ----------------------------------------- |
| Release deployed | `[Heroku][Release] {release description}` |

Each pulse includes the release version, status, commit SHA, and app name. Rootly filters out non-current release updates to avoid duplicate pulses from Heroku's release phase behavior.

<Note>
  Rootly tracks `api:build` and `api:release` webhook events. Dyno events (`api:dyno`) are received but not currently converted into pulses.
</Note>

## Workflow Action

### Run Command on Heroku

Executes a one-off command on a Heroku dyno and streams the output to Slack. Useful for running rollbacks, querying database state, or executing diagnostic scripts mid-incident.

<ParamField body="Command" type="string" required>
  The command to run on the dyno. Supports [Liquid variables](/liquid/incident-variables) — for example, use `{{ incident.title }}` to reference the active incident.
</ParamField>

<ParamField body="App Name" type="string" required>
  The name of the Heroku app to run the command against.
</ParamField>

<ParamField body="Dyno Size" type="enum" required>
  The size of the one-off dyno to spin up:

  * `standard-1X`
  * `standard-2X`

  Defaults to `standard-1X`.
</ParamField>

<ParamField body="Time to Live" type="integer">
  Maximum run time for the command in seconds. Capped at **1800 seconds (30 minutes)** regardless of the value set. Defaults to `1800`.
</ParamField>

<ParamField body="Post to Incident Timeline" type="boolean">
  When enabled, records the command run as an event on the incident timeline.
</ParamField>

<ParamField body="Post to Slack Channels" type="array">
  One or more Slack channels to receive the command output as a file attachment once execution completes.
</ParamField>

<Tip>
  Rootly connects to the dyno over TLS using the Rendezvous protocol, streams all output lines, and posts the collected output to Slack once the command completes or the dyno exits.
</Tip>

## Uninstall

To remove the Heroku integration:

1. Go to **Configuration → Integrations** and find **Heroku**
2. Click **Connected** to reveal the disconnect option
3. Click **Disconnect**

<Frame>
  <img src="https://mintcdn.com/rootly/QMD-dNqeYW4BA9dg/images/integrations/common/uninstall-connected.png?fit=max&auto=format&n=QMD-dNqeYW4BA9dg&q=85&s=dbb790e2576c8969bba96bc26c95265f" alt="Click Connected to reveal the Disconnect option" width="319" height="188" data-path="images/integrations/common/uninstall-connected.png" />
</Frame>

Disconnecting removes the integration and deletes all Rootly-managed webhooks from your Heroku apps.

## Frequently Asked Questions

<AccordionGroup>
  <Accordion title="Build and release events are not appearing as pulses" icon="eye-slash">
    Confirm the app names are listed in the integration settings. Rootly only creates webhooks on explicitly listed apps. Also check that the connected Heroku account still has access to those apps — if permissions have changed, webhooks may have been removed.
  </Accordion>

  <Accordion title="Pulses are not linked to a service" icon="link-slash">
    Rootly links Heroku pulses to services by matching the **Heroku App Name** field on each service. Go to the affected service and confirm the field exactly matches the Heroku app name (case-sensitive).
  </Accordion>

  <Accordion title="Run Command fails or produces no output" icon="terminal">
    Confirm the app name is correct and the connected OAuth account has permission to create dynos on that app. If the command exits immediately, check that it's compatible with the app's runtime environment, buildpack, and Procfile.
  </Accordion>

  <Accordion title="The integration disconnected unexpectedly" icon="plug-circle-xmark">
    Heroku OAuth tokens can expire or be revoked if the authorizing user's account access changes. Reconnect using a service account to prevent future disruption. After reconnecting, verify webhooks have been re-created on your monitored apps.
  </Accordion>

  <Accordion title="Duplicate pulses are appearing for the same release" icon="copy">
    Heroku sends multiple webhook events during the release phase. Rootly filters out non-current updates, but each pipeline promotion generates its own release event — so deploys through multiple pipeline stages will produce multiple pulses by design.
  </Accordion>
</AccordionGroup>
