Why Did My Gmail Email Received Tracker Stop Working After Setup and Can It Be Linked to my OAuth App's "Testing" Status?

This topic was automatically generated from Slack. You can find the original thread here.

Hi everyone, i’m here to ask for the gmail emails received tracker. The thing is that after setting up the OAuth with this guide, i got to track the emails received for a while, but after a few hours it stopped working. I tried to delete it and set it up again, but the same thing happened.

The source logs didn’t display any error or message, just a "2024-10-14T17:49:17 End". After almost exactly 24hs of not tracking any emails, suddenly the logs now show this:

"2024-10-15T17:50:04
error
Error: Requested entity was not found.

2024-10-15T17:49:54
Log
New messages found: 61"

I think that the requested entity error may occur when an email is deleted, and some emails were deleted from the account, but not every one of them, the 61 emails found are not being displayed in the events list.

The gmail scope that i am using is “./auth/gmail.readonly”, because i just need to create a new task (or update an existing one) in ClickUp after receiving a new email, so i think that with only that scope, it should work.

Something important is that i am currently working with my OAuth app in “testing” status. May be this causing the trouble? I didn’t publish it yet because it requires a verification form to be submitted, since the “./auth/gmail.readonly” is a sensitive scope. Also, the testing description says: “Testing: If your app is still being tested and built, you can set your status to ‘testing’. In this state, you can test your app with a limited number of users.”, it only mention a limited number of users, but i am just tracking one gmail account with only one authenticated user, so i am not sure if this is what is causing the trouble (i mean, it doesn’t mention performance problems, or at least i don’t undersand it in that way).

Last thing, if this testing status of the app is causing the trouble, after submitting the google verification form, it could last like 5 days to be confirmed. During this time, the track will not work?

Hi , thank you for reaching out.

I assume you’re using the Gmail webhook integration

Something important is that i am currently working with my OAuth app in “testing” status. May be this causing the trouble? I didn’t publish it yet because it requires a verification form to be submitted, since the “./auth/gmail.readonly” is a sensitive scope
I believe this should be an issue, as the testing app will be deactivated after a while. I suggest you to publish your app to prevent this, or you can use the Polling type instead (image below). You can set the interval to 5 or 1 minutes, which is mostly replicate the webhook source behavior

Aside from that, we have released a new version of Gmail - New Email Received to better handling error.

When you have time, could you create a new Gmail - New Email Received (webhook) source to see if the issue has been solved?

Hi! Yeah, i’m using polling right now, the thing with my current testing state in webhook is that i’ve barely used it, just a few hours and stopped working, is that normal too?

I will create a new project and test the new trigger with webhook.

Thank you for answering!

the thing with my current testing state in webhook is that i’ve barely used it, just a few hours and stopped working
I shipped a fix that hopefully will fix this issue.

Kindly create a new Pipedream Gmail - New Event Received source (webhook type) and let us know if you still facing the issue.

I’ll test it for a few hours to see how it works and then leave here an update. Thank you Leo

Hi Leo, i setted two gmail triggers, one with webhook and another with polling. As you can see, the same thing happened:

image.png

Webhook logs here

Hi , “the same thing happened” means the webhook doesn’t work right?

Yeah, both triggers are active, the one with polling is working great, but the webhook doesn’t. In this test, the gmail oauth app is also in “testing” status, so this might be causing the trouble, but like i said before, this guide doesn’t mention that kind of trouble, so i’m not 100% sure.

Hi ,

The guide has the section 6 that instructs you to publish your app

Google has a 7 day expiration window on refresh tokens for External applications with a publishing status of “Testing”, so you will need to Publish your application in order to maintain your account connection.
Though I don’t think that’s the issue you’re facing. For now, would you mind using the Polling source instead? I’ll reach out to our component dev for further investigation.

Hi , could you investigate this issue when you have time? I believe you recently work on the improvement of this Gmail - New Email Received webhook

Of course! I haven’t had any trouble with polling, so I’ll continue using it. Thank you!