Blog · June 3, 2026 · 4 min read
How to Give an AI Agent Access to Your Gmail (Hermes)
Connect Gmail to a Hermes agent through Composio: one API key on your server, one authentication, and the agent can read, summarize and send email.
Watch the video: Give Your AI Agent Access to Gmail | Hermes Agent Setup
You give a Hermes agent access to Gmail by connecting it through Composio: create a Composio API key, store it on the server that runs your agent, authenticate your Gmail account in Composio, and ask the agent to confirm it can see the inbox. It is a one-time setup. After that you can ask the agent to review your email, summarize your priorities, send replies to customers, and do it on a schedule.
The clicks are all in the video if you want to watch the full walkthrough. Here is the process.
How the pieces fit together
Three parts:
- A virtual private server runs Hermes 24/7 and stores your API keys. Mine is on Hostinger. Hermes is the orchestrator that runs the whole process.
- Composio connects Hermes to email apps. It is not limited to Gmail: AgentMail, which is popular with AI agents, Zoho Mail, Outlook and others are all there. You authenticate each account you want the agent to reach.
- Telegram (or another chat) is where you talk to the agent once it is connected.
Step 1: create a Composio API key
- Go to composio.dev, click Get started, and sign in with Google or GitHub.
- Click your name at the bottom of the dashboard and open API key.
- Create a key, name it anything, and copy it.
Step 2: store the key on your server
- In Hostinger, go to VPS, then Manage, and open the Docker manager. If you have never installed Hermes on Hostinger, I have a separate video for that.
- Open Manage on your Hermes instance and scroll to Environment.
- Add a variable for the Composio API key and paste the key as its value.
- Click Deploy at the top.
The server now holds the key, and your Hermes instance can use every tool Composio offers.
Step 3: connect Gmail in Composio
- Back in the Composio dashboard, open Toolkits. This lists every app it connects to. Search "email" to see the email options, or pick Gmail directly.
- Click Gmail, then Add to project. Name the configuration, for example "Hermes Gmail", and click Next.
- Leave authentication managed by Composio and click Create authentication.
- Click the arrow, then Connect account. Leave the user ID as it is and click Connect.
- Choose the Google account, approve the permissions, and continue until it says successfully connected.
Start with a test inbox
When Composio asks what to give access to, you are deciding what your agent can read, send and delete. Do not start with your personal inbox. Create a test Gmail account, give the agent full access to that, and see what it can and cannot do. Once you trust the behavior, connect the real account. I used a test account with full access for the demo.
Step 4: confirm in Telegram
Open your Hermes chat and ask: "Do you have access to Composio and my Gmail?"
Mine replied that yes, through Composio it had access to my Gmail connection, and it named the address. That is the whole setup.
What to ask the agent once Gmail is connected
- "Review my email today and give me a summary of my priorities."
- "Send an email to this customer confirming their appointment."
- "Review my inbox every three days and flag anything from a client." Once the connection exists you can set scheduled jobs: daily review, replies, cleanup.
Be careful at the start with anything that sends or deletes. Review the agent's drafts for a while before letting it act on its own. After that the process is routine.
Add AgentCall on top and you can phone your agent and talk through what is in your inbox, because AgentCall gives the agent memory of the call too. The voice agent setup is the previous video in this series.
What this means for your business
- Inbox triage. The agent reads everything overnight and gives you the three things that need a human, first thing in the morning. That is one of the six use cases I document.
- Customer replies. Appointment confirmations, quotes sent, follow-ups on quiet leads, drafted in your voice for your approval.
- Scheduled cleanup. Newsletters archived, receipts labeled, spam gone, on a cron job.
- The foundation for bigger automations. The invoice follow-up agent sends its payment reminders through this same Gmail connection.
If you would like an agent connected to your business inbox and set up with sensible limits, get in touch.
FAQ
How do I connect Gmail to Hermes Agent?
Create a Composio API key, add it to your Hermes server's environment variables and deploy, then authenticate your Gmail account under Composio's Gmail toolkit. Ask the agent in Telegram to confirm access.
Can Hermes connect to Outlook or other email providers?
Yes. Composio lists Outlook, Zoho Mail, AgentMail and others. The steps are the same as for Gmail.
Is it safe to give an AI agent access to my email?
Start with a test account and full access there, watch what the agent does, and only then connect a real inbox. Review drafts before allowing the agent to send or delete on its own.
Can the agent check my email automatically?
Yes. Once connected, you can schedule jobs such as reviewing the inbox daily or every three days and reporting back or responding.
Do I need a server to do this?
The agent has to be running somewhere to hold the API key and work on a schedule. A cheap VPS such as Hostinger is the usual choice.