Filter Gmails Example banner
ComposioHQ ComposioHQ

Filter Gmails Example

AI community

Description

AI-powered Gmail inbox organizer that automatically labels your emails based on custom prompts.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Gmail Reaper - Composio SDK Example

AI-powered Gmail automation using [Composio SDK](https://composio.dev). Automatically label emails based on custom prompts.

Tech Stack

  • Frontend: Next.js 15, React 19, TypeScript, Tailwind CSS
  • Backend: Python/FastAPI, OpenAI Agents SDK
  • Database: Supabase (PostgreSQL with RLS)
  • AI Integration: Composio SDK for Gmail tools

What You'll Learn

  • Authenticate and use Gmail tools via Composio SDK
  • Implement OAuth flows with connection tracking
  • Build AI agents that interact with authenticated APIs
  • Set up real-time triggers for email processing

Prerequisites

  1. **System Requirements**

    • Python 3.13+ with uv package manager
    • Node.js 18+ with pnpm
    • ngrok for local webhook testing
  2. **API Keys & Accounts**

Environment Variables

Backend (.env)

COMPOSIO_API_KEY=          # From app.composio.dev/developers
SUPABASE_URL=              # Your Supabase project URL
SUPABASE_SERVICE_KEY=      # Service role key (not anon key!)
GMAIL_AUTH_CONFIG_ID=      # From Composio Gmail integration
ANTHROPIC_API_KEY=         # Your LLM provider key

Frontend (.env.local)

NEXT_PUBLIC_API_URL=http://localhost:8000
NEXT_PUBLIC_SUPABASE_URL=  # Same as backend SUPABASE_URL
NEXT_PUBLIC_SUPABASE_ANON_KEY=  # Anon key (not service key!)
NEXT_PUBLIC_ENABLE_CONNECTION_MODAL=true

Quick Start

1. Clone & Setup Database

git clone https://github.com/composiohq/demos
cd demos/gmail-labeller

Set up your Supabase database by following the instructions in [apps/SUPABASE_SETUP.md](apps/SUPABASE_SETUP.md)

2. Get Your API Keys

  1. Composio API Key
    • Go