Automated Document Delivery for Clients

Jul 23, 2025·5 Minutes Read

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

  1. Import this workflow template → Download JSON File
  2. Connect your PDF.co and Twilio accounts
  3. Copy your webhook URL
  4. Test with a sample API call
  5. Integrate with your systems
  6. 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)

  1. Receives webhook requests with client name and phone number
  2. Converts Word Doc template to PDF using PDF.co with custom naming
  3. Delivers the PDF to specified WhatsApp numbers via Twilio API

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.

Note: Learn more about Document Conversion in the PDF.co Docs

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

See Related Tutorials