Google Mail
A connected Google Mail (Gmail) account, letting automations send email from it and reporting inbox counts as read-only sensors - the same browser-redirect OAuth2 consent screen Google Drive uses, with your own Google Cloud app credentials.
Connecting
Devices & Services > Google Mail > "+ Add account" needs a Client ID and Client Secret
from an app you create yourself in the Google Cloud Console (with the Gmail API enabled and the
shown Redirect URI added to it), then redirects your browser to Google's own consent screen;
approving it redirects back to Athena and saves the account automatically. Athena requests only
the narrow gmail.send scope (permission to send, nothing else) and
gmail.metadata scope (headers and labels only) - it can never read the body or
attachments of any existing message.
Reached over a raw LAN IP (e.g. https://192.168.1.50:8088)? Google rejects a bare IP address as a redirect URI - and also rejects local-only endings like .local or .home, since it requires the redirect URI's own domain to end in a real top-level domain such as .com or .org. That domain never needs to be registered or reachable on the public internet - only your own hosts file needs to resolve it, and only for your own browser. Add a line like 192.168.1.50 local.athena.com to your hosts file (using this server's own IP and any name you like, as long as it ends in .com/.org/similar) - Athena is then reachable at https://local.athena.com:8088. Use that as the Redirect URI both in the connect form here and in the app in the Google Cloud Console. The hosts file is /etc/hosts on Linux and macOS (edit with sudo), or C:\Windows\System32\drivers\etc\hosts on Windows (edit Notepad as Administrator).
Entities
Checked every 2 minutes: unread_count, total_messages, and
starred_count (all whole-inbox message counts), plus
latest_sender/latest_subject/latest_message_time for the
newest message in the inbox. Works with
Dashboard cards,
History, and
Automations exactly like every other integration -
there's nothing to control here, so it never appears as an Action node target on its own.
Sending email from an automation
The "Send Email" action node sets a recipient, subject, and body. The body may contain the
literal placeholder {value}, replaced at send time with whatever value fired the
automation - handy for turning any sensor change into an emailed alert.
Reconnecting
Google's own refresh token can stop working - most commonly because the connected app is still in
"Testing" publishing status in the Google Cloud Console, where Google expires refresh tokens
after about a week. When that happens the account's own page gets a "Reconnect" button (re-runs
the consent screen without losing history), a notification appears pointing straight at it, and a
needs_reconnect sensor is available if you want to build your own automation around
it (e.g. a push notification through ntfy).
Google Cast, Google Drive, Google Calendar, and Google Mail share one "Google" entry when picking a new integration to add from Devices & Services, since all four connect to the same account family - once any is configured, each still gets its own separate card.