Gmail Integration

Gmail on TinyCommand — Triggers & Actions
Gmail is one of the most widely used email services for automation. With the Gmail integration on TinyCommand, you can receive emails as triggers and automate email-related tasks such as sending, drafting, labeling, reading, or deleting messages.
This page covers everything you need to get started: authentication, connection setup, triggers, actions, OAuth scopes, and troubleshooting.
Before You Begin
To use Gmail inside TinyCommand, you’ll need:
· A Gmail or Google Workspace account
· Permission to authorize third-party apps (Workspace users may need admin approval)
· Access to TinyCommand with permission to create new connections
Authentication
TinyCommand uses Google OAuth 2.0 to securely connect to your Gmail account. When you connect Gmail for the first time, Google asks you to approve the specific permissions TinyCommand needs to read, modify, or send emails.
How to Create a New Gmail Connection (Step-by-Step)
1. In TinyCommand, go to Settings → Connections or open a Gmail node inside a workflow.
2. Click Add connection.
3. Select Gmail from the list of providers.
4. A Google login popup will appear. Choose the Gmail or Google Workspace account you want to connect.
5. Review the requested permissions and click Allow / Continue.
6. TinyCommand completes the OAuth flow and returns you to the app with your new Gmail connection marked as Connected.
7. (Optional) Use Test connection to verify access.
Required Gmail OAuth Scopes
TinyCommand requests the minimum Gmail scopes required for supported actions:
· gmail.send — Send emails
· gmail.readonly — Read emails (used for triggers)
· gmail.modify — Modify labels, mark as read/unread, delete messages
· gmail.compose — Create drafts
Google classifies scopes as sensitive or restricted, so some flows may require additional admin approval in Google Workspace.
Gmail Trigger on TinyCommand
Trigger: New Email Received
This trigger activates whenever a new email arrives in your Gmail inbox or in a specific label you choose.
What TinyCommand checks:
· New incoming messages
· Label filters
· Subject or metadata filters
· Attachment presence (optional)
Data returned into the workflow:
· Message ID
· Thread ID
· From, To, CC
· Subject
· Body (HTML + Text options)
· Timestamps
· Attachments metadata
Gmail API reference for message retrieval:
https://developers.google.com/gmail/api/reference/rest/v1/users.messages
Gmail Actions on TinyCommand
Send Email
Send a new email through your connected Gmail account. Supports HTML, plain text, attachments, CC, and BCC.
API: https://developers.google.com/gmail/api/guides/sending
Delete Email
Delete an email using its Message ID. Moves messages to Trash by default.
API:
https://developers.google.com/gmail/api/reference/rest/v1/users.messages/delete
Create Draft
Create a draft message inside Gmail for human review or approval.
API:
https://developers.google.com/gmail/api/reference/rest/v1/users.drafts/create
Label Email / Modify Email Labels
Add or remove labels such as Starred, Important, or custom labels.
Label guide:
https://developers.google.com/gmail/api/guides/labels
API:
https://developers.google.com/gmail/api/reference/rest/v1/users.messages/modify
Mark as Read
Removes the UNREAD label from the email.
Uses the Gmail modify endpoint.
Mark as Unread
Adds the UNREAD label back to the email.
Uses the same Gmail modify endpoint.
Copy Email
TinyCommand duplicates the selected email to another label or folder using a retrieve-and-reinsert flow.
API reference:
https://developers.google.com/gmail/api/reference/rest/v1/users.messages
How Data Moves Between Gmail and TinyCommand
· Triggers → TinyCommand
TinyCommand polls Gmail using message list endpoints and updates workflow variables with the incoming data.
· Actions → Gmail
Workflow actions use Gmail’s REST API to send, modify, move, or create emails.
All Gmail operations follow TinyCommand’s secure infrastructure and auditing standards.
Troubleshooting
Popup blocked:
Enable pop-ups for TinyCommand.
Workspace restrictions:
Your Google Workspace admin may need to whitelist TinyCommand's OAuth client.
Insufficient permissions:
Reconnect Gmail with the correct scopes enabled.
OAuth token expired or revoked:
Click Reconnect from the Connections page.
Google verification required:
If Google flags the app due to sensitive scopes, follow their verification process.
Google OAuth help:
https://developers.google.com/identity/protocols/oauth2
Official Google references:
· Gmail API documentation: https://developers.google.com/gmail/api
Gmail Help Center: https://support.google.com/mail