Skip to main content

Listen to New Emails in Gmail

In this guide, weโ€™ll:
  1. ๐Ÿ” Connect your Gmail account with Composio
  2. ๐Ÿ›  Enable Triggers to listen to new emails in Gmail
  3. ๐Ÿง  Pass these triggers event payloads to an AI language model to identify bank transactions
  4. โญ Execute an action from Gmail tool to add important label to relevant emails
Tools represent a group of actions specific to an app. Actions are operations you can perform - like starring a repo on GitHub or creating an issue in Linear.
1

Install Libraries

CLI
2

Connect Your Gmail Account

Weโ€™ll use default as the user id, also known as entity id.
You need to have an active Gmail Integration. Learn how to do this here
Donโ€™t forget to set your COMPOSIO_API_KEY and OPENAI_API_KEY in your environment variables.
3

Enable Triggers

4

Create an Agent

5

Create a Trigger Listener

Next Steps

Now that youโ€™ve seen how to use triggers, you can explore the following resources:

Tools

Checkout our toolset of 250+ LLM ready tools to build powerful AI applications

Connections

Learn how to create and manage connections for your users

Compatible Agentic Frameworks

Integrate with popular agentic frameworks

Kits

Composio SWE Kit (#4 on SWE bench) - Your ultimate coding companion

Triggers

Subscribe to triggers to execute actions automatically

Other Concepts

Learn about workspace environments, using CLI & other concepts