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.
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.
Steps
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.
Run the receiver
Download 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 runnode start.mjsbehind your HTTPS address.start.mjs
import { createReceiver } from "./postmortem-webhook-receiver.mjs"; createReceiver(process.env).listen(8080);Set
WEBHOOK_SECRET,TELLAGEN_API,TELLAGEN_KEY,CONFLUENCE,CONFLUENCE_TOKEN,SPACE_IDandPARENT_IDfirst. The receiver writes one page for each incident, updates it for each version, and reports the copy back to Tellagen under the namewiki.Or import the n8n workflow (optional)
If you run n8n, download the workflow file 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.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.
Adapt it to your wiki
For Data Center, use its address and a personal access token, and skip the
editorproperty. For another wiki, ask forformat=htmlorformat=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
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.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.
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.
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.
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 has the rules.
Related guides
Did this help?
Updated . Something out of date? Write to [email protected]. Open Markdown version