What and how it can be used:
The Gmail component connects to a user’s Gmail account using Composio-managed OAuth and executes Gmail actions (read, search, send, draft). It enables programmatic access to email operations including sending messages, reading emails, searching inbox, creating drafts, managing labels, and handling attachments. This component provides seamless integration with Gmail for email automation within workflows.

When/how the component should be used:
- Use when you need to automate email operations.
- Ideal for sending automated notifications and responses.
- Add the Gmail component to the flow.
- In the Composio API Key field, enter your Composio API key or use the COMPOSIO_API_KEY global variable.
- If the key is valid, the Alert is replaced by a Success indicator, and the Actions list populates with actions available to your API key.
- In the component’s header menu, enable Tool Mode.
- In the Actions list, configure the Gmail actions that you want to provide to the agent. You can select the actions you want to allow, and you can edit each action’s slug (agentic label) and description, which help the agent decide which tools to use.
- Connect the Gmail component’s Toolset output to the Agent Core component’s Tools input.
- In the Agent Core component, enter your OpenAI API key or configure the Agent component to use a different LLM.
- Connect Chat Input component to the Agent Core component’s Input port.
- Connect the Agent Core component’s Output port to the Chat Output component, which returns the final response to the user or application.
Connections with other components:
- Chat Output
- Batch Run
- DataFrame Operations
- Parser
- Save File
- Split Text
- Type Convert
- Loop
- Notify
- ChromaDB
In tool mode:
- Agent Core
- Human-in-the-loop
Configurable settings:
- Composio API Key
- Action
Default settings:
- Composio API Key
- Action
Control Section:
- Composio API Key
- Action
- Auth Mode
- Entity ID
- Actions in tool mode
Default values:
- Entity ID = default
- Actions = GMAIL_ADD_LABEL_TO_EMAIL,
GMAIL_CREATE_EMAIL_DRAFT,
GMAIL_CREATE_LABEL,
GMAIL_DELETE_DRAFT,
GMAIL_DELETE_MESSAGE
Desired Behaviour:
- Use Composio to securely authenticate without exposing credentials.
- Only access Gmail scopes explicitly granted by the user.
- Execute exactly the requested action (read, search, send, etc.).
- Show permission or auth errors clearly.
