Get Started With n8n + Uhuu
Generate PDFs from Uhuu templates directly in n8n using the Uhuu community node. This guide covers setup, credentials, a first workflow, and a practical webhook-to-email example.
What Is n8n
n8n is a workflow automation platform (cloud or self-hosted) that lets you connect apps and services with visual workflows.
Prerequisites
- A Uhuu account
- An n8n account or instance
- A published Uhuu template
- A Uhuu API token with these scopes:
template.read,template.create,document.read
Install The Uhuu Node In n8n
- Open n8n.
- Go to Settings -> Community Nodes.
- Install the package
n8n-nodes-uhuu. - Restart n8n if prompted.
Create A Uhuu API Token
- In Uhuu, go to Dashboard -> API Tokens. You can also open app.uhuu.io/team-tokens for direct access to the active team tokens.
- Create a new token with the required scopes.
- Copy the token.
Get Your Template ID
- In Uhuu, open Dashboard -> Templates.
- Open your template.
- Copy the template ID shown in the template details.
- Make sure the template is published.
Set Up Credentials In n8n
- Add a Uhuu node to any workflow.
- In Credentials, click Create New.
- Paste your Uhuu API token.
- Optional: set a custom Base URL for self-hosted Uhuu.
- Save.
First Workflow: Generate A Document
This workflow uses a manual trigger to generate a PDF from a template and returns the document metadata.
Step 1: Add Manual Trigger
Create a new workflow and keep the default Manual Trigger.
Step 2: Add Uhuu Node
- Add a Uhuu node.
- Operation: Generate a Document
- Template ID: paste your template ID.
- Payload (JSON): use the sample below.
- Optional: enable Wait for Completion if you need the PDF in the same run.
- Optional: enable Return Binary if you want the PDF as binary data.
Sample Payload (Inspired By Uhuu Starter Examples)
json
{
"title": "Pink Owl of the Whispering Woods",
"message": "Once upon a time, deep in the heart of the Whispering Woods, there lived a magical creature known to few -- a pink owl with feathers as soft and vibrant as a sunset.",
"url": "https://platform.uhuu.io/common/samples/pink-owls/pink-owl-2.jpeg",
"images": [
"https://platform.uhuu.io/common/samples/pink-owls/pink-owl-1.jpeg",
"https://platform.uhuu.io/common/samples/pink-owls/pink-owl-2.jpeg",
"https://platform.uhuu.io/common/samples/pink-owls/pink-owl-3.jpeg"
]
}Output
The node returns the Uhuu document JSON (id, status, url, pdf_url, thumbnail_url).
If Return Binary is enabled, the PDF is attached as binary data using the Binary Property name.
Second Workflow: Webhook -> Uhuu -> Email
This example receives data from a webhook, generates a PDF, and emails it.
Workflow Structure
- Webhook node
- Uhuu node
- Send Email node
Webhook Node
- Method:
POST - Path: choose any path (for example,
invoice)
Sample Webhook Payload
json
{
"title": "Acme Workshop Invoice",
"message": "Thanks for your purchase.",
"url": "https://platform.uhuu.io/common/samples/pink-owls/pink-owl-4.jpeg"
}Uhuu Node
- Operation: Generate a Document
- Template ID: your template ID
- Payload (JSON): map from the webhook:
json
{
"title": "={{ $json.title }}",
"message": "={{ $json.message }}",
"url": "={{ $json.url }}"
}- Enable Wait for Completion
- Enable Return Binary
- Binary Property:
data
Send Email Node
- Configure your email provider.
- Attach the binary data with Property Name
dataand File Namedocument.pdf.
Tips
- Uhuu document generation is asynchronous. Use Wait for Completion when you need the PDF in the same workflow run.
- If Return Binary is enabled but the document is not ready, the node will suggest enabling Wait for Completion or using Get a Document later.
- For large payloads, prefer the JSON payload method.
Troubleshooting
- If the document content looks outdated, make sure the template is published in Uhuu.
- If credential tests fail, verify token scopes and base URL.