hq2

HQ² for n8n: ask a person in HQ² for an approval and wait for the decision.

Package Information

Released: this month
Downloads: 0 weekly / 0 monthly
Latest Version: 0.1.0
Author: xtend3D

Documentation

n8n-nodes-hq2

HQ² for n8n: put a person in HQ² in the middle of a workflow. The HQ² node asks them for an approval; with Ask
and Wait
the execution pauses until they approve, reject, or the time runs out, then goes on with the decision and
the final values of the fields they could change.

Install

In n8n: Settings, Community nodes, Install, n8n-nodes-hq2. Self-hosted from this folder:

npm ci && npm run build
# then, in ~/.n8n/custom (or N8N_CUSTOM_EXTENSIONS):
npm install /path/to/n8n-nodes-hq2

Credentials

HQ² API: the address of your HQ² space (https://acme.hq2.space), and a token made in HQ² under Manage, You,
Access tokens with "Only ask for approvals (n8n, Zapier, Make)". Workspace: only if you belong to several.

Operations

Operation What
Ask and Wait Ask and pause. One item at a time (put Loop Over Items before it).
Ask Ask and go on at once. Read the decision later with Get.
Get Read a request: status, decision, fields, decided_by, reason.
Cancel Withdraw a request that is still waiting.

The output of Ask and Wait is the request as HQ² reads it after the decision. Branch on decision with an If node
(approved, rejected, expired), and use fields.<key> for the values the person may have changed.

Ask and Wait needs HQ² to reach your n8n over https (the resume URL, $execution.resumeUrl): set WEBHOOK_URL to
n8n's public https address. HQ² refuses private addresses. Behind a firewall, use Ask, then Wait (a time) and Get.

The callback is checked: its signature (X-HQ2-Signature, derived from your token) must match, then the node reads
the decision from HQ² itself. A call that is not from HQ² is answered 401 and the execution keeps waiting.

Develop

npm ci
npm run typecheck
npm test          # the request body and the signature against the shared test vector
npm run build     # dist/

Discussion