Quick overview
This workflow triggers on successful Stripe invoice payments, formats the invoice data for a PDFBolt template, generates a PDF invoice, and emails it to the customer through Gmail.
How it works
- Triggers when Stripe emits an
invoice.payment_succeeded event for a paid invoice.
- Extracts the Stripe invoice object, formats amounts, and maps customer and line-item fields into
templateData for PDFBolt.
- Generates a PDF from a published PDFBolt template using the Direct endpoint and returns the file as binary data.
- Sends the generated PDF as an attachment in a Gmail email to the customer’s email address from the Stripe invoice.
Setup
- Connect your Stripe account and ensure the trigger can receive
invoice.payment_succeeded events.
- Add your PDFBolt API key from https://app.pdfbolt.com/api-keys, publish an invoice template in PDFBolt, and paste its Template ID into the PDFBolt node.
- Connect your Gmail account and adjust the email subject or body text if you want different wording or branding.
Requirements
- Stripe account connected in n8n
- PDFBolt account and API key
- Published PDFBolt invoice template
- Gmail account connected in n8n
Customization
- Use your own PDFBolt Template ID
- Match templateData fields to your invoice template variables
- Customize the Gmail subject and message
- Adjust filename or PDF options in the PDFBolt node
Additional info
PDFBolt returns the generated PDF as binary field data. Gmail uses that field as the attachment, so keep the field name unchanged unless you update the Gmail node too.