Activity
Mon
Wed
Fri
Sun
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
What is this?
Less
More

Memberships

AI Automation Society

221.3k members • Free

AI Automation Agency Hub

278.9k members • Free

1 contribution to AI Automation Society
AI Email Automation for multiple items
Hey there! I built the AI Email Automation workflow, presented by Nate in his YT video. (Json data attached) It works well for one single email coming in from the trigger node ✅ But as soon as the trigger sends multiple items at once (which is the case when the workflow is active and you have received multiple emails before the next time the workflow execution starts), the emails get drafted in the same thread (see screenshot of inbox attached: Received 3 new emails and drafts of them being created in only the thread of the most recent one). ❌ Reason for problem: In the "createDraft" tool, the ThreadID is set to {{ $('Set Content').item.json.threadID }}, calling up the threadID, which has been set as a string parameter in the "Set Content" node. With the expression {{ $('Set Content').item.json.threadID }} the "createDraft" tool picks up only one thread ID, which is the threadID of the first email of all email items running through the workflow, so probably only referring to the first slot of the threadID parameter in "Set Content" node. Solution 1: 💡 Accessing the individual threadID of each itemIndex in the "Set Content" node by using the expression: {{$items("Set Content")[$itemIndex].json.threadID}} in the "createDraft" tool. Problem Solution 1: The ThreadID in the "createDraft" tool is for all the emails still the same & all drafts get put into one thread. And sometimes a draft gets created in all the email threads, but then the draft content is the same for all drafts. ❌ Solution 2: 💡 Creating a "loop over items(Split in batches)" node, which should send the items individually through the workflow while keeping the expression {{ $('Set Content').item.json.threadID }}. Problem for Solution 2: Exactly the same problem as for solution 1: Sometimes a draft gets created for all the required threadIDs, but then the draft is the same, so only one single email is matching. Or multiple drafts get created in one email thread. ❌
0 likes • May 1
@Roy Kahuthu Thanks for your fast reply Roy! Have you also experience in setting up the ai agents in n8n which communicate with a database to create the answers and know how to deal with all the parameters of vector databases and how to prompt the ai agents to communicate with the vector database in an efficient way?
0 likes • May 2
@Roy Kahuthu The goal is to optimize already existing workflows like e.g. the RAG pipeline and the shown email automation workflow to make them work more reliable and efficient for our customers. That's why I am searching for someone who has a deeper understanding of all parameters of the n8n building blocks and how they work together in the best way. In case you see yourself fitting into that, then I would be happy to have a quick informal chat with you, where I can provide some more background information on what our goal is and where we can elaborate potential collaboration. If you are interested just send me a text in the personal chat:)
1-1 of 1
Max Stoebe
1
2points to level up
@max-stoebe-3195
Passionate AI Automation Engineer

Active 18d ago
Joined Apr 16, 2025
Powered by