Personalized Gmail replies from Mem0 memory of every sender

By General Input

Every 15 minutes, an agent sweeps Gmail for real inbound emails, pulls what you know about the sender from Mem0, and stages a personalized draft reply.

Integrations

  • Gmail
  • Mem0
  • Slack

Type

Agentic Task

Categories

  • Personal Productivity
  • Sales

Build an agent workflow that runs every 15 minutes on a cron trigger and turns my Gmail inbox into a memory-powered triage assistant. For each new inbound email from a real person, it should pull what Mem0 already knows about the sender, draft a personalized reply that references that context, and store any fresh durable facts back to Mem0 for next time. Finish each pass with a Slack recap.

Trigger: cron, every 15 minutes.

Each run, the agent should:

1. Use Gmail List Messages to find messages received since the last run (unread, in Inbox, not in Promotions or Updates). Then use Gmail Get a Message to load full headers and body for each candidate. Filter out newsletters, no-reply addresses, mailing lists, marketing broadcasts, and obvious cold outbound (no prior thread, no prior memory, generic salutation).

2. For every qualifying message, take the sender's email address and call Mem0 Search Memories with that address as the entity filter. Pull back everything memory already knows about the person: past commitments, preferences, deal context, project history, personal details, prior threads.

3. Combine the memory results with the email body to write a warm, personalized reply that references specific prior context (call back to a past project, a promise made, a personal detail). Save it via Gmail Create a Draft on the same thread so the human still reviews and sends. Include a small footer on the draft marking it as agent-written.

4. In the same pass, extract durable new facts from the incoming email: new job title, new company, new project name, timeline promises, personal details worth remembering. Store them with Mem0 Add Memories scoped to the sender's email. Tag every new memory with a category like email_context so it's easy to prune later. Never store secrets, credentials, one-time codes, or sensitive personal information.

5. Once every sender in the batch has been processed, post a compact Slack summary via Slack Send a Message to my chosen channel. The message should list who emailed, which drafts were staged (with links or thread subjects), and any high-signal new facts written to memory. Clearly label the drafts as agent-written and waiting for review.

Guardrails: never draft for cold outbound senders or unknown addresses with no prior context. Skip bulk, no-reply, and marketing broadcasts. Never send a reply automatically, only stage drafts. Never store secrets or sensitive personal data in Mem0. Every new memory gets a category tag so it can be pruned. The Slack recap must clearly mark drafts as agent-written.

Inputs to expose in the workflow config: the Slack channel for the recap, the cadence (default 15 minutes), an optional VIP domain allowlist, and an optional keep-out list for senders that should always be skipped.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentWin back LiveChat visitors whose chats went unansweredChat quality review board for LiveChat support leadsChase the paperwork every new client and vendor still owesFile Gmail attachments into storage with names you can findWin back no-show and cancelled appointments every morningLive Loop returns analytics with product-level drill-downNewsletter pre-flight and approval board for Mailjet sendsTurn a prospect spreadsheet into personalized sequence enrollmentsMailjet email delivery lookup console for support teams