Append flagged channel messages to competitor intelligence doc
When a message about a competitor is posted in your Slack channel, it's added to your competitor intelligence doc with the time, author and a link back, so nothing gets lost.
Install it
Set up this Zap for me, read how here: https://zapier.sh/zapier/awesome-zaps/append-flagged-channel-messages-to-competitor-intelligence-doc/
Paste into Claude, ChatGPT, Cursor or any agent.
- Category
- Executives · Strategy planning
- Author
- Zapier
- Source
- zapier/awesome-zaps, folder zaps/append-flagged-channel-messages-to-competitor-intelligence-doc
Set it up with the CLI
- Add it. Copies the folder into
zaps/append-flagged-channel-messages-to-competitor-intelligence-doc/. Outside a project, it makes one first.npx zap-pack add awesome-zaps/append-flagged-channel-messages-to-competitor-intelligence-doc - Fill in the values in
config.ts, and in any other file the list marks. Replace each one as its comment and SKILL.md say. - Deploy it. Asks for any value still left, signs you in to Zapier if you aren't, then publishes it to your account.
npx zap-pack deploy append-flagged-channel-messages-to-competitor-intelligence-doc - Check it. Its recent runs, with status and errors.
npx zap-pack logs append-flagged-channel-messages-to-competitor-intelligence-doc
zaps/append-flagged-channel-messages-to-competitor-intelligence-doc/
- README.mdWhat it does, for people
- SKILL.mdHow an agent sets it up: what to ask you, and how to test it
- config.tsIts settings 2 to fill in
- connections/google-docs.tsThe
google-docsaccount it uses - connections/slack.tsThe
slackaccount it uses - triggers/channel-message.tsWhat starts it:
slackchannel_message1 to fill in - workflow.tsThe code; each
ctx.stepis a step in the Zap
Agents: add --yes to any command so it never prompts. When it needs an answer only the user can give, it stops and names the flag that supplies it.
SKILL.md
View MarkdownWhat it does
- Trigger: a new message is posted to the watched Slack channel (
slack,channel_message). - Filter: the message text must contain one of the flag keywords (
competitor,competitive,pricing,launch). Other messages stop the run. - Google Docs finds the intelligence document by title, and creates it if it doesn't exist.
- Duplicate check: the document's text is read; if the message's timestamp and text are both already there, the run stops.
- Google Docs appends one entry: the message time, author, Slack timestamp and permalink on a header line, then the message text.
The Zap only appends. It never edits or deletes what is already in the document.
Ask the user
Each REPLACE_… value is set per person. Resolve channel names to IDs with the user's Slack connection; don't ask them to paste an ID you can look up.
| Setting | Where | What goes there |
|---|---|---|
REPLACE_WATCHED_CHANNEL |
triggers/channel-message.ts, channel; and config.ts, WATCHED_CHANNEL |
The Slack channel whose messages get captured |
REPLACE_SLACK_WORKSPACE_URL |
config.ts, SLACK_WORKSPACE_URL |
The workspace address, https://<name>.slack.com |
The two REPLACE_WATCHED_CHANNEL values must be the same channel, which is why they share a name.
Also review the defaults with them: INTEL_DOC_TITLE in config.ts (the document title to look for; a new document with that title is created if none exists) and FLAG_KEYWORDS in workflow.ts (the words that flag a message; the default is competitor, competitive, pricing, launch).
Build it
If you can run shell commands, set it up with zap-pack: run npx zap-pack add awesome-zaps/append-flagged-channel-messages-to-competitor-intelligence-doc, replace each REPLACE_… value as this file says, then run npx zap-pack deploy append-flagged-channel-messages-to-competitor-intelligence-doc, which signs the user in to Zapier when it gets there. Otherwise build with Zapier MCP, as the steps below say. No Zapier MCP tools? Read https://docs.zapier.com/mcp/get-started/quickstart.md and follow the page for the app you are running in to get the user connected, then continue with this build.
- Accounts: bind
google-docsto the Google account that owns the intelligence document, andslackto the user's Slack connection for the workspace with the watched channel. The trigger usesslack. Apps that need no connection: none. - Source: publish
workflow.tsandconfig.ts, with eachREPLACE_…replaced by the user's answer.triggers/channel-message.tsandconnections/are settings, not code: set the workflow's trigger and connection bindings from them, and set the trigger'sparams(channel,raw,listen_for_bots) from the trigger file. The trigger file names the app by its slug; for the trigger'sselected_api, callsearch_triggerswith that slug, find the row whosekeyis the trigger'sevent, and use<app_key>@<app_version>from it. - Build guide: load Zapier's build guide with
get_zapier_skill("zapier:build-workflows")and follow it to create, test and publish the workflow. - Fields: inspect each action's fields with the user's connections (and sample the trigger) before the first test run, and fix any key in
workflow.tsthat doesn't match.
Test it
Run it once as a draft test (run_workflow_draft), with the watched channel set to one the user controls, before publishing:
{
"text": "[install-test] competitor launched a new pricing tier for SMB teams",
"ts": "1793317958.713389",
"channel": "C0123456789",
"username": "install-test"
}
Check that:
- The run finishes, and the document gains one entry: a header line with the time, author,
tsand permalink, then the message text. - Running the same input again skips it with
reason: duplicate, and the document does not gain a second entry. - A message without a flag keyword is skipped with
reason: not-flagged.
If run-status tools aren't available, check the result in Google Docs directly. The user deletes the test entries, not the agent. Then publish, confirm the trigger is active, and tell the user where it is.
Notes
- The duplicate check is a text match on the message's
tsand text, not a stored record. Editing a logged entry by hand can cause it to be captured again. - The message text is appended as-is, and the append action also accepts HTML, so messages with angle brackets may render differently in the doc.
- Google Docs times are in UTC.
- Anyone who can post in the watched channel can add entries to the document.
- To capture different words, change
FLAG_KEYWORDS. To create a project task for high-priority mentions, add a step after the append that creates it in the user's project tool. - Keep real channel IDs, document IDs and workspace URLs out of commits.