Skip to content

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

  1. Open n8n.
  2. Go to Settings -> Community Nodes.
  3. Install the package n8n-nodes-uhuu.
  4. Restart n8n if prompted.

Create A Uhuu API Token

  1. In Uhuu, go to Dashboard -> API Tokens. You can also open app.uhuu.io/team-tokens for direct access to the active team tokens.
  2. Create a new token with the required scopes.
  3. Copy the token.

Get Your Template ID

  1. In Uhuu, open Dashboard -> Templates.
  2. Open your template.
  3. Copy the template ID shown in the template details.
  4. Make sure the template is published.

Set Up Credentials In n8n

  1. Add a Uhuu node to any workflow.
  2. In Credentials, click Create New.
  3. Paste your Uhuu API token.
  4. Optional: set a custom Base URL for self-hosted Uhuu.
  5. 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

  1. Add a Uhuu node.
  2. Operation: Generate a Document
  3. Template ID: paste your template ID.
  4. Payload (JSON): use the sample below.
  5. Optional: enable Wait for Completion if you need the PDF in the same run.
  6. 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

  1. Webhook node
  2. Uhuu node
  3. Send Email node

Webhook Node

  1. Method: POST
  2. 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

  1. Operation: Generate a Document
  2. Template ID: your template ID
  3. Payload (JSON): map from the webhook:
json
{
  "title": "={{ $json.title }}",
  "message": "={{ $json.message }}",
  "url": "={{ $json.url }}"
}
  1. Enable Wait for Completion
  2. Enable Return Binary
  3. Binary Property: data

Send Email Node

  1. Configure your email provider.
  2. Attach the binary data with Property Name data and File Name document.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.