n8n

n8n +
PDFModule

Self-hosted workflow automation with PDFModule. Use HTTP Request node to generate PDFs in your n8n workflows.

← All Platforms

Setup Guide

1 Get Your API Key

First, create a free PDFModule account and get your API key from the dashboard.

  • Go to pdfmodule.com/register and create an account
  • Navigate to API Keys in your dashboard
  • Create a new API key (starts with pm_live_)

2 Add HTTP Request Node

In your n8n workflow, add an HTTP request action with these settings:

  • Method: POST
  • URL: https://api.pdfmodule.com/v1/render
  • Headers:
    • Authorization: Bearer YOUR_API_KEY
    • Content-Type: application/json

3 Configure Request Body

Set your request body to JSON with your template and data:

Request Body (JSON)
{
  "template": "invoice",
  "data": {
    "invoice_number": "INV-2024-001",
    "customer_name": "Acme Corporation",
    "items": [
      {
        "description": "Professional Services",
        "quantity": 10,
        "price": 150.00
      }
    ],
    "total": 1500.00
  }
}

Using Chromium Engine for Rich CSS

For templates with Flexbox, CSS Grid, or modern CSS, add "engine": "chromium" to your request body.

With Chromium Engine
{
  "template": "invoice",
  "engine": "chromium",
  "data": {
    "invoice_number": "INV-2024-001",
    // ... your data
  }
}

4 Use the Response

The API returns a JSON response with the PDF URL. Use this in your next workflow step:

API Response
{
  "uuid": "550e8400-e29b-41d4-a716-446655440000",
  "url": "https://storage.pdfmodule.com/pdfs/550e8400...",
  "output_hash": "sha256:abc123..."
}

Common next steps:

  • Send the PDF via email using the url field
  • Upload to Google Drive, Dropbox, or other storage
  • Attach to a Slack message or notification
  • Store the uuid in your database for reference

n8n Configuration Example

Here's how your HTTP Request Node configuration should look:

n8n-http-node.json
// n8n HTTP Request Node Configuration

{
  "nodes": [{
    "name": "Generate PDF",
    "type": "n8n-nodes-base.httpRequest",
    "parameters": {
      "method": "POST",
      "url": "https://api.pdfmodule.com/v1/render",
      "authentication": "headerAuth",
      "headerParameters": {
        "parameters": [{
          "name": "Authorization",
          "value": "Bearer pm_live_xxxxx"
        }]
      },
      "bodyParametersJson": "{
        \"template\": \"invoice\",
        \"engine\": \"chromium\",
        \"data\": {
          \"invoice_number\": \"{{ $json.id }}\",
          \"customer\": \"{{ $json.customer }}\",
          \"items\": {{ JSON.stringify($json.items) }},
          \"total\": {{ $json.total }}
        }
      }"
    }
  }]
}

// Access PDF URL: {{ $json.url }}
// Access document ID: {{ $json.uuid }}

Why Use PDFModule with n8n?

Simple HTTP Call

Just a POST request. No complex setup, no dependencies, no browser automation.

📄

Professional PDFs

Headers, footers, page numbers, margins - everything you need for professional documents.

🔄

Reliable Output

Same input = same PDF every time. Deterministic output for consistent results.

Ready to Automate PDF Generation?

Get your free API key and start generating PDFs in your n8n workflows.

Create Free Account Read the Docs