Description
n8n-nodes-digichat
A custom n8n node that sends WhatsApp messages via the DigiChat API with HMAC request signing.
> Package name: n8n-nodes-digichat
—
Features
- Send WhatsApp messages through DigiChat.
- HMAC-SHA256 signing for every request (
X-API-Signature,X-API-Timestamp). - Works inside n8n, and also testable without n8n using a small harness script.
- Node.js 18+ (Node 20/22 also OK)
- n8n (for using the node in a workflow)
- A DigiChat token and secret
—
Requirements
—
Install
In an n8n instance (as a community/custom node)
search for this n8n-nodes-digichat
Restart n8n, then search for DigiChat in the node palette.
For local development in this package
npm ci
npm run build
This compiles sources to dist/.
—
Usage (in n8n)
1. Drag the DigiChat node into your workflow.
2. Open the node and configure Credentials:
– Credential name: digiChatApi
– Fields:
– token: your DigiChat token
– secret: your DigiChat secret
3. Set node parameters:
– phone: WhatsApp number with country code (e.g. 96390000000)
– message: the text to send
4. Execute the node (or the workflow).
The node returns the DigiChat API response plus a copy of the original request body and the timestamp used for signing.
—
How it works
POST https://digichat.digiworld-dev.com/api/whatsapp/{token}/sendMessage
{
"message": "hello",
"phone": "9639000000"
}
– Content-Type: application/json
– Accept: application/json
– X-API-Timestamp:
– X-API-Signature:
signature = HMAC_SHA256(secret, timestamp + token + JSON.stringify(body))
where timestamp is the same value sent in X-API-Timestamp.
The node computes the signature, sets the headers, sends the request, and returns the response.
—
Test without n8n (harness)
This repository includes a minimal harness that calls execute() directly, so you can test the node without spinning up n8n.
1) Prepare env vars
Create a .env file at the package root (same folder as package.json):
DIGICHATTOKEN=yourtoken_here
DIGICHATSECRET=yoursecret_here
PHONE=96390000000
MESSAGE=hello from harness
Node parameters & credentials
Parameters (per item):
phone — required. WhatsApp number with country code, digits only.message — required. Message text to send.Credentials (node expects a credential named digiChatApi):
token — your DigiChat token.secret — your DigiChat secret.—