Insufficient Permission Error when sending email

I have a google workspace account and I’m trying to send an email in a workflow to an email address captured from a trigger. I get “Insufficient Permission”. The details start with…

    at Gaxios._request 

I don’t know if I should copy and paste the rest of the details as I’m unsure if it contains sensitive data. Obviously, this is out of my “scope” of understanding. Any tips?

Hi @craftmath

Sure happy to help, but just so you know you can share the entire error message. Google will not include personal details in the error message from their API.

Are you using the new Gmail action or the Gmail Developer App to send this email?

Hey @pierce! Thanks for replying. I am using just the new Gmail action since all I want to do is send a prefabricated email to an email address that is captured from another source. I’m assuming this doesn’t need to access restricted scopes which would be needed for the developer gmail? This is the error details in full…

Insufficient Permission


    at Gaxios._request (/tmp/__pdg__/dist/code/2ba11df40274780fc3896bdc851a8ade050f8bb4fb66480e25a73450ee63102f/node_modules/.pnpm/gaxios@4.3.3/node_modules/gaxios/build/src/gaxios.js:129:23)
    at process.processTicksAndRejections (internal/process/task_queues.js:95:5)
    at OAuth2Client.requestAsync (/tmp/__pdg__/dist/code/2ba11df40274780fc3896bdc851a8ade050f8bb4fb66480e25a73450ee63102f/node_modules/.pnpm/google-auth-library@7.14.1/node_modules/google-auth-library/build/src/auth/oauth2client.js:368:18)
    at Object.sendEmail (file:///tmp/__pdg__/dist/code/2ba11df40274780fc3896bdc851a8ade050f8bb4fb66480e25a73450ee63102f/code/
    at (file:///tmp/__pdg__/dist/code/2ba11df40274780fc3896bdc851a8ade050f8bb4fb66480e25a73450ee63102f/code/actions/send-email/send-email.mjs:101:22)
    at global.executeComponent (/var/task/launch_worker.js:146:22)
    at MessagePort.messageHandler (/var/task/launch_worker.js:618:28)

Thanks again for responding.

Hi @craftmath,

One important detail is to make sure that the send email on your behalf is checked as you connect Pipedream to Gmail.

Can you try reconnecting your Gmail account and make sure those are checked?

:person_facepalming:t3: Yep. My elevator just isn’t making it to the top floor these days… I casually scrolled right past that as I originally granted permission. That did the trick! Appreciate your help. :facepunch:

1 Like