422 error trying to setup oauth connection to google sheets

I am trying to connect google sheets as a resource and everything goes smoothly until after I "allow" retool the permissions. Then I get directed to this url/error. I'd appreciate any help (I've 'tried again' as the error recommends). Thanks!

Edit: I'm assuming I didn't setup oauth correctly in my Google Workspace, so I'll check that.

Hello @Brady_Meisenhelder!

Any chance you could share a screenshot of the resource and the query you are running?

Also have you tried to re-auth to your gmail/gSheets account from the resource view in retool?

Try the blue 'Re-auth' on the right side and see if that works. A 422 error is a little tricky to debug because we need to see the payload that is being sent in to see what tokens are missing or if the permissions failed to authorize you properly.

If you have a screenshot from your debugger when you try to query the resource as well as a picture of how you have the resource set up, that might give us some clues on what could be the root of this issue.

Thanks @Jack_T

I wasn't very clear. I am getting this error when trying to setup the initial oauth at mycustomdomain.retool.com/resources via the "connect with oauth" button

I get all the way to this screen

but after hitting "allow" I get the 422 error / url in my original post with "tryretool.com" domain.

Best,
Brady

Hey @Brady_Meisenhelder thanks for clarifying and posting the screenshots.

Is the google account "bm@mchpp.org" being used for both the Retool account and the Google account that has the sheets?

I was trying to reproduce the bug you got but I haven't been able to. Might need to try deleting the resource and starting over to sync the Connection. Here are our docs on setting up Google Sheets resources it looks like you did everything right but definitely check the docs to see if there might be anything else missing.

I will keep looking into the bug and seeing if other users in the past have had this issue.

Thanks @Jack_T

Yes, both retool and google. I'll try the sync starting over and check the doc link again.

Best,
Brady

Well. Re-doing the oauth from scratch worked right away. So this is resolved.

Thanks for checking in @Jack_T .

Brady

@Brady_Meisenhelder Great to hear!

Very odd issue, have a good one!