Convert markdown into branded PDFs with a table of contents using PDFMint
UnknownWhat this workflow does
This workflow has 11 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects Pdfmint (community).
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Set your document branding (Edit Fields (Set)): sets 6 fields: brandName, accentColour, pageFormat…
- Check the request is usable (If): checks a condition and branches into true / false
- Check remaining quota (Pdf Mint): usage
- Explain what went wrong (Edit Fields (Set)): sets 3 fields: error, message, status_code
- Is there quota left? (If): checks a condition and branches into true / false
- Return the error as JSON (Respond to Webhook): sends the response back to the webhook caller
- Build the cover, contents and body (Code): runs custom JavaScript code
- Render the Markdown as PDF (Pdf Mint): pdf
- Did the render succeed? (If): checks a condition and branches into true / false
- Return the PDF (Respond to Webhook): sends the response back to the webhook caller
Services it uses
Before you upgrade to n8n 3.0
We can't fully verify this one: it relies on 1 community package, and n8n 3.0 turns unverified community packages off by default (N8N_UNVERIFIED_PACKAGES_ENABLED=false).
- Check that n8n-nodes-pdfmint is verified or supports 3.0 (used in Check remaining quota, Render the Markdown as PDF).
Nodes used (6)
- Webhook
n8n-nodes-base.webhook - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - Pdf Mint
n8n-nodes-pdfmint.pdfMint - Code
n8n-nodes-base.code - Respond to Webhook
n8n-nodes-base.respondToWebhook
From the author
Quick Overview This workflow turns any Markdown — an AI agent's answer, release notes, a knowledge-base page, a report written in an editor — into a finished, branded PDF and returns it in the same HTTP request. It numbers the headings, builds a table of…