Hi,
I tried sending a mail with SMTP and it worked, but when we enter an expression in text field and execute the node, it shows the rendered text in result but when I check mail there is no mail text (body) present. this also happens when I add expression to the Subject. So only plain constant text is working and not expressions for send email node. Let me know if its a bug or should something else can be done.
Thanks
Hey @Asit_Joshi!
Would you be able to post a copy of the workflow that is causing you challenges? Seeing the exact parameters and settings of each node really helps in troubleshooting. Just make sure that you are removing any of your confidential information from the text before you post it publically.
Hi @Tephlon
Here is my workflow . It checks for a particular field in sheet (which will contain ID, Subject, Mail Body, Status of Mail) and if its there, then it will pass the row details. Then it will get all contacts from Hubspot and send all of them mail via SMTP with the Body & Subject given in the sheet.
{
"name": "Send Mail (Get Contact from HubSpot)",
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
280,
130
]
},
{
"parameters": {
"operation": "lookup",
"sheetId": "",
"range": "A:Z",
"lookupColumn": "Status",
"lookupValue": "ToSend",
"options": {
"returnAllMatches": true
}
},
"name": "Google Sheets",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 1,
"position": [
540,
440
],
"credentials": {
"googleApi": "Google API"
}
},
{
"parameters": {
"operation": "update",
"sheetId": "",
"range": "A:Z",
"key": "ID",
"options": {}
},
"name": "Google Sheets1",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 1,
"position": [
1360,
440
],
"credentials": {
"googleApi": "Google API"
}
},
{
"parameters": {
"values": {
"string": [
{
"name": "Status",
"value": "Successfully Sent"
},
{
"name": "ID",
"value": "={{$node[\"Google Sheets\"].json[\"ID\"]}}"
}
]
},
"options": {}
},
"name": "Set",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
1160,
440
]
},
{
"parameters": {
"resource": "contact",
"operation": "getAll",
"returnAll": true,
"additionalFields": {}
},
"name": "Hubspot1",
"type": "n8n-nodes-base.hubspot",
"typeVersion": 1,
"position": [
760,
440
],
"credentials": {
"hubspotApi": ""
}
},
{
"parameters": {
"fromEmail": "[email protected]",
"toEmail": "={{$node[\"Hubspot1\"].json[\"identity-profiles\"][0][\"identities\"][0][\"value\"]}}",
"subject": "={{$node[\"Google Sheets\"].json[\"Subject\"]}}",
"text": "={{$node[\"Google Sheets\"].json[\"Mail Body\"]}}",
"options": {
"allowUnauthorizedCerts": true
}
},
"name": "Send Email",
"type": "n8n-nodes-base.emailSend",
"typeVersion": 1,
"position": [
950,
440
],
"credentials": {
"smtp": ""
}
},
{
"parameters": {
"triggerTimes": {
"item": [
{
"mode": "everyX",
"value": 1,
"unit": "minutes"
}
]
}
},
"name": "Cron",
"type": "n8n-nodes-base.cron",
"typeVersion": 1,
"position": [
320,
430
]
}
],
"connections": {
"Start": {
"main": [
[]
]
},
"Google Sheets": {
"main": [
[
{
"node": "Hubspot1",
"type": "main",
"index": 0
}
]
]
},
"Set": {
"main": [
[
{
"node": "Google Sheets1",
"type": "main",
"index": 0
}
]
]
},
"Hubspot1": {
"main": [
[
{
"node": "Send Email",
"type": "main",
"index": 0
}
]
]
},
"Send Email": {
"main": [
[
{
"node": "Set",
"type": "main",
"index": 0
}
]
]
},
"Cron": {
"main": [
[
{
"node": "Google Sheets",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {},
"id": "3"
}
Im just getting error in the SMTP Mail sending where, I am not able to get Mail as it should when Subject & Body Text are set as Expression.
Thanks
Hey @Asit_Joshi. Thanks for uploading the workflow. This give a lot of context to your issue.
Can you confirm that the information that you are referencing is coming through to the Send Mail node? I’m wondering if the information is not getting passed properly to this node.
The other item to check is whether or not your mail client is not rendering the text portion of the email and is only rendering the HTML portion of the email. Could you attempt to duplicate the information that you are putting into the text:
That will tell us if the email client is causing issues.
Let us know your results.
Hi @Tephlon
I copied the same expression and pasted in HTML Field but no success.
As you can see in following images the expression is being send to this node but for some reason its sending blank mails and not passing the expression while sending mail.
Is there any problem with mail server ? cause when I try with plain text without expression it works perfectly fine.
Hey @Asit_Joshi,
It is possible that the mail server that you are using does not support one of these options but the odds of them not supporting both of these options is pretty much zero.
I don’t think the issue is with the mail server since it is getting the text when you do it without using an expression.
Try this…run your workflow and wait for the email to come through and confirm that the body is empty. Then, open up the send mail node and look to see what it gives you when you open up the expression editor. My gut tells me that the value will be blank.
Hi @Tephlon
I tried that and when I ran workflow and opened the expression it shows the text that I had added earlier in the sheet, but the body and subject of the mail I received is still empty. I also tried changing the mail ID and using a different SMTP server but its also creating the same error.
As I was putting together the next troubleshooting task for you, I think I stumbled upon the problem!
The Send Email node is looking for fill in the Subject and Body fields with {{$node["Google Sheets"].json["Subject"]}} and {{$node["Google Sheets"].json["Mail Body"]}} fields. But, the value that is entered into those fields is their value at the moment they are referenced.
So, if the Google Sheets node has moved on to the next set of data to process by time the Send Email node is asking for the Subject and Mail Body values, the information that the Send Email node receives is not what it expects.
My recommendation would be to reference not the information from the specific node but to rather pass the information along in the workflow and then reference the information as an input to the node itself. My general rule is to try as much as I can to reference the node that came just before the node I am programming.
Let me know if that has helped at all.
Yes, I also think the data is lost somewhere, but Ive kept Cron to every 1 minute and the execution time in total is about 6 sec so its very low chance that it will take the blank value. If I Open the Execution History then you can see in the photo below that the values are set but looks like only the first mail (demo contact of hubspot) got the message not the others (as per message length).
It does look like the first one does have more information.
One thing to keep in mind is that each node will not necessarily wait for a full iteration of the workflow before it goes on to the next item on its list. It may run through a number of items for each iteration.
For example, the IMAP Email node will update its data for every unread email in the IMAP mailbox each time the workflow is executed and will pass information on to the next node once for each unread email. So, if there are two unread email in the mailbox, the node will pass along two sets of data on that single execution instance. If a node later down the line is executing on the first set of data but a referenced earlier node is already on the second set of data, that node may be presenting the wrong info.
Thanks @Tephlon
got a bit of idea of how iteration works in the node. So for this to keep the first data stored what should be done ? I tried with the set node but no success.
When at all possible, reference the node immediately before the node you are working in. So, for your workflow, your expressions in the Send Email node should reference the Hubspot1 node.
Can you share the example workflow of how it can be done cause the Hubspot1 Node does not consist the Subject and MailBody Fields. How we can add into it ?
@Asit_Joshi why do you want all the contacts? should not be just the contacts the Google Sheets node returned?
@RicardoE105
So my workflow is like I want to get contacts of a particular list (currently that is not available in the node) so I am using Get All Contacts and I want to send all contacts a Email from a Custom SMTP Server. So whenever I fill the details of a mail in the google sheet and make the status field as ToSend then it should send mail to the contacts (of the selected list).
@Asit_Joshi @Tephlon ahhh found the issue. The Email node was one of the first nodes thus it does not implement execute but executeSingle meaning it does not iterate for each element of the input. Will fix this.
Ok, this is not the issue, I misunderstood how executeSingle works. Either way, I was able to do it without issues. Check the example below:
{
"nodes": [
{
"parameters": {
"operation": "lookup",
"sheetId": "14ZJZBWmOWOFr9NldppEHnACOTReECG3olxG7VgLInHI",
"range": "A:D",
"lookupColumn": "status",
"lookupValue": "toSent",
"options": {
"returnAllMatches": true
}
},
"name": "Google Sheets",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 1,
"position": [
970,
300
],
"credentials": {
"googleApi": "asas"
}
},
{
"parameters": {
"operation": "update",
"sheetId": "14ZJZBWmOWOFr9NldppEHnACOTReECG3olxG7VgLInHI",
"range": "A:D",
"key": "contactId",
"options": {}
},
"name": "Google Sheets1",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 1,
"position": [
1920,
150
],
"credentials": {
"googleApi": "asas"
}
},
{
"parameters": {
"fromEmail": "[email protected]",
"toEmail": "[email protected]",
"subject": "=sasasasasa",
"text": "=asasasasas",
"options": {
"allowUnauthorizedCerts": true
}
},
"name": "Send Email",
"type": "n8n-nodes-base.emailSend",
"typeVersion": 1,
"position": [
1210,
410
],
"credentials": {
"smtp": "asasasas"
}
},
{
"parameters": {
"triggerTimes": {
"item": [
{
"mode": "everyX",
"value": 1,
"unit": "minutes"
}
]
}
},
"name": "Cron",
"type": "n8n-nodes-base.cron",
"typeVersion": 1,
"position": [
720,
300
]
},
{
"parameters": {
"mode": "mergeByKey",
"propertyName1": "email",
"propertyName2": "envelope.to"
},
"name": "Merge",
"type": "n8n-nodes-base.merge",
"typeVersion": 1,
"position": [
1450,
150
]
},
{
"parameters": {
"values": {
"string": [
{
"name": "status",
"value": "sent"
}
]
},
"options": {}
},
"name": "Set",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
1680,
150
]
}
],
"connections": {
"Google Sheets": {
"main": [
[
{
"node": "Send Email",
"type": "main",
"index": 0
},
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"Send Email": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"Cron": {
"main": [
[
{
"node": "Google Sheets",
"type": "main",
"index": 0
}
]
]
},
"Merge": {
"main": [
[
{
"node": "Set",
"type": "main",
"index": 0
}
]
]
},
"Set": {
"main": [
[
{
"node": "Google Sheets1",
"type": "main",
"index": 0
}
]
]
}
}
}
Hey @RicardoE105 @Tephlon
Got the solution for this. Just interchanged the HubSpot Node with Google Sheets node so the Hubspot Node Runs First and then runs the Google sheet node with the number of contacts in the hubspot output. This gives data for each contact in the email node.
Well done, @Asit_Joshi!
Thanks for not giving up and for sharing your solution!
hey guys im experiencing the same issue, any idea why:
{
“nodes”: [
{
“parameters”: {
“html”: “={{ $json.body.content }}”,
“options”: {}
},
“id”: “40b34607-f522-4daa-839b-a852b9597b62”,
“name”: “Markdown2”,
“type”: “n8n-nodes-base.markdown”,
“position”: [
1340,
7740
],
“typeVersion”: 1
},
{
“parameters”: {
“modelName”: “models/gemini-2.0-flash-lite”,
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.lmChatGoogleGemini”,
“typeVersion”: 1,
“position”: [
1600,
7900
],
“id”: “e66fc25d-7f6d-4530-81c4-25d4a93fc3ca”,
“name”: “Google Gemini Chat Model6”,
“credentials”: {
“googlePalmApi”: {
“id”: “ERlAzrb9uQq6jKe8”,
“name”: “Google Gemini(PaLM) Api account”
}
}
},
{
“parameters”: {
“operationMode”: “nodeInputBinary”,
“options”: {
“binaryDataKey”: “={{ $json.sender.emailAddress.name }}{{ $json.data }}”,
“summarizationMethodAndPrompts”: {
“values”: {
“combineMapPrompt”: “=Write a concise summary of the following in max 200 words, include full name and remove hey.\n\n"{{ $json.sender.emailAddress.name }}{{ $json.data }}"\n”,
“prompt”: “=Write a concise summary of the following in max 200 words, include full name and remove hey.\n\n"{{ $json.sender.emailAddress.name }}{{ $json.data }}"\n\nDo not enter the total number of words used.”
}
}
}
},
“id”: “192bdd2c-bc4b-4829-aaf7-446ac2d31d15”,
“name”: “Email Summarization Chain2”,
“type”: “@n8n/n8n-nodes-langchain.chainSummarization”,
“position”: [
1600,
7740
],
“typeVersion”: 2
},
{
“parameters”: {
“promptType”: “define”,
“text”: “=Review the following email:\n\n{{ $(‘Support Supervisor’).item.json.output }}”,
“hasOutputParser”: true,
“messages”: {
“messageValues”: [
{
“message”: “=You are an expert in reviewing emails before sending them. You need to review and structure them in such a way that you can send them with the correct indentations. It must be in HTML format and you can insert (if you think it is appropriate) only HTML characters such as
, , ,
where necessary.\n\nNon superare le 100 parole.”
}
]
}
},
“id”: “e458324f-8d60-42bb-b9d5-1be743834d20”,
“name”: “Review email10”,
“type”: “@n8n/n8n-nodes-langchain.chainLlm”,
“position”: [
4100,
7740
],
“typeVersion”: 1.5
},
{
“parameters”: {
“modelName”: “models/gemini-2.0-flash-lite”,
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.lmChatGoogleGemini”,
“typeVersion”: 1,
“position”: [
3020,
7960
],
“id”: “1626a760-9f43-4552-a427-b07dc67ef9db”,
“name”: “Google Gemini Chat Model38”,
“credentials”: {
“googlePalmApi”: {
“id”: “ERlAzrb9uQq6jKe8”,
“name”: “Google Gemini(PaLM) Api account”
}
}
},
{
“parameters”: {
“modelName”: “models/gemini-2.0-flash-lite”,
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.lmChatGoogleGemini”,
“typeVersion”: 1,
“position”: [
4140,
7920
],
“id”: “4d3c65be-0f3f-45db-8759-1584227c2511”,
“name”: “Google Gemini Chat Model39”,
“credentials”: {
“googlePalmApi”: {
“id”: “ERlAzrb9uQq6jKe8”,
“name”: “Google Gemini(PaLM) Api account”
}
}
},
{
“parameters”: {
“schemaType”: “manual”,
“inputSchema”: “{\n "type": "object",\n "properties": {\n "isSupport": {\n "type": "boolean"\n },\n "isReview": {\n "type": "boolean"\n },\n "isComplaint": {\n "type": "boolean"\n },\n "isSupport": {\n "type": "boolean"\n }\n\n }\n}\n”
},
“type”: “@n8n/n8n-nodes-langchain.outputParserStructured”,
“typeVersion”: 1.2,
“position”: [
2220,
7940
],
“id”: “f8cdff9a-7f09-42b4-9d2f-8de6a3e75355”,
“name”: “Structured Output Parser5”
},
{
“parameters”: {
“modelName”: “models/gemini-2.0-flash-lite”,
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.lmChatGoogleGemini”,
“typeVersion”: 1,
“position”: [
2020,
7940
],
“id”: “8590ca97-ea3a-4547-93c1-006a831bf1d3”,
“name”: “Google Gemini Chat Model42”,
“credentials”: {
“googlePalmApi”: {
“id”: “ERlAzrb9uQq6jKe8”,
“name”: “Google Gemini(PaLM) Api account”
}
}
},
{
“parameters”: {
“rules”: {
“values”: [
{
“conditions”: {
“options”: {
“caseSensitive”: true,
“leftValue”: “”,
“typeValidation”: “loose”,
“version”: 2
},
“conditions”: [
{
“leftValue”: “={{ $json.output.isReview }}”,
“rightValue”: “”,
“operator”: {
“type”: “boolean”,
“operation”: “true”,
“singleValue”: true
},
“id”: “6e99c489-141e-41f6-89a2-7c60273d867d”
}
],
“combinator”: “and”
},
“renameOutput”: true,
“outputKey”: “Review”
},
{
“conditions”: {
“options”: {
“caseSensitive”: true,
“leftValue”: “”,
“typeValidation”: “loose”,
“version”: 2
},
“conditions”: [
{
“id”: “6585e2e3-c3e8-4656-8c49-d68b5e8eec8c”,
“leftValue”: “={{ $json.output.isSupport }}”,
“rightValue”: “”,
“operator”: {
“type”: “boolean”,
“operation”: “true”,
“singleValue”: true
}
}
],
“combinator”: “and”
},
“renameOutput”: true,
“outputKey”: “Support”
},
{
“conditions”: {
“options”: {
“caseSensitive”: true,
“leftValue”: “”,
“typeValidation”: “loose”,
“version”: 2
},
“conditions”: [
{
“id”: “a4ce4579-5297-4fc3-a5c3-a712e9da0177”,
“leftValue”: “={{ $json.output.isComplaint }}”,
“rightValue”: “”,
“operator”: {
“type”: “boolean”,
“operation”: “true”,
“singleValue”: true
}
}
],
“combinator”: “and”
},
“renameOutput”: true,
“outputKey”: “Complaint”
}
]
},
“looseTypeValidation”: true,
“options”: {}
},
“type”: “n8n-nodes-base.switch”,
“typeVersion”: 3.2,
“position”: [
2520,
7740
],
“id”: “19eddb8e-c145-426b-8d9a-73ecbe3e3a9b”,
“name”: “Switch”
},
{
“parameters”: {
“content”: “# STEP 1\n\n📥 Microsoft Outlook Trigger\n\nListens for new incoming emails in the shared mailbox. Only answer unread mails.\n\n🧾 Markdown (HTML → Markdown)\n\nConverts the raw HTML email body into clean markdown for easier processing by the LLM.\n\n🧠 Email Summarization (Gemini)\n\nAI summarizes the email content for better understanding and context.\n\n🤖 MailTypeDecider Agent\n\nUses AI to analyze the summary and decide the email’s category (e.g., support, complaint, etc.).\n\n🔀 Switch Node\n\nRoutes the email to the appropriate automation flow based on the detected category.”,
“height”: 920,
“width”: 1860,
“color”: 4
},
“id”: “6f4a6ce6-684c-4058-ac2a-b92fd30f5b7f”,
“name”: “Sticky Note10”,
“type”: “n8n-nodes-base.stickyNote”,
“position”: [
780,
7240
],
“typeVersion”: 1
},
{
“parameters”: {
“mode”: “insert”,
“qdrantCollection”: {
“__rl”: true,
“value”: “emailautomationn8n”,
“mode”: “list”,
“cachedResultName”: “emailautomationn8n”
},
“options”: {
“collectionConfig”: “=”
}
},
“type”: “@n8n/n8n-nodes-langchain.vectorStoreQdrant”,
“typeVersion”: 1,
“position”: [
3740,
7740
],
“id”: “898ce523-741a-4509-b324-40b574418678”,
“name”: “Qdrant Vector Store14”,
“alwaysOutputData”: false,
“credentials”: {
“qdrantApi”: {
“id”: “Y8GGpNve35GSiUlc”,
“name”: “QdrantApi account”
}
}
},
{
“parameters”: {
“modelName”: “models/text-embedding-004”
},
“type”: “@n8n/n8n-nodes-langchain.embeddingsGoogleGemini”,
“typeVersion”: 1,
“position”: [
3720,
7920
],
“id”: “3137f0d8-4104-4dbf-b787-476a81b00929”,
“name”: “Embeddings Google Gemini6”,
“credentials”: {
“googlePalmApi”: {
“id”: “ERlAzrb9uQq6jKe8”,
“name”: “Google Gemini(PaLM) Api account”
}
}
},
{
“parameters”: {
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.documentDefaultDataLoader”,
“typeVersion”: 1,
“position”: [
3840,
7920
],
“id”: “f34095ab-20f7-422d-867a-b5d049661431”,
“name”: “Default Data Loader5”
},
{
“parameters”: {
“chunkSize”: 2000
},
“type”: “@n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter”,
“typeVersion”: 1,
“position”: [
3940,
8040
],
“id”: “1e663700-af01-4553-a62b-bff72468e6ac”,
“name”: “Character Text Splitter4”
},
{
“parameters”: {
“assignments”: {
“assignments”: [
{
“id”: “01a637b3-769c-43e0-b513-a41622c31580”,
“name”: “Summary_of_supportMails”,
“value”: “={{ $json.output }}”,
“type”: “string”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.set”,
“typeVersion”: 3.4,
“position”: [
3460,
7740
],
“id”: “94ed8ca0-c9cc-45c9-a106-7aba69bca0e5”,
“name”: “Edit Fields4”
},
{
“parameters”: {
“promptType”: “define”,
“text”: “=Your role is to determine if an email is related to a support mail, review/feedback or complaint. \n\n{{ $(‘Email Summarization Chain2’).item.json.response.text }}\n\nRespond with a JSON object with the following fields:\n- isSupport: which can be either true or false.\n- isReview: which can be either true or false.\n- isComplaint: which can be either true or false.\n\n”,
“hasOutputParser”: true,
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.agent”,
“typeVersion”: 1.8,
“position”: [
2040,
7740
],
“id”: “6eed8f70-4bd8-469b-9bb0-1f74a3855c91”,
“name”: “MailTypeDeciderAgent1”
},
{
“parameters”: {
“name”: “Similarity_Checker_Agent”,
“description”: “Call this tool to search for semantically similar support inquiries or documents.”,
“workflowId”: {
“__rl”: true,
“value”: “MJc6TCJvtsv1nBFd”,
“mode”: “list”,
“cachedResultName”: “Similarity Checker”
},
“workflowInputs”: {
“mappingMode”: “defineBelow”,
“value”: {},
“matchingColumns”: ,
“schema”: ,
“attemptToConvertTypes”: false,
“convertFieldsToString”: false
}
},
“type”: “@n8n/n8n-nodes-langchain.toolWorkflow”,
“typeVersion”: 2,
“position”: [
3180,
7960
],
“id”: “dbe1271c-0729-4f0e-8a0a-cf84b0e8f9a3”,
“name”: “Similarity Checker Agent”
},
{
“parameters”: {
“name”: “Mail_Writer_Agent”,
“description”: “Call this tool to Write a professional support emails based on user input and context.”,
“workflowId”: {
“__rl”: true,
“value”: “opciHmhROqzFyVL1”,
“mode”: “list”,
“cachedResultName”: “MailWriter”
},
“workflowInputs”: {
“mappingMode”: “defineBelow”,
“value”: {},
“matchingColumns”: ,
“schema”: ,
“attemptToConvertTypes”: false,
“convertFieldsToString”: false
}
},
“type”: “@n8n/n8n-nodes-langchain.toolWorkflow”,
“typeVersion”: 2,
“position”: [
3340,
7960
],
“id”: “231af2fa-de9a-45d6-9e08-429ea7e617c4”,
“name”: “Mail Writer Agent”
},
{
“parameters”: {
“promptType”: “define”,
“text”: “=Always use the two tool nodes to write a response mail to this support inquiry:\n\n {{ $(‘Email Summarization Chain2’).item.json.response.text }}”,
“options”: {
“systemMessage”: “You are an Aryze support AI. Your only task is to generate high-quality, professional support emails in plain text. You MUST use two tools in the correct order for every single email:\n\nSimilarity Checker Agent — fetches relevant documentation or past responses from docs.aryze.io\n\nMail Writer Agent — uses that information to craft the final support reply\n\nYou are not allowed to skip either tool. Both must be used. Always. No exceptions.\n\nYOUR FINAL EMAIL OUTPUT MUST FOLLOW THIS EXACT LINE FORMAT:\n"Dear [Name],\n\n[Your support message goes here. It can be multiple lines or paragraphs, but it MUST follow this structure.]\n\nBest regards, \nThe Aryze Support Team"\n\nIf no name is provided, start with Hello, (with the same spacing).\n\nThere MUST be a blank line after the greeting.\n\nThe sign-off MUST be separated by a full blank line above it, and written exactly as shown.\n\nDo NOT include “hey,” “hi,” markdown, asterisks, or any formatting characters.\n\nDo NOT place the sign-off on the same line as the body. It must always appear on a new line, like a formal email.\n\nYour response should reflect Aryze’s values: professional, clear, transparent, and secure. It must be helpful, typo-free, and empathetic.\n\n⚠️ You are not allowed to return anything unless it matches this structure 100%. If you are unsure, reformat until it is perfect.”
}
},
“type”: “@n8n/n8n-nodes-langchain.agent”,
“typeVersion”: 1.8,
“position”: [
3060,
7740
],
“id”: “8640daca-1897-4dc9-a9a0-88e6790f4f0d”,
“name”: “Support Supervisor”
},
{
“parameters”: {
“operation”: “getAll”,
“limit”: 10,
“output”: “raw”,
“filtersUI”: {
“values”: {
“filters”: {
“foldersToExclude”: [
“AQMkADZiMDIyAGIwZC1jZDZhLTQ2OTMtYjQ2MC1hY2I0ZDFkYjBlOTgALgAAA_JL1ddkVT1BvpqoTprkHk8BACgxRoUzVPFKlI1tDtbYKCwAAAIBDwAAAA==”,
“AQMkADZiMDIyAGIwZC1jZDZhLTQ2OTMtYjQ2MC1hY2I0ZDFkYjBlOTgALgAAA_JL1ddkVT1BvpqoTprkHk8BACgxRoUzVPFKlI1tDtbYKCwAAAIBCgAAAA==”,
“AQMkADZiMDIyAGIwZC1jZDZhLTQ2OTMtYjQ2MC1hY2I0ZDFkYjBlOTgALgAAA_JL1ddkVT1BvpqoTprkHk8BACgxRoUzVPFKlI1tDtbYKCwAAAIBIwAAAA==”,
“AQMkADZiMDIyAGIwZC1jZDZhLTQ2OTMtYjQ2MC1hY2I0ZDFkYjBlOTgALgAAA_JL1ddkVT1BvpqoTprkHk8BACgxRoUzVPFKlI1tDtbYKCwAAAIBCwAAAA==”,
“AQMkADZiMDIyAGIwZC1jZDZhLTQ2OTMtYjQ2MC1hY2I0ZDFkYjBlOTgALgAAA_JL1ddkVT1BvpqoTprkHk8BACgxRoUzVPFKlI1tDtbYKCwAAAIBCQAAAA==”
],
“readStatus”: “unread”
}
}
},
“options”: {}
},
“type”: “n8n-nodes-base.microsoftOutlook”,
“typeVersion”: 2,
“position”: [
1080,
7740
],
“id”: “351b1162-613d-4c0f-ac68-438b74f77c30”,
“name”: “Microsoft Outlook7”,
“webhookId”: “1a698860-c5f0-4077-973c-da62b1d2ba50”,
“credentials”: {
“microsoftOutlookOAuth2Api”: {
“id”: “BRdyZ6IKJ1ARPuNU”,
“name”: “Microsoft Outlook shared account”
}
}
},
{
“parameters”: {
“rule”: {
“interval”: [
{
“field”: “minutes”,
“minutesInterval”: 1
}
]
}
},
“type”: “n8n-nodes-base.scheduleTrigger”,
“typeVersion”: 1.2,
“position”: [
840,
7740
],
“id”: “971fa144-554c-45a8-ae16-bde7e5c14ef0”,
“name”: “Schedule Trigger1”
},
{
“parameters”: {
“assignments”: {
“assignments”: [
{
“id”: “2addc1b4-68a0-4c72-87d6-d47286eef70c”,
“name”: “raw”,
“type”: “string”,
“value”: “={{ $json.Logo }}”
},
{
“id”: “d1f631b0-24b0-4bee-81e8-987df5ff857d”,
“name”: “FinalMail”,
“value”: “={{ $(‘Support Supervisor’).item.json.output }}”,
“type”: “string”
}
]
},
“options”: {}
},
“id”: “20df0c48-45e9-44ea-ab8a-e9dbce05965f”,
“name”: “Compose message”,
“type”: “n8n-nodes-base.set”,
“position”: [
5980,
7740
],
“typeVersion”: 3.3
},
{
“parameters”: {
“method”: “POST”,
“url”: “=https://graph.microsoft.com/v1.0/users/[email protected]/messages/{{ $(‘Microsoft Outlook7’).item.json.id }}/CreateReply\n”,
“authentication”: “predefinedCredentialType”,
“nodeCredentialType”: “microsoftOutlookOAuth2Api”,
“sendBody”: true,
“contentType”: “raw”,
“rawContentType”: “application/json”,
“body”: “={\n "message": {\n "subject": "Email with embedded image",\n "body": {\n "contentType": "html",\n "content": "
Dear {{ $(‘Microsoft Outlook7’).item.json.sender.emailAddress.name }},
This email contains an embedded image:
Best regards,
Aryze Support Team
<img src=\"cid:image1\" style=\"width:150px; height:auto;\">"\n },\n "attachments": [\n {\n "@odata.type": "microsoft.graph.fileAttachment",\n "name": "logo.png",\n "contentBytes": "{{ $(‘Convert image to base64’).item.json.Logo }}",\n "contentId": "image1",\n "isInline": true\n }\n ]\n }\n}”,
“options”: {}
},
“id”: “49e35c34-b772-41d8-973c-9a9a72ce7fe8”,
“name”: “Send message”,
“type”: “n8n-nodes-base.httpRequest”,
“position”: [
6180,
7740
],
“typeVersion”: 4.2,
“credentials”: {
“microsoftOutlookOAuth2Api”: {
“id”: “BRdyZ6IKJ1ARPuNU”,
“name”: “Microsoft Outlook shared account”
}
}
},
{
“parameters”: {
“url”: “https://files.catbox.moe/zdirk1.png”,
“options”: {
“response”: {
“response”: {
“responseFormat”: “file”,
“outputPropertyName”: “data123”
}
}
}
},
“id”: “68aec067-91e6-412e-ab58-661f0d67a7ca”,
“name”: “Get image”,
“type”: “n8n-nodes-base.httpRequest”,
“position”: [
5540,
7740
],
“typeVersion”: 4.2
},
{
“parameters”: {
“assignments”: {
“assignments”: [
{
“id”: “b640b120-cf83-4141-8a74-59da3ec1bb92”,
“name”: “from”,
“type”: “string”,
“value”: “={{ $json.sender.emailAddress.address }}”
},
{
“id”: “a01d10b2-a61c-4173-b31c-b24c6c0859d4”,
“name”: “to”,
“type”: “string”,
“value”: “={{ $json.sender.emailAddress.address }}”
},
{
“id”: “1173b361-ed4b-4c3d-af96-c66b9909a4c4”,
“name”: “subject”,
“type”: “string”,
“value”: “Email with embedded image”
},
{
“id”: “b6c8771a-f1c9-4952-9b9d-2684a8017ff4”,
“name”: “body_html”,
“type”: “string”,
“value”: “=
This email contains an embedded image:
\n}
]
},
“options”: {}
},
“id”: “5bb9670f-9e33-4669-b4b0-d2b19a05340f”,
“name”: “Message settings”,
“type”: “n8n-nodes-base.set”,
“position”: [
5320,
7740
],
“typeVersion”: 3.3
},
{
“parameters”: {
“operation”: “binaryToPropery”,
“binaryPropertyName”: “=data123”,
“destinationKey”: “Logo”,
“options”: {}
},
“id”: “f3a46575-7322-41a7-b9c0-8390b2357e5d”,
“name”: “Convert image to base64”,
“type”: “n8n-nodes-base.extractFromFile”,
“position”: [
5760,
7740
],
“typeVersion”: 1,
“alwaysOutputData”: false
},
{
“parameters”: {
“content”: “We use an HTTP node rather than the Gmail node. Add your Gmail creds here”,
“height”: 281.25,
“width”: 168.75,
“color”: 7
},
“id”: “01c541a2-a97b-4863-914c-ff169394d8e6”,
“name”: “Sticky Note4”,
“type”: “n8n-nodes-base.stickyNote”,
“position”: [
5720,
7620
],
“typeVersion”: 1
},
{
“parameters”: {
“content”: “Gets a random image from the internet. Replace this with your image (should be called ‘data’)”,
“height”: 281.25,
“width”: 168.75,
“color”: 7
},
“id”: “18a28f2a-8550-42b9-a30a-0e8092aff294”,
“name”: “Sticky Note6”,
“type”: “n8n-nodes-base.stickyNote”,
“position”: [
5060,
7620
],
“typeVersion”: 1
},
{
“parameters”: {
“content”: “## Try me out\n1. Make sure you add your Gmail credential in the last node\n2. Update the sender and recipient in the ‘Message settings’ node\n3. Click ‘test workflow’”,
“height”: 205
},
“id”: “099b9404-5cbb-4c02-864a-a04efcce26fb”,
“name”: “Sticky Note14”,
“type”: “n8n-nodes-base.stickyNote”,
“position”: [
5380,
7520
],
“typeVersion”: 1
},
{
“parameters”: {
“promptType”: “define”,
“text”: “=you need to make this text into perfect html and dont use line breaks (\n) instead use ‘
’, unescaped quotes, or invalid characters: {{ $(‘Support Supervisor’).item.json.output }}”,
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.agent”,
“typeVersion”: 1.8,
“position”: [
4460,
7740
],
“id”: “8e43cf8a-f8c4-425f-865e-8e5e4e788da9”,
“name”: “AI Agent”
},
{
“parameters”: {
“modelName”: “models/gemini-2.0-flash-lite”,
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.lmChatGoogleGemini”,
“typeVersion”: 1,
“position”: [
4500,
7960
],
“id”: “b43ee817-a44f-442f-931f-3b7490607dde”,
“name”: “Google Gemini Chat Model7”,
“credentials”: {
“googlePalmApi”: {
“id”: “ERlAzrb9uQq6jKe8”,
“name”: “Google Gemini(PaLM) Api account”
}
}
}
],
“connections”: {
“Markdown2”: {
“main”: [
[
{
“node”: “Email Summarization Chain2”,
“type”: “main”,
“index”: 0
}
]
]
},
“Google Gemini Chat Model6”: {
“ai_languageModel”: [
[
{
“node”: “Email Summarization Chain2”,
“type”: “ai_languageModel”,
“index”: 0
}
]
]
},
“Email Summarization Chain2”: {
“main”: [
[
{
“node”: “MailTypeDeciderAgent1”,
“type”: “main”,
“index”: 0
}
]
]
},
“Review email10”: {
“main”: [
[
{
“node”: “AI Agent”,
“type”: “main”,
“index”: 0
}
]
]
},
“Google Gemini Chat Model38”: {
“ai_languageModel”: [
[
{
“node”: “Support Supervisor”,
“type”: “ai_languageModel”,
“index”: 0
}
]
]
},
“Google Gemini Chat Model39”: {
“ai_languageModel”: [
[
{
“node”: “Review email10”,
“type”: “ai_languageModel”,
“index”: 0
}
]
]
},
“Structured Output Parser5”: {
“ai_outputParser”: [
[
{
“node”: “MailTypeDeciderAgent1”,
“type”: “ai_outputParser”,
“index”: 0
}
]
]
},
“Google Gemini Chat Model42”: {
“ai_languageModel”: [
[
{
“node”: “MailTypeDeciderAgent1”,
“type”: “ai_languageModel”,
“index”: 0
}
]
]
},
“Switch”: {
“main”: [
,
[
{
“node”: “Support Supervisor”,
“type”: “main”,
“index”: 0
}
],
]
},
“Qdrant Vector Store14”: {
“main”: [
[
{
“node”: “Review email10”,
“type”: “main”,
“index”: 0
}
]
]
},
“Embeddings Google Gemini6”: {
“ai_embedding”: [
[
{
“node”: “Qdrant Vector Store14”,
“type”: “ai_embedding”,
“index”: 0
}
]
]
},
“Default Data Loader5”: {
“ai_document”: [
[
{
“node”: “Qdrant Vector Store14”,
“type”: “ai_document”,
“index”: 0
}
]
]
},
“Character Text Splitter4”: {
“ai_textSplitter”: [
[
{
“node”: “Default Data Loader5”,
“type”: “ai_textSplitter”,
“index”: 0
}
]
]
},
“Edit Fields4”: {
“main”: [
[
{
“node”: “Qdrant Vector Store14”,
“type”: “main”,
“index”: 0
}
]
]
},
“MailTypeDeciderAgent1”: {
“main”: [
[
{
“node”: “Switch”,
“type”: “main”,
“index”: 0
}
]
]
},
“Similarity Checker Agent”: {
“ai_tool”: [
[
{
“node”: “Support Supervisor”,
“type”: “ai_tool”,
“index”: 0
}
]
]
},
“Mail Writer Agent”: {
“ai_tool”: [
[
{
“node”: “Support Supervisor”,
“type”: “ai_tool”,
“index”: 0
}
]
]
},
“Support Supervisor”: {
“main”: [
[
{
“node”: “Edit Fields4”,
“type”: “main”,
“index”: 0
}
]
]
},
“Microsoft Outlook7”: {
“main”: [
[
{
“node”: “Markdown2”,
“type”: “main”,
“index”: 0
}
]
]
},
“Schedule Trigger1”: {
“main”: [
[
{
“node”: “Microsoft Outlook7”,
“type”: “main”,
“index”: 0
}
]
]
},
“Compose message”: {
“main”: [
[
{
“node”: “Send message”,
“type”: “main”,
“index”: 0
}
]
]
},
“Send message”: {
“main”: [
]
},
“Get image”: {
“main”: [
[
{
“node”: “Convert image to base64”,
“type”: “main”,
“index”: 0
}
]
]
},
“Message settings”: {
“main”: [
[
{
“node”: “Get image”,
“type”: “main”,
“index”: 0
}
]
]
},
“Convert image to base64”: {
“main”: [
[
{
“node”: “Compose message”,
“type”: “main”,
“index”: 0
}
]
]
},
“AI Agent”: {
“main”: [
[
{
“node”: “Message settings”,
“type”: “main”,
“index”: 0
}
]
]
},
“Google Gemini Chat Model7”: {
“ai_languageModel”: [
[
{
“node”: “AI Agent”,
“type”: “ai_languageModel”,
“index”: 0
}
]
]
}
},
“pinData”: {},
“meta”: {
“instanceId”: “afe18a232e0f0f0e97c97fa707ef27e655133749f9b3842462e3b64959dfcc4b”
}
}




