Skip to main content

Your workflow needs to read one Google Sheet and post to one Slack channel. What is the difference between connecting with OAuth and with an API key, and what access do you give it?

Automation workflows · Beginner 3

Short answer

An API key is one long-lived secret: whoever holds it can call the API. With OAuth, an account owner grants the tool limited access through scopes, and the tool gets tokens that expire and can be revoked. Either way I give the least access: read-only on that one sheet, post-only to that one channel, stored in the credential store.

Deeper answer

Both are ways to prove to an API who is calling. An API key is simple, but it is often valid until someone deletes it, and it can carry the full rights of the account. OAuth adds consent and scopes: the screen that says 'this app wants to read your spreadsheets'. The tool then holds an access token that expires and a refresh token to get new ones.

For automation, the question is what happens if the secret leaks or the workflow has a bug. So I read the scope list and choose the narrowest. For the sheet, I use a service account and share only that one sheet with it, as a viewer. For Slack, I create an app with only the permission to post messages and add it to one channel. I never paste keys into a text field of a node or into a URL, where they appear in logs and exports. Interviewers listen for scopes, expiry and least privilege.

What a strong answer covers

Answer it out loud in the mock interview about 2 min

Follow-ups to expect

Common mistakes

Learn it

Call a web API and read JSON

Practice Automation workflows questions

More on this topic

Today's AI turns are used

Lessons, roadmaps, videos, practice cards and the code playground stay free with your account, with no limit.