Hey is it possible to create hmac signature using make.com functions?

Hey everyone,

Basically, I want to recreate this Java Script code in make.com to get the webhook signature. The timestamp has already been handled “(Timestamp * 1000)”, the hmac/webhook signature is the most important. The challenge is that I don’t want to use any external services like ‘custom JS’, etc. I just want to use make.com’s built-in functions and tools. I believe it’s possible, but you can correct me if I am wrong.

"const crypto = require(‘crypto’);

const SECRET_KEY = ‘’
const timestamp = Date.now();

const payload = {
“campaign_id”: “”,
“webhook_id” : “”,
“leadData”: {
“phoneNumber”: “”,
“variables”: {
“name”: “”,
“monday_id”: “”
}
}
};

const signature = crypto
.createHmac(‘sha256’, SECRET_KEY)
.update(timestamp + JSON.stringify(payload))
.digest(‘hex’);
return {signature, timestamp};"

Cheers,
Jakub :slight_smile:

Welcome to the Make community!

Please see these duplicate questions previously asked and answered by other community members:

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.

Hey,

Thanks for answer, yeah I check those already, but I still have a problem to create something like this using functions “(timestamp + JSON.stringify(payload))”.