Hello everyone,
I am developing a workflow to automatically process all incoming emails for a healthcare service provider and schedule appointments for patients. For this purpose, I am using a Gmail Trigger node set to poll every minute.
However, I have encountered a critical issue: the workflow retrieves attachments that are not actually present in the analyzed email. In Image 1, you can see all the attachments that are supposedly associated with the email. In Image 2, you can verify that the actual email does not contain these files. Image 3 shows my current workflow configuration.
My question is:
What could be causing this behavior? Why is the Gmail Trigger node returning attachments that are not present in the specific email being processed? I am certain that these files are not part of the message.
Any technical insights or suggestions to troubleshoot and resolve this issue would be greatly appreciated.
Thank you in advance!
Imagen 1
Imagen 2
Imagen 3
From what it looks like the trigger gathered two new emails. The first one is likely the one you are referring to as Image 2 (attachment being the image used in the email probably), while the second email with a set of 4 images is another email.
That’s right, I hadn’t realized it before, but I just checked and I actually have two incoming emails at 10:34 a.m. The other files are from the second email. Is there a way to prevent this from happening?
You can introduce a workflow based logic for how to handle different emails or you can specify a better filter in the Gmail node if you don’t want certain emails to pass through
I have to read every incoming email so filtering isn’t going to work for my workflow. How would the based logic would work? do you have any examples I can check? I really new in n8n so any help would mean a lot.
Well if you need to process ALL emails, you don’t need to change anything really.
So, any advice on how can I avoid the issue? Thanks you for your time 
Well, the mystery from the original post (why does gmail trigger shows attachments that aren’t a part of the email) is solved. Which issue you are referring to? The way Trigger works is it periodically checks for emails and sometimes there are more than one in that given refresh period, so having multiple emails that came since the last check is kind of a feature. What do you want to do with it - is up to you. Do you want to start looping through them - there is a Loop over Items node. Do you want to somehow process them together - also possible, but the logic is solely depends on what you want YOU want to happen next 
I need to process each email individually, so if two emails come at the same time, I want to process one first and the other one. The issue is that apparently the gmail trigger node with 1 minute poll takes the attachments of all of the emails that came at the same hour but no the emails it self, it was just the attachments.
Most of the time (with the exception of a few nodes), when multiple input items are received by a node, they are processed sequentially. In a rare situation when you do need to explicitly process them individually, you would use Loop Over Items node, which takes one input item at a time and runs with it and then loops back and picks up the next one.
You can read about it here.
1 Like