Save Slack messages to Mem with an emoji reaction

By General Input

React to any Slack message with 🧠 and the full thread lands in Mem as a clean, organized note your team can find later.

Integrations

  • Mem
  • Slack

Type

Agentic Task

Categories

  • Personal Productivity
  • Operations

Build me an agent workflow that turns a Slack emoji reaction into a clean Mem note so my team can capture insights, decisions, and useful threads into our second brain without leaving Slack.

Trigger: a Slack webhook on the reaction_added event, filtered to a configurable save emoji. Default the emoji to 🧠 (brain) but expose it as a workflow parameter so I can change it to :bookmark:, :pushpin:, a custom workspace emoji, or anything else without editing code.

When the trigger fires, give the agent the channel ID, the message timestamp, and the reactor's user ID, then have it run roughly this work:

1. Call Slack's Get Permalink for the reacted message so the note keeps a link back to the source.

2. Call Mem's Search Notes with that permalink as the query. If a note already references this exact Slack message, stop and exit cleanly. Do not write duplicates.

3. Call Slack's Get Thread Replies for the reacted message to pull the parent message plus the surrounding thread, so the saved note has full context, not a single line out of conversation.

4. Reason over the message and thread to draft a clean markdown note. The first line should be a heading with a short, topical title pulled from the content (Mem uses the first line as the note title). Then include a one-paragraph summary of what's worth remembering, an Original Message section that quotes the exact text that was reacted to, a Thread Context section with the relevant replies, and a Source section with the author's name, the channel name, and the Slack permalink.

5. Call Mem's List Collections, read the existing collections, and pick the best fit by topic. If nothing fits well, call Create Collection to make a new one with a sensible name and description. Prefer reusing existing collections over creating new ones.

6. Call Mem's Mem It (Save Content) with the drafted markdown to create the note. Then call Add Note to Collection to link the new note to the collection chosen in step 5.

Anchor service is Mem. The only other integration is Slack. Use the Slack user OAuth integration so the agent can read thread history and permalinks on behalf of the connecting user.

Edge cases to handle: if the reacted message is a top-level message (not in a thread), Get Thread Replies just returns the message itself, which is fine. If the channel is private and the connecting user is not a member, log a clear error and skip. If Search Notes returns multiple ambiguous hits, only treat it as a duplicate when a hit actually contains the exact permalink string. Use the configurable emoji parameter throughout, do not hardcode 🧠 anywhere except as the default value.

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 leadsWin 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 teamsCatch feature flags that never got switched on in productionKajabi customer support console for member access fixes