Skip to main content
← Documentation

Sentry

Sentry

Connect Sentry to AgentDesk to automatically assess error reports and create tickets for genuine bugs. When a new issue or alert fires in Sentry, AgentDesk runs an AI assessment to decide whether a ticket should be created, what priority it should have, and what the investigation steps are.

What the integration provides

When Sentry is connected to a portal:

  • New Sentry issues trigger an AI assessment workflow that evaluates severity, impact, and whether a ticket should be created
  • Resolved Sentry issues automatically add a comment to the corresponding ticket
  • Sentry alert rules (threshold-based alerts) also trigger assessment workflows
  • Duplicate issues are automatically deduplicated — one Sentry issue maps to one ticket

Setup

Setting up the Sentry integration requires configuration on both the Sentry side and the AgentDesk side.

Step 1: Create an Internal Integration in Sentry

  1. In Sentry, go to Settings > Developer Settings > Custom Integrations.
  2. Click Create New Integration and select Internal Integration.
  3. Configure the integration:
FieldValue
NameAgentDesk (or any name you prefer)
Webhook URLhttps://<your-portal-domain>/api/webhooks/sentry/<portalId>

You can find your portal ID in the AgentDesk admin panel URL (the UUID after /portals/).

  1. Under Webhooks, enable:

    • issue — triggers on created, resolved, assigned, archived, unresolved
    • error (optional) — triggers on new error events
  2. Under Permissions, set at minimum:

    • Issue & Event: Read
  3. Click Save Changes.

  4. Copy the Client Secret shown under Credentials. You will need this for the next step.

:::caution The client secret is only fully visible immediately after creation. If you lose it, you will need to rotate it and update both Sentry and AgentDesk. :::

Step 2: Configure in AgentDesk

  1. Go to Admin > Portals > [your portal] > Integrations.
  2. In the Sentry section, enter:
FieldDescription
Client SecretThe client secret from your Sentry internal integration
Organization Slug(Optional) Your Sentry organization slug
Project Slug(Optional) Your Sentry project slug
  1. Click Connect. AgentDesk validates and saves the credentials.

Step 3: Verify the connection

  1. In Sentry, go to your Internal Integration and click Dashboard.
  2. Trigger a test event (for example, using sentry-cli):
sentry-cli send-event --dsn "YOUR_SENTRY_DSN" -m "Test AgentDesk integration"
  1. Check the Request Log in the Sentry integration dashboard. You should see a 200 status for the issue.created event.
  2. In AgentDesk, go to Workflows to confirm the assessment workflow was triggered.

How it works

Issue assessment workflow

When Sentry sends an issue.created webhook:

  1. AgentDesk verifies the HMAC signature using your client secret
  2. A sentry_issue_assessment workflow is triggered
  3. An AI evaluates the issue based on:
    • Error level and type
    • Number of occurrences and affected users
    • Whether it appears to be a genuine bug vs. expected behaviour
  4. If a ticket should be created, it is created automatically with:
    • A suggested priority (Critical, High, Medium, Low)
    • A summary and description with investigation steps
    • A link back to the Sentry issue via the sentryIssueId

Issue resolution

When a Sentry issue is marked as resolved, AgentDesk adds an internal comment to the corresponding ticket noting the resolution.

Deduplication

Each Sentry issue maps to at most one ticket. If a webhook arrives for an issue that already has a ticket, the duplicate is skipped. Webhook payloads are also deduplicated to handle retry deliveries.

Troubleshooting

Webhooks not arriving

  • Check the Request Log in Sentry's integration dashboard. If it is empty, Sentry is not sending webhooks.
  • Verify the Webhook URL matches your portal's endpoint exactly: https://<domain>/api/webhooks/sentry/<portalId>
  • Ensure the issue webhook checkbox is enabled in the integration settings.

Webhooks returning 401

The HMAC signature verification is failing. This means the client secret in AgentDesk does not match the one in Sentry.

  • Go to the Sentry integration and check (or rotate) the client secret
  • Update the client secret in AgentDesk under Admin > Portals > Integrations > Sentry

Workflow triggered but failed

Check the workflow detail page for the error message. Common causes:

  • "Failed to parse AI assessment output" — The AI response could not be parsed. This can happen with minimal error data. The workflow can be retried.
  • "No org admin found" — No user with org_owner or org_admin role exists in the organization. Add an admin user.

No ticket created after successful workflow

The AI assessment may have determined the issue does not warrant a ticket (for example, a single occurrence of a low-severity warning). Check the workflow result for the reasoning.