Are you passionate about Marketing Automation and looking for ways to simplify repetitive tasks like creating invoices, quotes, or contracts? Today, Hong Marketing Automation introduces a highly practical and easy-to-use n8n workflow that allows you to generate PDF files automatically from existing content.
Whether you're working with pre-written text or standardized templates, this workflow is a time-saving solution for professionals who want to streamline document generation without manual editing or formatting.
Why Automate PDF Generation?
Creating PDF files manually can be repetitive and time-consuming—especially when dealing with routine documents like invoices or client contracts. Automating this task helps you:
- Save valuable time on document preparation
- Eliminate human errors in repetitive tasks
- Ensure consistency across all documents
- Boost productivity by integrating document generation into your marketing or sales workflows
What You’ll Need
This automation process is powered by n8n, a powerful open-source workflow automation tool. You don’t need advanced programming knowledge—just follow the simple steps below to create your own PDF workflow.
Step-by-Step Guide to Create PDF Files with n8n
Step 1: Prepare Your Content
Begin by preparing the content that will go into your PDF. This could be raw data or a pre-defined template in HTML or Markdown format, which allows for better formatting when rendered into a PDF.
Step 2: Build the Workflow in n8n
Use n8n to design a simple workflow. Connect nodes such as HTTP Request, Set, and HTML to PDF conversion nodes (you can use integrations like PDF Generator API, Puppeteer, or external tools).
Step 3: Automate Data Insertion into the Template
Map your data fields to your template and set up logic to dynamically fill out the template with content. This is useful for populating invoices, client names, pricing details, or any other custom information.
Step 4: Export and Send the PDF File
Once the PDF file is generated, use the Email node or integrate with Gmail, Outlook, or other providers to automatically send the PDF file to your customers or team.
Use Cases of PDF Automation with n8n
- Automatically generate and send invoices to clients after a payment confirmation
- Create project proposals or quotes based on form submissions
- Generate contracts using predefined templates for each client
- Export report summaries and email them to your team daily or weekly
Final Thoughts
With just a few simple steps, you can automate the entire PDF creation process, saving hours of manual work each week. Whether you're running a business, managing a marketing agency, or supporting a sales team, this workflow can make your processes more efficient and professional.
If you have any questions, need help setting it up, or want to share how you’re using PDF automation in your workflow, feel free to leave a comment below. Let’s learn and grow together!
If you found this guide helpful, don’t forget to like, share, and recommend it to your colleagues who may benefit from automating their document workflows.
{
"meta": {
"instanceId": "29529c6d9a87020e2baeeb323cbc7d75a3f7569dc9ef9d8e01ad746601b233dd",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "29151e52-e061-4fcd-b593-41a9aad53be6",
"name": "When clicking ‘Test workflow’",
"type": "n8n-nodes-base.manualTrigger",
"position": [
20,
-40
],
"parameters": {},
"typeVersion": 1
},
{
"id": "c382ba21-86c7-4728-ab0e-d99265bae08c",
"name": "Edit Fields",
"type": "n8n-nodes-base.set",
"position": [
240,
-40
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "79c3ec8a-2264-47f8-9704-cc3d9deb4e2b",
"name": "name",
"type": "string",
"value": "Nguyễn Thế Đức"
},
{
"id": "3025c629-3328-4349-911b-143549df4406",
"name": "age",
"type": "string",
"value": "22"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "5800f580-a76f-4143-8629-5f203273efce",
"name": "tạo file",
"type": "n8n-nodes-base.googleDocs",
"position": [
460,
-40
],
"parameters": {
"title": "=abc",
"folderId": "1k9z9yt7bELg743C_wmhn087l33ywfb87"
},
"credentials": {
"googleDocsOAuth2Api": {
"id": "nPbLzGdd2nVG2iar",
"name": "Google Docs account 1959e829886"
}
},
"typeVersion": 2
},
{
"id": "b8806322-3a2d-4b97-88e6-2b2d725ebbb2",
"name": "update content",
"type": "n8n-nodes-base.googleDocs",
"position": [
680,
-40
],
"parameters": {
"actionsUi": {
"actionFields": [
{
"text": "=tên: {{ $('Edit Fields').item.json.name }}\ntuổi: {{ $('Edit Fields').item.json.age }}",
"action": "insert",
"locationChoice": "location"
}
]
},
"operation": "update",
"documentURL": "={{ $json.id }}"
},
"credentials": {
"googleDocsOAuth2Api": {
"id": "nPbLzGdd2nVG2iar",
"name": "Google Docs account 1959e829886"
}
},
"typeVersion": 2
},
{
"id": "682e2b4f-5bd6-49f9-8db4-f4c13871a81f",
"name": "convert and download pdf",
"type": "n8n-nodes-base.httpRequest",
"position": [
900,
-40
],
"parameters": {
"url": "=https://docs.google.com/feeds/download/documents/export/Export?id={{ $json.documentId }}&exportFormat=pdf",
"options": {},
"responseFormat": "file",
"dataPropertyName": "=data"
},
"typeVersion": 1,
"alwaysOutputData": false
},
{
"id": "e526129d-4469-4186-9bb3-397c2348472d",
"name": "upload pdf to folder",
"type": "n8n-nodes-base.googleDrive",
"position": [
1120,
-40
],
"parameters": {
"name": "file mới",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive",
"cachedResultUrl": "https://drive.google.com/drive/my-drive",
"cachedResultName": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "list",
"value": "1k9z9yt7bELg743C_wmhn087l33ywfb87",
"cachedResultUrl": "https://drive.google.com/drive/folders/1k9z9yt7bELg743C_wmhn087l33ywfb87",
"cachedResultName": "test "
}
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "NHLTXVmISUGbvDMf",
"name": "Google Drive account 2"
}
},
"typeVersion": 3
},
{
"id": "d10f9e18-7dcc-4c09-8e4d-184ca1410edc",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-60,
-220
],
"parameters": {
"width": 1380,
"height": 460,
"content": "📌 **Workflow này được thực hiện bởi Thế Đức - Tedux Group** \n\n📱 Zalo liên hệ: **0834869558**\n📱 Facebook cá nhân: **Nguyễn Thế Đức** [Link](https://www.tedux.vn/) \n📱 Group Zalo chia sẻ: **Cộng đồng AI Automation - Tedux Group** [Link](https://zalo.me/g/fymslc713)"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"tạo file": {
"main": [
[
{
"node": "update content",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "tạo file",
"type": "main",
"index": 0
}
]
]
},
"update content": {
"main": [
[
{
"node": "convert and download pdf",
"type": "main",
"index": 0
}
]
]
},
"convert and download pdf": {
"main": [
[
{
"node": "upload pdf to folder",
"type": "main",
"index": 0
}
]
]
},
"When clicking ‘Test workflow’": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
}
}
}