Check the example below. I believe this is what you want to achive
{
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
250,
300
]
},
{
"parameters": {
"requestMethod": "POST",
"url": "https://webhook.site/c5d689e3-06da-4f5b-9ed3-e167200b7690",
"options": {},
"bodyParametersUi": {
"parameter": [
{
"name": "email",
"value": "={{$node[\"Function\"].json[\"email\"]}}"
},
{
"name": "customFields",
"value": "={{$node[\"Function\"].json[\"customFields\"]}}"
}
]
}
},
"name": "HTTP Request",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
700,
300
]
},
{
"parameters": {
"functionCode": "return [\n {\n json: {\n \"email\": '[email protected]',\n \"customFields\": {\n \"firstname\": 'Jim',\n \"lastname\": 'Miller'\n }\n }\n }\n]\n"
},
"name": "Function",
"type": "n8n-nodes-base.function",
"typeVersion": 1,
"position": [
460,
300
]
}
],
"connections": {
"Start": {
"main": [
[
{
"node": "Function",
"type": "main",
"index": 0
}
]
]
},
"Function": {
"main": [
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
}
]
]
}
}
}