@patrick just did it and worked fine. Here is the configuration:
{
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
250,
310
]
},
{
"parameters": {
"functionCode": "return [\n {\n json: {\n lastname: \"espinoza\"\n }\n }\n]"
},
"name": "Function",
"type": "n8n-nodes-base.function",
"typeVersion": 1,
"position": [
460,
310
]
},
{
"parameters": {
"requestMethod": "POST",
"url": "http://instancemasterv7.crmtiger.com/webservice.php",
"options": {
"bodyContentType": "form-urlencoded"
},
"bodyParametersUi": {
"parameter": [
{
"name": "accessKey",
"value": "={{$node[\"Function1\"].data[\"accessKey\"]}}"
},
{
"name": "username",
"value": "master"
},
{
"name": "operation",
"value": "login"
}
]
}
},
"name": "HTTP Request1",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
970,
310
]
},
{
"parameters": {
"functionCode": "const crypto = require('crypto')\nlet accessKey = '4R8R24iH3jRgftDi'\nlet token = $node.httprequest1.data.result.token\nlet hash = crypto.createHash('md5').update(`${token}${accessKey}`).digest(\"hex\")\n\nreturn [\n {\n json: {\n accessKey: hash,\n }\n }\n]\n\n\n"
},
"name": "Function1",
"type": "n8n-nodes-base.function",
"typeVersion": 1,
"position": [
780,
310
]
},
{
"parameters": {
"requestMethod": "POST",
"url": "http://instancemasterv7.crmtiger.com/webservice.php?operation=getchallenge&username=master",
"options": {}
},
"name": "httprequest1",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
610,
310
]
}
],
"connections": {
"Start": {
"main": [
[
{
"node": "Function",
"type": "main",
"index": 0
}
]
]
},
"Function": {
"main": [
[
{
"node": "httprequest1",
"type": "main",
"index": 0
}
]
]
},
"Function1": {
"main": [
[
{
"node": "HTTP Request1",
"type": "main",
"index": 0
}
]
]
},
"httprequest1": {
"main": [
[
{
"node": "Function1",
"type": "main",
"index": 0
}
]
]
}
}
}
Just make sure you have the last version of n8n and starting the app with export NODE_FUNCTION_ALLOW_BUILTIN=crypto