Quick Overview
This workflow receives a POST webhook payload, validates required fields, generates a PDF from a published PDFBolt template using provided template data, emails the PDF as an attachment via Gmail, and returns a JSON success or 400 error response to the caller.
How it works
- Receives a POST webhook request containing
templateData and a recipientEmail.
- Validates the payload, builds a safe PDF filename, and prepares the email subject and message text.
- Returns a 400 JSON response when required fields are missing or invalid.
- Sends the validated
templateData to PDFBolt to render a PDF from the specified published template and returns it as binary data.
- Emails the generated PDF attachment to the recipient using Gmail.
- Responds to the original webhook request with a JSON success message including the filename and recipient email.
Setup
- Install the PDFBolt community node and add your PDFBolt API key credentials.
- Create and publish a template in PDFBolt, then paste the template ID into the PDFBolt node.
- Connect a Gmail account in n8n with permission to send emails.
- Activate the workflow, copy the production webhook URL, and configure your source system to POST a JSON body that includes
templateData and recipientEmail (plus optional filename, recipientName, emailSubject, and emailMessage).