Hi,
I’m trying to get my first very simple workflow to work. I want to monitor an email inbox with the IMAP trigger task, filter the incoming emails by their subject, and in some cases send the contents of the email to another email address via SMTP. Any info on how to fix this issue would be much appreciated!
Best Regards, Fredrik
What is the error message (if any)?
In the very last step (sending via SMTP) an error window pops up with this text:
There was a problem executing the workflow:
"Converting circular structure to JSON → starting at object with constructor ‘Object’ — property ‘issuerCertificate’ closes the circle"
Please share the workflow
{
“nodes”: [
{
“parameters”: {
“format”: “resolved”,
“options”: {}
},
“name”: “IMAP Email”,
“type”: “n8n-nodes-base.emailReadImap”,
“typeVersion”: 1,
“position”: [
380,
500
],
“credentials”: {
“imap”: {
“id”: “7”,
“name”: “[email protected] IMAP”
}
}
},
{
“parameters”: {
“functionCode”: “// Code here will run only once, no matter how many input items there are.\n// More info and help: https://docs.n8n.io/nodes/n8n-nodes-base.function\n\nconst validItems = [];\nfor (item of items) {\n if(item.json.subject.match(/^Your order \d{5} in our Brandshop$/g))\n {\n validItems.push(item);\n }\n}\n\nreturn validItems;”
},
“name”: “Function”,
“type”: “n8n-nodes-base.function”,
“typeVersion”: 1,
“position”: [
760,
520
]
},
{
“parameters”: {
“fromEmail”: “[email protected]”,
“toEmail”: “[email protected]”,
“subject”: “={{$node[“Function”].json[“subject”]}}”,
“text”: “={{$node[“Function”].json[“text”]}}”,
“html”: “={{$node[“Function”].json[“html”]}}”,
“options”: {}
},
“name”: “Send Email”,
“type”: “n8n-nodes-base.emailSend”,
“typeVersion”: 1,
“position”: [
1060,
540
],
“credentials”: {
“smtp”: {
“id”: “8”,
“name”: “[email protected] SMTP”
}
}
}
],
“connections”: {
“IMAP Email”: {
“main”: [
[
{
“node”: “Function”,
“type”: “main”,
“index”: 0
}
]
]
},
“Function”: {
“main”: [
[
{
“node”: “Send Email”,
“type”: “main”,
“index”: 0
}
]
]
}
}
}
Share the output returned by the last node
As I’m not transforming the data, it is just je normal output of the imap trigger.
Information on your n8n setup
- n8n version: 0.150.0
- Database MySQL
- Running n8n with the execution process own
- Running n8n via Docker