Perfect @ejcb. Check the example below.
I wonder what SaaS are you using currently to send the emails?
Keep in mind that the node called “processingData” should take the incoming data and map it to the data https://documentation.image-charts.com understands.
Again do not hesitate to ask any further questions.
Example of what I got when ran the workflow:
Workflow example:
{
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
280,
290
]
},
{
"parameters": {
"url": "={{$node[\"processingData\"].json[\"url\"]}}",
"responseFormat": "file",
"options": {}
},
"name": "HTTP Request",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
700,
290
]
},
{
"parameters": {
"functionCode": "//this function proccess the data and generates the url\n\nreturn [{\n json: {\n url: 'https://image-charts.com/chart?chbh=20&chco=fdb45c,27c9c2,1869b7&chd=t:5,5,5|10,10,10|15,15,15&chds=0,120&chm=N,000000,0,0,10|N,000000,0,1,10|N,000000,0,2,10|N,000000,1,0,10|N,000000,1,1,10|N,000000,1,2,10|N,000000,2,0,10|N,000000,2,1,10|N,000000,2,2,10&chma=0,0,10,10&chs=700x150&cht=bvs&chxs=0,000000,0,0,_&chxt=y'\n }\n}]"
},
"name": "processingData",
"type": "n8n-nodes-base.function",
"typeVersion": 1,
"position": [
510,
290
]
},
{
"parameters": {
"operation": "sendHtml",
"fromEmail": "[email protected]",
"toEmail": "[email protected]",
"options": {},
"attachmentsUi": {
"attachmentsBinary": [
{
"property": "data"
}
]
}
},
"name": "Mandrill",
"type": "n8n-nodes-base.mandrill",
"typeVersion": 1,
"position": [
900,
290
],
"credentials": {
"mandrillApi": "asas"
}
}
],
"connections": {
"Start": {
"main": [
[
{
"node": "processingData",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request": {
"main": [
[
{
"node": "Mandrill",
"type": "main",
"index": 0
}
]
]
},
"processingData": {
"main": [
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
}
]
]
}
}
}