Note: Learn more about Document Conversion in the PDF.co Docs
Automated Document Delivery for Clients
What You'll Have When Done: A document conversion system that automatically delivers PDFs to clients via WhatsApp - perfect for integrating with your existing systems, websites, or apps.
Prerequisites
Before you begin, make sure you have:
- A PDF.co API Key (Get yours here)
- A Twilio account with WhatsApp Business API access
- Twilio Account SID and Auth Token
- An n8n instance (cloud or self-hosted)
- WhatsApp Business number configured in Twilio
Quick Start Options
Option A: I Want It Working Now
- Import this workflow template → Download JSON File
- Connect your PDF.co and Twilio accounts
- Copy your webhook URL
- Test with a sample API call
- Integrate with your systems
- Start delivering documents via API
Option B: I Want to Build It Step-by-Step
Follow the 3-step guide below to create the API automation from scratch.
What This Automation Does (Overview)
- Receives webhook requests with client name and phone number
- Converts Word Doc template to PDF using PDF.co with custom naming
- Delivers the PDF to specified WhatsApp numbers via Twilio API
IN THIS TUTORIAL
Step 1: Set Up Webhook Trigger
Node: Webhook
Settings: Use default settings and click Listen for test event
Using Postman:
Copy the Webhook URL and make a request with the following payload:
{
"name": "John Doe",
"phone": "+1234567890"
}
Success Looks Like: The webhook receives requests and passes the data to the next node for processing.
Step 2: Convert Document to PDF
Node: PDF.co API → Convert to PDF
Settings:
- Convert Type:
Document to PDF
- URL:
https://pdfco-test-files.s3.us-west-2.amazonaws.com/doc-to-pdf/sample.docx
- Advanced Options → File Name:
={{ $json.body.name }}
Success Looks Like: Document is converted to PDF with the custom filename and PDF.co returns a temporary output URL.
Step 3: Send via WhatsApp
Node: HTTP Request (Twilio WhatsApp API)
Settings:
- Method:
POST
- URL:
https://api.twilio.com/2010-04-01/Accounts/[YOUR_ACCOUNT_SID]/Messages.json
- Authentication:
HTTP Basic Auth
- Body Content Type:
Form Urlencoded
Dynamic Body Parameters:
From: whatsapp:+14155238886
To: =whatsapp:{{ $('Webhook').item.json.body.phone }}
Body: Here's your file
MediaUrl: ={{ $json.url }}
Success Looks Like: Client receives WhatsApp message with the converted PDF document attached to their specified phone number.
Congrats! You've built a professional document delivery system that integrates seamlessly with any application or workflow.
Built something cool? Share it with us @pdfdotco
Related Tutorials



