Describe the issue/error/question
Hello,
My workflow contains a webhook trigger node that is invoked by an external service, and the HMAC hash of the request body with my API secret is added to one of the request headers.
This HMAC is used to verify the integrity and authenticity of the message. According to the API documentation, I must calculate the HMAC on my own and compare it to the one sent in the request header.
I’m trying hard to make this comparison as it turns out that n8n/nodejs slightly modifies the characters of the JSON representation with respect to the original binary data, which completely modifies the hash, as expected.
I’m not a programmer, so I don’t know if it’s something basic or not, but the fact is I’m a little stuck with it. My need is somehow to take the original binary data from the request and transform it into a string so that I can pass it to a crypto node.
Does anyone have any suggestions for a code snippet for this?
Thank you!
What is the error message (if any)?
Please share the workflow
(Select the nodes and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow respectively)
Share the output returned by the last node
Information on your n8n setup
- n8n version:
- Database you’re using (default: SQLite):
- Running n8n with the execution process [own(default), main]:
- Running n8n via [Docker, npm, n8n.cloud, desktop app]: