Check the example below. Everything you want to reference data from a node you need to use expressions. Info about expressions can be found here https://docs.n8n.io/nodes/expressions.html#expressions.
If that does not help simply get back to me.
{
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
250,
300
]
},
{
"parameters": {
"functionCode": "return [\n {\n json: {\n \"order_id\": \"JSON-123\",\n \"currency_code\": \"GBP\",\n \"payment_method\": \"paypal\",\n \"order_date\": \"2017-09-10T15:12:40\",\n \"ust_id\": \"DE-985632\",\n \"email\": \"[email protected]\",\n \"telephone\": \"025552\",\n \"invoice\": {\n \"salutation\": 1,\n \"firstname\": \"Rainer\",\n \"lastname\": \"Rechnung\",\n \"housenumber\": \"42\",\n \"address_1\": \"Rechnungsstra\\u00dfe 12\",\n \"address_2\": \"Rechnungszusatz 1\",\n \"zip\": \"12345\",\n \"state\": \"Bundesland/Bundesstaat\",\n \"city\": \"Rechnungshausen\",\n \"country\": \"DE\",\n \"company\": \"Rechnungsschreiber\"\n },\n \"shipping\": {\n \"salutation\": 0,\n \"firstname\": \"Lars\",\n \"lastname\": \"Liefer\",\n \"housenumber\": \"1337\",\n \"address_1\": \"Lieferstra\\u00dfe 3\",\n \"address_2\": \"Lieferzusatz 2\",\n \"zip\": \"67890\",\n \"state\": \"Bundesland/Bundesstaat\",\n \"city\": \"Lieferhausen\",\n \"country\": \"FR\",\n \"company\": \"Liefermeister\"\n },\n \"order_status_id\": 3,\n \"internal_note\": \"Eine JSON Email Bestellung\",\n \"comment\": \"Bitte schnell bearbeiten\",\n \"shipcost\": 4.99,\n \"shipping_date\": \"mm/dd/yyyy\",\n \"order_items\": [\n {\n \"quantity\": 2.33,\n \"totalprice\": 4.66,\n \"product_id\": null,\n \"name\": \"Mein neuer Artikel\",\n \"sku\": \"1234-ddd\",\n \"imageurl\": \"https:\\/\\/some.url.tld\\/image.jpeg\",\n \"taxrate\": 19\n },\n {\n \"quantity\": 2.33,\n \"totalprice\": 4.66,\n \"product_id\": null,\n \"name\": \"Mein neuer Artikel 2\",\n \"sku\": \"5789-ddd\",\n \"imageurl\": \"https:\\/\\/some.url.tld\\/image.jpeg\",\n \"taxrate\": 7\n }\n ],\n \"tags\": [\n \"Stammkunde\",\n \"PRIO\"\n ]\n}\n \n }\n]"
},
"name": "Function",
"type": "n8n-nodes-base.function",
"typeVersion": 1,
"position": [
500,
300
],
"notesInFlow": true,
"notes": "Mockup data"
},
{
"parameters": {
"html": "={{$node[\"Function\"].json}}",
"options": {}
},
"name": "Send Email",
"type": "n8n-nodes-base.emailSend",
"typeVersion": 1,
"position": [
700,
300
],
"credentials": {
"smtp": "asasasas"
}
}
],
"connections": {
"Start": {
"main": [
[
{
"node": "Function",
"type": "main",
"index": 0
}
]
]
},
"Function": {
"main": [
[
{
"node": "Send Email",
"type": "main",
"index": 0
}
]
]
}
}
}