📧 Gmail New Email Trigger is Now Available!

Hi @kishanprmr - I think I found a bug in the gmail file handling. Sometimes the file URL gets corrupted but it’s ONLY happening in production. I can process an email w/ attachment in test mode and it works fine, but when I turn on the flow it’ll fail for the very same email. It doesn’t happen to every email either.

I can’t see the output directly because it just shows “(truncated)” but looking at the failed JSON from Airtable (where I’m trying to upload the file) it returns the below…

“message”: "Invalid attachment object for field attachment: {\n "url": "memory://{\"fileName\":\"ProjectCaesar-6.24.pdf\",\"data\":\"JVBERi0xLjcNCiW1t…

…and that goes on for pages and pages. Again, this only happens in production, no issues when I’m testing it either piecemeal or full flow.

Getting an error with Gmail

Would love some help @kishanprmr @abuaboud

I get the following error

{
“message”: “Failed to run test step, please ensure settings are correct.”,
“error”: {
“config”: {
“retry”: true,
“retryConfig”: {
“httpMethodsToRetry”: [
“GET”,
“PUT”,
“POST”,
“HEAD”,
“OPTIONS”,
“DELETE”
],
“currentRetryAttempt”: 0,
“retry”: 3,
“noResponseRetries”: 2,
“retryDelayMultiplier”: 2,
“timeOfFirstRequest”: 1746410087419,
“totalTimeout”: 9007199254740991,
“maxRetryDelay”: 9007199254740991,
“statusCodesToRetry”: [
[
100,
199
],
[
408,
408
],
[
429,
429
],
[
500,
599
]
]
},
“method”: “POST”,
“url”: “https://oauth2.googleapis.com/token”,
“data”: “< - See errorRedactor option in gaxios for configuration>.”,
“headers”: {
“Content-Type”: “application/x-www-form-urlencoded”,
“User-Agent”: “google-api-nodejs-client/9.15.1”,
“x-goog-api-client”: “gl-node/18.20.5”
},
“body”: “< - See errorRedactor option in gaxios for configuration>.”,
“responseType”: “unknown”
},
“response”: {
“config”: {
“retry”: true,
“retryConfig”: {
“httpMethodsToRetry”: [
“GET”,
“PUT”,
“POST”,
“HEAD”,
“OPTIONS”,
“DELETE”
]
},
“method”: “POST”,
“url”: “https://oauth2.googleapis.com/token”,
“data”: “< - See errorRedactor option in gaxios for configuration>.”,
“headers”: {
“Content-Type”: “application/x-www-form-urlencoded”,
“User-Agent”: “google-api-nodejs-client/9.15.1”,
“x-goog-api-client”: “gl-node/18.20.5”
},
“body”: “< - See errorRedactor option in gaxios for configuration>.”,
“responseType”: “unknown”
},
“data”: {
“error”: “invalid_request”,
“error_description”: “Could not determine client ID from request.”
},
“headers”: {
“alt-svc”: “h3=":443"; ma=2592000,h3-29=":443"; ma=2592000”,
“cache-control”: “no-cache, no-store, max-age=0, must-revalidate”,
“connection”: “close”,
“content-encoding”: “gzip”,
“content-type”: “application/json; charset=utf-8”,
“date”: “Mon, 05 May 2025 01:54:47 GMT”,
“expires”: “Mon, 01 Jan 1990 00:00:00 GMT”,
“pragma”: “no-cache”,
“server”: “scaffolding on HTTPServer2”,
“transfer-encoding”: “chunked”,
“vary”: “Origin, X-Origin, Referer”,
“x-content-type-options”: “nosniff”,
“x-frame-options”: “SAMEORIGIN”,
“x-xss-protection”: “0”
},
“status”: 400,
“statusText”: “Bad Request”,
“request”: {
“responseURL”: “https://oauth2.googleapis.com/token”
}
},
“status”: 400
}
}

@S_M can can you try reconnecting the account and then recreating the step?

1 Like

That fixed it. Looks like I forgot to check some scopes in the initial add since I connected that specific Gmail before. Thank you! :slight_smile:

1 Like