Personalized Gmail replies from Mem0 memory of every sender

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.

Agentic Task
GmailMem0SlackPersonal ProductivitySalesEmail AutomationNotifications & Alerts
PromptCreate

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.

Additional information

What does this prompt do?
  • Every 15 minutes, sweeps your Gmail for real inbound emails from people, skipping newsletters, no-reply addresses, and cold outbound.
  • For each sender, pulls back everything Mem0 already knows about them: past commitments, preferences, deal context, project history, personal details.
  • Stages a warm, personalized draft reply in Gmail that references that context, so you just review and hit send.
  • Extracts fresh facts from the incoming email (new job title, timeline promises, project names) and writes them back to Mem0 so recall gets stronger every pass.
  • Posts a compact Slack recap listing who emailed, which drafts are staged, and any high-signal new facts saved to memory.
What do I need to use this?
  • A Gmail inbox you can connect
  • A Mem0 account to store per-contact memory
  • A Slack workspace and the channel where you want the recap posted
How can I customize it?
  • Change how often it runs (default every 15 minutes) or narrow it to your working hours.
  • Pick the Slack channel where the recap lands, or switch it to a DM to yourself.
  • Tune which senders count as real conversations, like a VIP domain list or a keep-out list for known cold outbound.

Frequently asked questions

Will this send replies for me automatically?
No. Every reply is staged as a draft in Gmail, so you always get final say before anything goes out. The Slack recap points out that the drafts are agent-written and waiting for review.
What about newsletters, no-reply addresses, and cold pitches?
Those are filtered out. The agent only drafts for real inbound conversations from people you actually correspond with, and it skips bulk senders, no-reply addresses, and obvious cold outreach.
Does it work if I have no memories saved yet?
Yes. On the first pass it drafts from the email alone. Every run adds new facts back to Mem0, so within a few days the recall gets noticeably richer for the people you email most.
Where is the memory stored and can I edit it?
Everything lives in your Mem0 account, keyed to the sender's email address. You can browse, edit, or delete anything Mem0 has stored at any time.
Can I control what gets saved to memory?
Yes. Every new memory is tagged with a category so you can prune whole groups later, and the agent is told to skip secrets, credentials, and sensitive personal information.

Stop writing every reply from scratch.

Connect Gmail, Mem0, and Slack once, and Geni drafts personalized replies from your relationship history every 15 minutes.