Generate branded invoice PDFs from webhook orders with PolyDoc and email
UnknownWhat this workflow does
This workflow has 7 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects Polydoc (community).
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Valid order? (If): checks a condition and branches into true / false
- Build invoice (Code): runs custom JavaScript code
- Reject (422) (Respond to Webhook): sends the response back to the webhook caller
- Render invoice PDF (Poly Doc): uses Poly Doc
- Email invoice (Send Email): sends an email over SMTP
- Return 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-polydoc is verified or supports 3.0 (used in Render invoice PDF).
Nodes used (6)
- Webhook
n8n-nodes-base.webhook - If
n8n-nodes-base.if - Code
n8n-nodes-base.code - Poly Doc
n8n-nodes-polydoc.polyDoc - Send Email
n8n-nodes-base.emailSend - Respond to Webhook
n8n-nodes-base.respondToWebhook
From the author
Quick overview This workflow receives an order via webhook, validates required fields, calculates invoice totals, renders a branded invoice PDF using a saved PolyDoc template, emails the PDF to the customer, and returns the same PDF in the webhook response.…