Generate Google Drive invoice PDFs from plain text with OpenAI and PDFCrowd
Ready for 3.0What this workflow does
This AI workflow has 12 nodes and runs when another workflow calls it. Along the way it connects OpenAI Chat Model, Google Drive and Google Sheets. It also calls api.pdfcrowd.com over HTTP.
How it runs
Trigger: When another workflow calls it.
- Read the invoice details (AI Agent): runs an AI agent, with model: Chat model; output parser: Output Parser - Invoice fields
- Build the invoice fields (Edit Fields (Set)): sets 21 fields: CompanyTRN, Invoice Date, Invoice Number…
- Build the invoice HTML (Code): runs custom JavaScript code
- Convert HTML to PDF (HTTP Request): calls api.pdfcrowd.com (POST)
- Upload the PDF to Drive (Google Drive): uses Google Drive
- Clear the input tab (Google Sheets): clear
- Clear the output tab (Google Sheets): clear
- Return the file link (Edit Fields (Set)): sets 1 field: View URLs
Services it uses
Other OpenAI + Google Sheets templates (2,011) · Other Google Drive + Google Sheets templates (720) · Other OpenAI + Google Drive templates (628)
HTTP calls to: api.pdfcrowd.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (9)
- Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Google Drive
n8n-nodes-base.googleDrive - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - Google Sheets
n8n-nodes-base.googleSheets - HTTP Request
n8n-nodes-base.httpRequest
From the author
Quick overview This sub-workflow accepts plain-text invoice details, uses OpenAI to extract and normalize invoice fields, renders a styled HTML invoice to PDF via PDFCrowd, uploads the PDF to Google Drive, and returns a shareable Drive link while clearing…