# Copy postmortems with a webhook

Send each submitted postmortem to a wiki that Tellagen can't sign in to, such as Confluence Data Center. A small receiver of your own copies it and reports the page back to the incident.

Use this path when Tellagen can't sign in to your wiki: Confluence Data Center, another wiki, or a pipeline of your own. For Confluence Cloud and Notion, the built-in copy is less work. See [Publish a postmortem to Confluence](https://tellagen.com/help/publish-a-postmortem-to-confluence).

The receiver needs a public HTTPS address and an API key with the `incidents:read` and `incidents:write` scopes. Add `customer_revenue:read` only if the wiki may show revenue. See [Create an API key](https://tellagen.com/help/manage-api-keys).

## Before you start

### Intended audience

Engineers who run a receiver for the postmortem webhook, and workspace managers who set it up.

### Required permissions

You need permission to manage settings to add the webhook. The receiver needs an API key with the incidents read and write scopes.


## Procedure

<a id="step-add-the-webhook"></a>

1. **Add the webhook.** Go to **Settings** → **Developers** → **Webhooks** and select **Add webhook**. Tick **postmortem.published** and **postmortem.content_changed**, select **Create webhook**, and save the secret. See [Webhooks](https://tellagen.com/help/manage-webhooks).

<a id="step-run-the-receiver"></a>

2. **Run the receiver.** Download [postmortem-webhook-receiver.mjs](https://tellagen.com/help/assets/postmortem-webhook-receiver.mjs). It runs on Node.js 18 or later and needs no packages. Save the two lines below next to it as `start.mjs`, then run `node start.mjs` behind your HTTPS address.

   Set `WEBHOOK_SECRET`, `TELLAGEN_API`, `TELLAGEN_KEY`, `CONFLUENCE`, `CONFLUENCE_TOKEN`, `SPACE_ID` and `PARENT_ID` first. The receiver writes one page for each incident, updates it for each version, and reports the copy back to Tellagen under the name `wiki`.

start.mjs:

```javascript
import { createReceiver } from "./postmortem-webhook-receiver.mjs";

createReceiver(process.env).listen(8080);
```

<a id="step-import-the-n8n-workflow"></a>

3. **Or import the n8n workflow (optional).** If you run n8n, download the [workflow file](https://tellagen.com/help/assets/postmortem-webhook-n8n.json) and import it into a new workflow. Set the same variables. The workflow checks the signature in a Code step, and that step needs `NODE_FUNCTION_ALLOW_BUILTIN=crypto`.

<a id="step-verify-the-receiver"></a>

4. **Check that it works.** In Tellagen, open the actions menu of the webhook and select **Verify receiver**. Then submit a postmortem version. The incident's Postmortem tab lists your receiver under Copies outside Tellagen, with the link to the page.

<a id="step-adapt-it"></a>

5. **Adapt it to your wiki.** For Data Center, use its address and a personal access token, and skip the `editor` property. For another wiki, ask for `format=html` or `format=markdown`. With Markdown, upload the files that the answer lists. HTML holds its images in the body.

## What happens next

- Tellagen sends **postmortem.published** for each submitted version. If the receiver doesn't answer, Tellagen tries again, up to 8 times in 24 hours.
- After five failed deliveries in a row, Tellagen pauses the webhook. Fix the receiver, then select **Verify receiver** again.

## FAQs

<a id="troubleshooting-the-row-says-stale-what-now"></a>

### The row says Stale. What now?

The receiver holds an older version, or it reported a hash that didn't match. Fetch the render again and report the new `content_sha256`.

<a id="troubleshooting-the-row-says-not-copied-what-now"></a>

### The row says Not copied. What now?

No receiver has reported a copy of this incident yet. Check that the receiver runs and that it answers Tellagen. The Webhooks page shows only the time of the last failure, so read the receiver's own log for the reason.

<a id="troubleshooting-what-does-the-receiver-do-with-postmortem-content-changed"></a>

### What does the receiver do with postmortem.content_changed?

Copy the version again. The event means that someone masked a value in the postmortem. Then delete the old value from the page history in your wiki, because Tellagen can't reach your copy.

<a id="troubleshooting-why-does-the-render-answer-403"></a>

### Why does the render answer 403?

The API key lacks the incidents read scope. A key without the revenue scope gets a copy with the financial values left out.

<a id="troubleshooting-how-do-i-check-that-a-delivery-comes-from-tellagen"></a>

### How do I check that a delivery comes from Tellagen?

Each delivery is signed with the secret of the webhook, and the receiver above checks the signature before it does anything. The [webhook developer guide](https://tellagen.com/api-reference/guides/webhooks) has the rules.

## Related articles

- **Recommended next task:** [Webhooks](https://tellagen.com/help/manage-webhooks)
- [Publish a postmortem to Confluence](https://tellagen.com/help/publish-a-postmortem-to-confluence)
- [Publish a postmortem to Notion](https://tellagen.com/help/publish-a-postmortem-to-notion)


## Continue through the incident lifecycle

- **Previous task:** [Publish a postmortem to Notion](https://tellagen.com/help/publish-a-postmortem-to-notion)
- [Back to Support Center](https://tellagen.com/help#help-search)

## Updated

2026-11-26
