# Save Slack messages and threads as PDFs

Slack to PDF for messages, threads and channels. Save a conversation as a clean, readable PDF record automatically with Zapier, Make or n8n.

**Quick answer.** Pick a trigger, like adding a certain emoji to a message. Your automation collects the message or thread, puts it into a template, html-pdf.com turns it into a PDF, and the PDF is posted back to Slack or saved to your drive.

## What you'll build

React to a message with a page emoji and get a PDF of the whole thread a few seconds later. Save every decision posted in #approvals as a dated PDF. Send a client a tidy copy of a shared channel conversation at the end of a project.

The PDF shows names, times and messages in a clean layout, without the Slack sidebar and buttons a screenshot would include.

## What you need

- **A Slack workspace** where you can add apps.
- **Zapier**, **Make** or **n8n**, connected to Slack.
- **A design.** The [report template](https://html-pdf.com/templates/report) works well as a wrapper. A template is a ready made page design, so you only change the text.
- **An API key** from [html-pdf.com](https://html-pdf.com/login). You get 100 free pages once, with no card.

## Step by step with Zapier (single message)

1. **Trigger.** Create a Zap with **Slack** and the event **New Reaction Added**. Choose the emoji, for example `page_facing_up`.
2. **Make the PDF.** Add **Webhooks by Zapier → Custom Request**. Method `POST`, URL `https://html-pdf.com/v1/pdf`.
3. **Headers.** `Authorization` with `Bearer hp_live_...` and `Content-Type` with `application/json`.
4. **Data.** Paste the JSON below and map the message text, author, channel and time.
5. **Deliver.** Add **Slack → Send Channel Message** with the `url`, or **Google Drive → Upload File** to keep a copy.

```json
{
  "html": "<h1>#approvals</h1><p><b>Priya Shah</b> 10 Oct 2026, 15:42</p><p>Approved the Q4 budget at 48,000 EUR. Go ahead with the vendor contract.</p>",
  "filename": "approval-2026-10-10.pdf",
  "response": "url"
}
```

The `url` is a download link that works for 24 hours, so save the file somewhere if you need it for longer. See the [Zapier guide](https://html-pdf.com/guides/zapier).

## Step by step with n8n (whole thread)

Threads have many replies, so n8n or Make is the better fit.

1. **Trigger.** Add a **Slack Trigger** node listening for reactions, or a **Schedule Trigger** for a daily channel export.
2. **Get the replies.** Add an **HTTP Request** node calling Slack's `conversations.replies` with the channel and the message `ts`, using your Slack credentials.
3. **Build the page.** Add a **Code** node that turns each reply into a block with the name, time and text.
4. **Make the PDF.** Add an **HTTP Request** node posting to `https://html-pdf.com/v1/pdf`. Set the response format to **File**.
5. **Deliver.** Use the **Slack** node to upload the file to the thread, or save it to Google Drive.

The same flow in Make uses **Slack → Make an API Call** and **HTTP → Make a request**. See the [n8n guide](https://html-pdf.com/guides/n8n) and [Make guide](https://html-pdf.com/guides/make).

## Code path for developers

With a Slack bot token that can read history, a thread export is a short script.

```js
const { messages } = await (await fetch(
  `https://slack.com/api/conversations.replies?channel=${process.env.CHANNEL}&ts=${process.env.THREAD_TS}`,
  { headers: { Authorization: `Bearer ${process.env.SLACK_TOKEN}` } }
)).json();

const body = messages.map(m => {
  const time = new Date(Number(m.ts) * 1000).toLocaleString("en-GB");
  return `<div style="margin-bottom:12px"><b>${m.user}</b> <small>${time}</small><p>${m.text}</p></div>`;
}).join("");

const r = await fetch("https://html-pdf.com/v1/pdf", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.HTML_PDF_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ html: `<h1>Thread export</h1>${body}`, format: "A4", response: "url" }),
});
console.log((await r.json()).url);
```

Messages include user IDs. Look up names with `users.info` if you want full names in the PDF.

## Ask your AI agent

Connect the [html-pdf.com MCP server](https://html-pdf.com/pdf-mcp-server) to an assistant that can read Slack.

> Read the thread about the vendor contract in #approvals and use html-pdf to make an A4 PDF record. Show each message with name and time, and add a short summary of the decision at the top.

## FAQ

### Can I export a whole Slack channel to PDF?

Yes. Use `conversations.history` instead of `conversations.replies`, and run it on a schedule. Long channels may become many pages, and each page costs one credit.

### Will images and files from Slack appear?

Slack files need a login, so they will not load by link. List them by name in the PDF, or download them in your automation and include them as data links.

### Do I need admin rights?

You need permission to add an app or connect Zapier, Make or n8n. The app can only read channels it has been added to.

### Is my conversation stored by html-pdf.com?

No. Your HTML is not stored, and download links expire after 24 hours.
