Generate PDFs from Notion

To generate a PDF from Notion, add a database automation that POSTs to the Docweave API (/api/v1/pdf) with your API key and a JSON body built from the page's properties — Docweave renders it and returns the PDF in the response.

Wire the automation step by step

Notion's database automations can send an outbound webhook, so no separate connector app is required:

  1. Open the Notion database you want to generate PDFs from and click the ⚡ Automations icon in the top-right corner.
  2. Click + New automation and choose a trigger — for example Page added (a new row is created) or Property edited (a status property changes to something like "Ready to send").
  3. Click + Add action and select Send webhook.
  4. Set the webhook URL to https://docweave.dev/api/v1/pdf.
  5. Add the headers Authorization: Bearer dw_live_your_key and Content-Type: application/json.
  6. Build the JSON body using Notion's property picker to insert page values (title, status, numbers, and so on) as tokens inside the data object, matching the example below.
  7. Save and turn the automation on. Every time the trigger fires, Notion sends the request and Docweave's response includes the rendered PDF, which you can pipe into a follow-up step (for example uploading it to a Drive folder or emailing it out).

If your workspace's automation builder doesn't yet expose a webhook action, connect the same database to an automation platform such as Make or Zapier instead and add an HTTP request step there — the request URL, headers, and JSON body are identical either way.

JSON body example

Paste this into the webhook's body editor, replacing the tokens with fields from your database:

{
  "source": {
    "type": "template",
    "template": "<h1>{{ title }}</h1><p>Customer: {{ customer }}</p><p>Total: {{ total }}</p>",
    "data": {
      "title": "{{Name}}",
      "customer": "{{Customer}}",
      "total": "{{Total}}"
    }
  },
  "options": { "format": "A4" },
  "idempotencyKey": "{{Page ID}}"
}

…or call it from an AI agent

If your workflow runs through an AI agent instead of a plain webhook, add the Docweave MCP server and call generate_pdf directly — same source types, no HTTP boilerplate:

// From an AI agent step over MCP — no HTTP plumbing:
npx @docweave/mcp

generate_pdf({
  source: {
    type: "template",
    template: "<h1>{{ title }}</h1><p>Customer: {{ customer }}</p><p>Total: {{ total }}</p>",
    data: { title: "Proposal 042", customer: "Acme Inc.", total: "$1,280.00" }
  },
  outputPath: "/tmp/proposal-042.pdf"
})

FAQ

How do I generate a PDF from Notion?

Open your Notion database's automations panel, add a trigger (for example "Page added" or a property changing to "Ready"), then add a "Send webhook" action that POSTs to https://docweave.dev/api/v1/pdf with an Authorization header and a JSON body built from the page's properties. Docweave renders the body and returns a PDF in the response.

Does Notion have a built-in way to call the Docweave API?

Database automations support a webhook action that can send an HTTP request with custom headers and a JSON body, which is enough to call the Docweave API directly. Exact field names can vary slightly by plan and workspace; if your automation builder doesn't expose a webhook action yet, connect the same Notion database to Make or Zapier and add an HTTP request step there instead — the request body is identical either way.

Can I include Notion page properties in the PDF?

Yes. When building the webhook body, insert the page's property values as tokens (for example a title, status, or number field) into the data object, and Docweave binds them into the matching {{ placeholders }} in your HTML template.

How is a PDF generated from Notion billed?

The same as any other request: per document, not per page. Each automation run that successfully calls the Docweave API counts as one document, regardless of how many pages the rendered PDF contains.

Ready to generate PDFs from your Notion database?

Get an API key