Connect Node-RED to Servicely
Install the Servicely nodes in Node-RED, create an HMAC header token for them and set up the connection a flow uses.
Connect Node-RED to Servicely when you build a flow that reads or writes Servicely records from inside your network. At the end, Node-RED signs its requests with an HMAC header token that only it and Servicely know.
Before you begin
- You need the
administratorrole, orapi_token_administrator, to create a System API token. - Have a Servicely user ready for the token to impersonate. The flow can do only what that user’s roles allow.
- Have a Node-RED installation you can sign in to, secured with HTTPS and enforced sign-in.
Steps
-
In Node-RED, add the
node-red-contrib-servicelypackage to the palette, as the Node-RED guide to adding nodes describes. Use version 0.0.17 or later. -
In Servicely, go to Integrations → API access → System API tokens and select New.

The System API tokens item in the API access menu of Integrations. -
Enter a Name that says which Node-RED installation uses the token.
-
Set the validation fields as the table below shows, and choose the user in Impersonate user.
Field Value Validation type HMAC header validation Hash method SHA256 Header key Date 
A new System API token with HMAC header validation, SHA256 and the Date header key. -
Optionally, limit the token in URL Allowed Paths or Allowed Scopes. If you select scopes, include every entry point the flow uses, for example REST API (v1) and Async Queue. Leave both empty to allow every entry point the impersonated user can reach.
-
Select Generate Token. Copy the token and the secret and store them somewhere safe. Servicely stores only the token prefix, so it cannot show them again.
-
In Node-RED, open a Servicely node and add a Servicely connection. Set the authentication type to HMAC Header Token and paste the token and the secret.
-
Deploy the flow and run it once with a REST node that reads one record.
Result
The REST node returns the record, and the token’s last authentication time and address appear on the System API token record. Every Servicely node that uses the connection now signs its requests with the token. If the secret is lost, generate a new token and update the connection.