- DocHub Trigger starts a workflow when a DocHub event happens.
- Download a document as a PDF.
- Send a sign request from a template.
A workspace owner or admin installs the package once. Every member of that workspace can then use the nodes.
- Open the canvas and the nodes panel.
- Search for DocHub.
- Under More from the community, open DocHub Trigger or DocHub.
- Select Install.
On n8n Cloud, the owner can show or hide verified community nodes in the Cloud Admin Panel.
In DocHub, create an API key and add it in n8n as the DocHub API credential. Choose Test to confirm it. n8n sends the key as X-API-Token.
The key needs:
- webhook create, read, delete, and secret rotation, or the
allpermission - permission to download the document PDF
- permission to edit the template and create sign requests, to send from a template
Creating webhooks requires a paid DocHub plan.
- Add DocHub Trigger.
- Select the events that should start the workflow. The node can subscribe to
document.created,document.shared,document.status_changed,sign_request.created,sign_request.voided,signer.finalized, andsigner.rejected. - Turn the workflow Active.
n8n creates the webhook in DocHub for the selected events and removes it when the workflow is turned off. Each delivery is checked with the DocHub signature before the workflow starts.
webhook.ping is DocHub's connectivity test. The trigger answers it and does not start a workflow.
Add DocHub after the trigger. Set the operation to Download and Document ID to:
{{ $json.data.document.id }}
File Name is optional. Leave it empty to use the name DocHub sends, or set an expression such as {{ $json.data.document.title }}. The PDF is the binary item data.
Add DocHub, set the resource to Sign Request and the operation to Send From Template.
- Template: the template URL or ID, for example
https://dochub.com/your-name/mqNjP3BVW0doMPGw9yGzLk/contract. - Signers: add one entry per signer.
- Role Name: the template role this signer fills, such as
Client. A role the template does not have is created on it. - Email and optional Name: who signs. Use an expression such as
{{ $json.email }}to send one request per input item. - Fields: the template fields this signer fills. The list loads from the template once Template is set. All Fields gives this signer every field no other signer picked. Leave it empty to keep the template's own assignments.
- Role Name: the template role this signer fills, such as
- Email Subject and Email Message: the invitation email.
- Options > Sign in Order: signers sign one after another, in the order listed. Off by default, so everyone is invited at once.
Fields and new roles are saved on the template itself, so later sends reuse them. Every signer needs at least one field.
DocHub sends a copy of the template. The output is the new sign request. documentId and document.fullUrl refer to that copy, not the template. Every run sends a new copy and new emails.
n8n community nodes for DocHub. A trigger starts a workflow when DocHub sends a webhook, and a second node downloads the document PDF with an API key.
n8n is a workflow automation platform.
- DocHub Trigger subscribes to every DocHub webhook event:
document.created,document.shared,document.status_changed,sign_request.created,sign_request.voided,signer.finalized, andsigner.rejected. Activating the workflow creates the webhook in DocHub. Turning it off deletes that webhook. Each delivery is checked with the DocHub HMAC signature before the workflow starts. - DocHub downloads the compiled PDF for a document id. After the trigger, that id is usually
{{ $json.data.document.id }}.
webhook.ping is answered with HTTP 200 and does not start a workflow. It is DocHub's connectivity test, not a business event.
Create an API key in DocHub and store it in the DocHub API credential. Requests send it as X-API-Token.
The key needs:
- webhook create, read, delete, and secret rotation, or the
allpermission - permission to download the document PDF
DocHub only allows webhook creation on paid plans.
This package runs in a local n8n before it is published. It does not appear in the node search on app.n8n.cloud until n8n verifies it.
Use Node.js 24 or newer (nvm use reads .nvmrc). Install dependencies once:
npm installDocHub only accepts a public HTTPS URL for webhooks, so a local http://localhost:5678 address cannot receive events. Use ngrok to give this machine a public HTTPS address. The editor stays on localhost. API calls still go to https://dochub.com.
Start ngrok in one terminal and leave it running. If it asks for an authtoken, add one from the ngrok dashboard with ngrok config add-authtoken <token> and run it again.
ngrok http 5678In another terminal, read the live https:// URL from ngrok and pass it to n8n. A free tunnel URL changes every time ngrok starts, so this reads the current one instead of a pasted host. It also allows the Read/Write Files from Disk node to write under ~/.n8n-files and this package directory.
nvm use
WEBHOOK_URL="$(curl -sf http://127.0.0.1:4040/api/tunnels | grep -oE '"public_url":"https://[^"]+"' | head -1 | cut -d'"' -f4)"
echo "WEBHOOK_URL=$WEBHOOK_URL"
N8N_RESTRICT_FILE_ACCESS_TO="$HOME/.n8n-files;$(pwd)" WEBHOOK_URL="$WEBHOOK_URL" npm run devAfter the editor opens at http://localhost:5678:
- Create a DocHub API credential with an API key from the DocHub account that will emit the events, and confirm it with Test.
- Add DocHub Trigger and leave the events you want selected. Turn the workflow Active. n8n registers the webhook in DocHub for the printed
WEBHOOK_URL. Turning the workflow off deletes that webhook.webhook.pingreturns HTTP 200 and does not start a run. - Add DocHub, operation Download. Set Document ID to
{{ $json.data.document.id }}. File Name is optional. Leave it empty to use the name DocHub sends, or set it to an expression such as{{ $json.data.document.title }}.
The workflow keeps listening only while ngrok, npm run dev, and the Active toggle all stay on. After you restart ngrok, run the WEBHOOK_URL=... command again, then turn the workflow off and back on so DocHub stores the new address.
The signing secret is stored in the workflow's static data when DocHub creates the webhook. It is not part of the credential. Importing the workflow on another n8n instance requires activating it again so a new webhook is created.