Use built-in module in expression for credential values

Is there any way to use built-in modules in expressions? We try to create the credentials to authorize a webhook of a service. This service sends a custom header called X-Moco-Signature. The value could be calculated like so: require('crypto').createHmac('sha256', 'password').update('raw_body').digest('hex')

Is this possible somehow? Using the expression {{...expression from above...}} results in status 500 with message No authentication data defined on node!. We already enabled the crypto module with NODE_FUNCTION_ALLOW_BUILTIN=crypto. A “Function” node with the code from above returns a valid result.

Edit: How can we get the raw body value (‘raw_body’ in example above) of an incoming request in a “Webhook” node?

Hey @schroedan!

Welcome to the community :sparkling_heart:

You will have to use the Function node to handle this. This can’t be done via the Expression editor.

In the Webhook node, if you click on the Add Option dropdown list, you will get the Raw Body option.

Hope this helps :slight_smile: