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.
Requirements
- Node.js 18+ (Node 20/22 also OK)
- n8n (for using the node in a workflow)
- A DigiChat token and secret
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)
- Drag the DigiChat node into your workflow.
- Open the node and configure Credentials:
- Credential name: digiChatApi
- Fields:
token: your DigiChat tokensecret: your DigiChat secret
- Set node parameters:
phone: WhatsApp number with country code (e.g.96390000000)message: the text to send
- 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
-
Endpoint:
POST https://digichat.digiworld-dev.com/api/whatsapp/{token}/sendMessage -
Body (JSON):
{
"message": "hello",
"phone": "9639000000"
}
-
Headers:
Content-Type: application/jsonAccept: application/jsonX-API-Timestamp: <unix-ms>X-API-Signature: <hex-hmac>
-
Signature:
signature = HMAC_SHA256(secret, timestamp + token + JSON.stringify(body))
wheretimestampis the same value sent inX-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):
DIGICHAT_TOKEN=your_token_here
DIGICHAT_SECRET=your_secret_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.
Contact
- DigiChat: https://digichat.digiworld-dev.com
- Maintainer: [[Mohammed Alissa/m.alissa@digiworld-dev.com]]