Reference · Credentials
Gmail OAuth2 credentials
Used by 2 BusyBot nodes.
gmailOAuth2 5 fields The Gmail OAuth2 credential connects as a specific Google user who has granted consent, holding an access token and — crucially — a refresh token that renews it. It requires an OAuth client created in a Google Cloud project with the Gmail API enabled.
Fields
| Field | Type | Required | Notes |
|---|---|---|---|
Access TokenaccessToken | password | Yes | Google OAuth2 access token with Gmail scopes |
Refresh TokenrefreshToken | password | Yes | Google OAuth2 refresh token for automatic renewal |
Client IDclientId | string | Yes | Google OAuth2 client ID from Google Cloud Console |
Client SecretclientSecret | password | Yes | Google OAuth2 client secret from Google Cloud Console |
Token Expiry (Unix timestamp)expiresAt | string | No | Unix timestamp (seconds) when the access token expires. Managed automatically after refresh. |
Getting your credentials
- In the Google Cloud Console, select or create a project.
- Enable the Gmail API for that project.
- Configure the OAuth consent screen, adding the Gmail scopes your workflow needs and any test users while the app is unverified.
- Create an OAuth 2.0 Client ID of type Web application, and add BusyBot’s redirect URL to its authorised redirect URIs.
- Copy the Client ID and Client Secret into the credential.
- Complete the authorisation flow so the credential stores an access token and a refresh token.
Permissions and scopes
Request the narrowest Gmail scopes that cover your operations — reading, sending or modifying — rather than full mailbox access. Google’s verification requirements are stricter for broader scopes.
While the consent screen is in testing, only listed test users can authorise, and refresh tokens issued in that state may expire sooner.
Troubleshooting
- Access revoked after a week — the OAuth consent screen is still in testing mode, where refresh tokens expire quickly. Publish the app for stable access.
- redirect_uri_mismatch — the redirect URI on the OAuth client does not exactly match the one used in the flow.
- Insufficient permission — the required Gmail scope was not granted; re-run consent with the correct scopes.
- Token expired and not renewing — the credential has no refresh token. Re-authorise so one is stored.
Frequently asked questions
Why did access stop after about a week?
Because the OAuth consent screen is still in testing mode, where refresh tokens expire quickly. Publishing the app resolves it.
What is the refresh token for?
Renewing the short-lived access token automatically. Without one stored, the connection dies as soon as the access token expires.
Should I use this or a Google service account?
Use this to act as a specific person's mailbox. Service accounts (the Google API credential) suit application-level access and Workspace-wide delegation.
Why does authorisation fail with redirect_uri_mismatch?
The redirect URI registered on the OAuth client must match exactly, including protocol and any trailing path.
Nodes that use Gmail OAuth2
One credential works across every node below — create it once and reuse it.
Last updated . Spotted something wrong? Tell us.