Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GMAIL-Trigger fires every minute with the latest email #5510

Closed
paulwer opened this issue Feb 19, 2023 · 14 comments
Closed

GMAIL-Trigger fires every minute with the latest email #5510

paulwer opened this issue Feb 19, 2023 · 14 comments
Labels
in linear Issue or PR has been created in Linear for internal review Released

Comments

@paulwer
Copy link

paulwer commented Feb 19, 2023

Describe the bug
GMAIL-Trigger fires every minute with the latest email
To Reproduce
Use the trigger with refresh-time one-minute

Expected behavior
only fetch emails once / remove option for users to select this.

Environment (please complete the following information):

  • n8n Version 0.216.0
@Joffcom
Copy link
Member

Joffcom commented Feb 20, 2023

Hey @paulwer,

I have just set up a simple trigger using the GMail node with a 1 minute interval set, I will report back in 10 minutes with the findings.

@Joffcom
Copy link
Member

Joffcom commented Feb 20, 2023

Hey @paulwer,

Testing results are in... I have only have 2 runs. The first one was a manual execution and the second was a well timed message from a recruiter on LinkedIn.

image

Not sure why I am not seeing the same thing, I guess looking at the report I should have an execution every minute with the LinkedIn message in it.

Is there maybe more to this? What settings do you have enabled in the node? This is what I have been using.

image

@paulwer
Copy link
Author

paulwer commented Feb 20, 2023

@Joffcom https://drive.google.com/file/d/1kqDkaaJDeEDwZzY_F2K5RE-ByhAK_XMo/view?usp=share_link
Edit: Video quality is still trash, pls, wait a couple minutes, until drive as procesed it or download it

It not happens all the time. right now its working, but yesterday there were many executions, which does have duplicates.
I currently save the id to a database, to prevent duplicates within my flow.

This issue caused an exhessive call of a payed api (mindee) within the last days in my case.

@paulwer
Copy link
Author

paulwer commented Feb 20, 2023

@Joffcom
i am downloading the attachements.
wild guess: maybe this causes a long executiontime and therefore overlaps with the next execution?

Unbenannt

Edit: according to the code, this could realy be possible. Maybe the webhook_data should be updated right after the first fetch of all messages. I assume, binary data is downloaded later within the for-loop.
Please check and verify if this is a thing?

@Joffcom
Copy link
Member

Joffcom commented Feb 20, 2023

Hey @paulwer,

I think we base the fetching on the current date / time so when the node runs it would be something like lastRunTime - 1 minute we then check the inbox for anything with a time that matches that. Looking at the video though I did notice that the email Date field was Invalid DateTime so I am just doing another test with Simplify Disabled to see if that changes anything.

Will be back in 10 minutes.

@Joffcom
Copy link
Member

Joffcom commented Feb 20, 2023

Quick update... It wasn't that 🤔 Time to try with an attachment.

@Joffcom
Copy link
Member

Joffcom commented Feb 20, 2023

Alright, Last update before lunch...

With file downloading it is all good as well 🤔 will think of more tests to try and reproduce it.

@paulwer
Copy link
Author

paulwer commented Feb 20, 2023

thank you very much, i am here, if you need me anything to try or for questions. :)

@paulwer
Copy link
Author

paulwer commented Feb 20, 2023

@Joffcom should i forward you a mail, which has caused this in my case?

@Joffcom
Copy link
Member

Joffcom commented Feb 20, 2023

Hey @paulwer,

Oddly enough I got back from lunch and there was a newsletter that came in and I have 13 executions for it, Now I have seen it I just need to find a way to force it to happen so that we can work out how to fix it.

@Joffcom
Copy link
Member

Joffcom commented Feb 21, 2023

Afternoon @paulwer,

Just checked my workflow and it has happened again but this time I didn't have the download option set. It was also an email from Costco so no real pattern there yet.

I have created an internal ticket for this one though which we will be tracking as NODE-320.

@Joffcom Joffcom added the in linear Issue or PR has been created in Linear for internal review label Feb 21, 2023
@paulwer
Copy link
Author

paulwer commented Feb 21, 2023

Thanks for the information. Looking forward for next informations. Have a nice day.

@Joffcom
Copy link
Member

Joffcom commented Jun 29, 2023

Oddly enough I was just testing another issue and an email from Costco has again appeared multiple times, I am starting to thing this is related to specific email senders or properties.

@janober
Copy link
Member

janober commented May 22, 2024

Fix got released with [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in linear Issue or PR has been created in Linear for internal review Released
Projects
None yet
Development

No branches or pull requests

3 participants