Prerequisites
Setup
When you connect your Gmail account, Courier requests permission to send emails on your behalf. Courier sends nothing until you make a send request using the provider.OAuth authorization
Google APIs use OAuth for authentication and authorization. Once you grant permission, Courier requests an access token from the Google Authorization Server and sends the token to the Google Gmail API on your behalf. To grant permission, sign into the Gmail inbox you want to send from and consent to Courier’s requested Gmail scopes.Gmail always sends as the authorized inbox, so a template’s From field has no effect here. Set the display name with the integration’s From Name, or override it per send with
override.body.fromName. To change the address, authorize a different inbox.Updating authorized account
On the page, click “Authorize a different Gmail inbox” to send from another account. You must grant permissions again every time you change the account. Addressing a recipient and sending are the same on every email provider, so they are documented once: and .Overrides
covers the two levels and which one wins. lists the fields every email provider takes. Inoverride.body you can set subject, text, fromName, replyTo, cc, and bcc. Each replaces the value Courier rendered. You can also override the request itself with override.headers, override.method, and override.url, and supply a token directly with override.config.access_token.
override.config.access_token.
Troubleshooting
All Gmail sends failing with “request failed with status code 400”
This error means Courier’s stored OAuth refresh token is no longer valid. Google rejected the token refresh with a400 invalid_grant response, so all subsequent sends fail as UNDELIVERABLE.
Common causes:
- The Gmail account password was changed
- A Google Workspace admin revoked Courier’s OAuth access
- Google revoked the token due to inactivity or a security review
- The Google Cloud project’s OAuth consent screen is in “Testing” mode (tokens expire after 7 days)
UNDELIVERABLE with the error "Request failed with status code 400" and willRetry: false, the refresh token is dead.
Fix: Go to Channels → Gmail in Courier Studio, click Update next to the authorized account, and re-authorize with your Google account. This issues a fresh access token and refresh token, restoring sends immediately.
If the Gmail channel is configured with routing fallback, messages that fail on Gmail will fall through to the next configured channel (e.g., Courier Inbox). Only the Gmail delivery path is affected.
Provider details
routing.channels instead is supported, and sends through just this provider.
Send to a specific provider
When that is worth doing, and what you give up: failover, channel priority, and providers you add later.