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

# Pylon

> Capture support issues from Pylon and act on them with the agent

export const Prompt = ({text, variant = 'accent'}) => {
  const [copied, setCopied] = useState(false);
  const handleCopy = async () => {
    try {
      await navigator.clipboard.writeText(text);
      setCopied(true);
      setTimeout(() => setCopied(false), 2000);
    } catch {}
  };
  const clipboardIcon = <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
            <title>Copy</title>
            <rect x="9" y="9" width="13" height="13" rx="2" ry="2" />
            <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" />
        </svg>;
  const checkIcon = <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
            <title>Copied</title>
            <polyline points="20 6 9 17 4 12" />
        </svg>;
  const promptIcon = <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style={{
    flexShrink: 0,
    opacity: 0.4
  }}>
            <title>Prompt</title>
            <path d="M20 2H2v20h2V4h16v12H6v2H4v2h2v-2h16V2zM6 7h12v2H6zm8 4H6v2h8z" />
        </svg>;
  return <div className={`prompt prompt-${variant}`} style={{
    marginTop: '12px',
    marginBottom: '12px'
  }}>
            {promptIcon}
            <span className="prompt-text">{text}</span>
            <button className="prompt-copy" onClick={handleCopy} title="Copy to clipboard" type="button">
                {copied ? checkIcon : clipboardIcon}
            </button>
        </div>;
};

The Pylon integration captures support issues and their messages from your Pylon workspace and feeds them into Modem for analysis. Each issue becomes a conversation that's grouped into [topics](/docs/guides/topics) and linked to the [people and companies](/docs/guides/people) behind it. The [Modem Agent](/docs/features/agent) can also act on Pylon directly: search issues, reply to customers, add internal notes, and manage tags.

<Warning>
  Pylon is currently in **beta** and access is rolled out per organization. If you don't see it under **Settings** → **Integrations**,
  email [support@modem.dev](mailto:support@modem.dev) to request access.
</Warning>

<Info>
  Capture is **trigger-based**: Modem gives you a webhook URL, and you create triggers in Pylon that send issue events to it. Events only
  flow for the triggers you set up, so you control exactly which activity reaches Modem.
</Info>

## How it works

Modem connects to Pylon with an **API token** you generate in Pylon. Modem validates the token against Pylon's API before saving it, and encrypts it before storing.

On connect, Modem generates a unique **webhook URL** and a **shared secret** for your organization. You register the URL as a webhook endpoint in Pylon and create one trigger per event you want captured, using JSON body templates the setup wizard provides. Every delivery is authenticated against the shared secret before anything is stored.

When an event arrives, Modem fetches any missing issue or message content from Pylon's REST API, so a conversation is complete even if the trigger payload only carried the issue ID.

You can optionally run a **historical backfill** that imports the last 30 days of Pylon issues and messages, so existing conversations show up in topics right away.

## Prerequisites

* **Owner or admin** role in your Modem organization, to connect and manage the integration
* A **Pylon admin**, since only Pylon admins can create API tokens, and you'll need access to Pylon's webhook and trigger settings
* Beta access enabled for your Modem organization (see the note above)
* A Modem organization on a plan that includes Pylon

## Setup

<Steps>
  <Step title="Connect with an API token">
    Go to **Settings** → **Integrations** → **Pylon** in your Modem dashboard. Generate a token at
    [app.usepylon.com/settings/api-tokens](https://app.usepylon.com/settings/api-tokens), paste it into the form, and click **Connect
    Pylon**. Modem verifies the token with Pylon before saving it.
  </Step>

  <Step title="Add the webhook endpoint in Pylon">
    After connecting, Modem shows your webhook URL. In Pylon, go to **Settings** → **Webhooks** and add a new endpoint with that URL.
  </Step>

  <Step title="Add the Authorization header">
    Add a custom header to the webhook in Pylon: `Authorization: Bearer <shared secret>`, using the shared secret Modem displays.

    <Note>The shared secret is shown **once**, right after connecting. If you lose it, rotate it from the Pylon settings page in Modem to reveal a new one, then update your Pylon webhook.</Note>
  </Step>

  <Step title="Create triggers for the events you want">
    In Pylon, go to **Settings** → **Triggers** and create one trigger per event below. Set the "When" condition to the matching event,
    set the action to **Send webhook** pointing at your Modem webhook URL, and paste the matching JSON body template from the setup
    wizard. See [Captured Events](#captured-events).
  </Step>

  <Step title="Backfill history (optional)">
    Click **Start backfill** on the Pylon settings page to import the last 30 days of issues and messages. Pylon's API is rate-limited,
    so a busy workspace can take a while.
  </Step>
</Steps>

## Captured Events

Modem supports five Pylon events. Each has its own trigger template in the setup wizard; only the events you create triggers for are captured.

| Event                           | When it fires             | What Modem stores                                               |
| ------------------------------- | ------------------------- | --------------------------------------------------------------- |
| `issue.created`                 | A new issue is opened     | A new conversation with the issue title and the opening message |
| `issue.message.contact_replied` | A customer replies        | The customer's reply, threaded into the conversation            |
| `issue.message.admin_replied`   | A teammate replies        | The teammate's reply, threaded into the conversation            |
| `issue.note.added`              | An internal note is added | The note, marked internal                                       |
| `issue.state.changed`           | The issue's state changes | A state update on the issue (open, closed, and so on)           |

Alongside messages, Modem stores issue metadata: title, state, tags, requester, assignee, and a link back to the issue in Pylon. Issue authors are resolved to Modem [people](/docs/guides/people) using the email addresses Pylon provides, which rolls support conversations up to the companies behind them.

<Note>
  If a value shows up in Modem as a literal `{{…}}` string, Pylon didn't resolve that variable in your trigger template. Re-insert it in
  the trigger's body editor using Pylon's variable picker. Modem strips unresolved fields rather than failing the delivery, and fills in
  missing content from Pylon's API where it can.
</Note>

## Using the Agent with Pylon

The Modem Agent can query your captured Pylon data like any other source, and it can act on Pylon directly through Pylon's REST API: searching issues, reading contacts and accounts, replying to customers, adding internal notes, and managing tags.

<Prompt text="What are customers reporting in Pylon this week?" />

<Prompt text="Find open Pylon issues about billing and summarize them" />

<Prompt text="Reply to Pylon issue #142 letting the customer know the fix ships Friday" />

<Prompt text="Add an internal note to that issue linking the Linear ticket" />

Two safeguards apply to writes:

* **Approval prompts.** Read requests run without interruption. Any write to Pylon (a reply, note, or tag change) asks for your approval in the chat before it runs.
* **Write toggle.** The **Allow AI agent to write to Pylon** setting on the Pylon settings page disables agent writes entirely for your organization. Reads keep working.

<Note>
  Pylon attributes API actions to the owner of the API token, so agent replies and notes appear in Pylon as the person who created the
  token.
</Note>

## Settings

On **Settings** → **Integrations** → **Pylon**:

* **Allow AI agent to write to Pylon**: When off, the agent can read Pylon data but cannot reply, add notes, or change tags.
* **Forward attachment metadata to ingest**: When off, attachment URLs and metadata are stripped from captured events.
* **Rotate secret**: Generates a new webhook shared secret and reveals it once. Update your Pylon webhook's Authorization header after rotating.

## Troubleshooting

<AccordionGroup>
  <Accordion title="I don't see Pylon in Integrations">
    The integration is in beta and enabled per organization. Email [support@modem.dev](mailto:support@modem.dev) to request access. Once
    enabled, the Pylon card appears under **Settings** → **Integrations**.
  </Accordion>

  <Accordion title="Connecting fails with my API token">
    Modem validates the token against Pylon before saving it. Confirm you copied the full token from
    [app.usepylon.com/settings/api-tokens](https://app.usepylon.com/settings/api-tokens). Only Pylon admins can create API tokens.
  </Accordion>

  <Accordion title="Pylon's webhook test succeeds but no issues appear">
    The test button only confirms the endpoint and Authorization header are correct. Issues flow through **triggers**, so check that
    you've created a trigger per event with the **Send webhook** action pointing at your Modem webhook URL, with the JSON template
    pasted into the body.
  </Accordion>

  <Accordion title="Deliveries are rejected as unauthorized">
    The webhook's `Authorization: Bearer` header must carry your current shared secret. If the secret was rotated in Modem, the old one
    stops working immediately; update the header in Pylon with the new value.
  </Accordion>

  <Accordion title="Fields arrive as literal {{ }} strings">
    Pylon didn't resolve that variable in your trigger template. Re-insert it using Pylon's variable picker in the trigger body editor.
    Modem ignores unresolved fields rather than failing the delivery.
  </Accordion>

  <Accordion title="Older conversations are missing">
    Live capture starts when your triggers go live. The optional backfill imports the last **30 days** of issues; anything older isn't
    imported. Backfills also run slowly on busy workspaces because Pylon rate-limits its search API.
  </Accordion>
</AccordionGroup>

## Disconnecting

To disconnect Pylon:

1. Go to **Settings** → **Integrations** → **Pylon**
2. Click **Disconnect** and confirm

Modem stops accepting webhook deliveries from your Pylon workspace. Historical data remains in Modem after disconnecting.

<Note>
  Reconnecting later generates a new webhook URL and shared secret, so your existing Pylon webhook and triggers will need to be updated.
</Note>

## Related

<CardGroup cols={2}>
  <Card title="The Modem Agent" icon="https://mintcdn.com/modem-844d7a4a/Wr2r4IRr97lNQiQb/icons/bot.svg?fit=max&auto=format&n=Wr2r4IRr97lNQiQb&q=85&s=2496f9106cb54fa9f4e27ad1f8f3a171" href="/docs/features/agent" width="22" height="22" data-path="icons/bot.svg">
    Query your Pylon conversations and act on issues from chat.
  </Card>

  <Card title="Topics" icon="https://mintcdn.com/modem-844d7a4a/Wr2r4IRr97lNQiQb/icons/label-alt-multiple.svg?fit=max&auto=format&n=Wr2r4IRr97lNQiQb&q=85&s=e7fbaf23c28396ac670b89cf38e1e4a6" href="/docs/guides/topics" width="24" height="24" data-path="icons/label-alt-multiple.svg">
    See how support issues are grouped into themes and classified.
  </Card>

  <Card title="Companies & People" icon="https://mintcdn.com/modem-844d7a4a/Wr2r4IRr97lNQiQb/icons/contact.svg?fit=max&auto=format&n=Wr2r4IRr97lNQiQb&q=85&s=727cb0ef6c8547993c6acfdaa30bd837" href="/docs/guides/people" width="24" height="24" data-path="icons/contact.svg">
    Understand how Modem links issue requesters into unified profiles.
  </Card>

  <Card title="All Integrations" icon="https://mintcdn.com/modem-844d7a4a/Wr2r4IRr97lNQiQb/icons/link.svg?fit=max&auto=format&n=Wr2r4IRr97lNQiQb&q=85&s=e774d33588635d44c6c935b78ed55f13" href="/docs/integrations/overview" width="24" height="24" data-path="icons/link.svg">
    Browse every data source and agent tool.
  </Card>
</CardGroup>
