Scans Gong calls for competitor mentions, matches each one to its Notion battlecard, and DMs every affected rep a single Slack digest per cycle. Every call runs as the PMM who owns the briefing, never a shared bot.
This repo keys every connected account on per-connector GONG_USER, NOTION_USER, and SLACK_USER identities, defaulting to one PMM's email. In production, pass each user's real ID as the identifier on every Scalekit call, and send them an authorization link whenever their connector status is not ACTIVE.
def check_auth(self) -> bool:
resp = self.actions.get_or_create_connected_account(
connection_name=self.connector_name,
identifier=self.identifier,
)
status = resp.connected_account.status
if status != "ACTIVE":
logger.warning(f"{self.connector_name} ({self.identifier}) -- {status}")
link = self.actions.get_authorization_link(
connection_name=self.connector_name,
identifier=self.identifier,
).link
logger.warning(f"Authorize here: {link}")
return False
logger.info(f"[OK] {self.connector_name} ({self.identifier}) -- ACTIVE")
return TrueFour things you'd otherwise build: Gong key storage, Notion OAuth, Slack tokens, refresh. Handled.
Clone github.com/scalekit-developers/workflow-agents-demos/tree/main/competitive-intelligence-briefing-agent and adapt it for my competitive intel stack.
I am building for: my product marketing team (or: a sales enablement product) <- edit this line
Connectors my users need: Gong, Notion MCP, Slack MCP <- edit this line
Trigger: cron each weekday morning, or POLLING_MODE=true for continuous runs. Deliver: one Slack digest DM per affected rep, per cycle.
Steps:
1. Create Scalekit AgentKit connections for gong, notionmcp, and slackmcp. Gong uses Basic Auth with an access key/secret from Gong admin settings; copy each exact connection name into GONG_CONNECTOR, NOTION_CONNECTOR, SLACK_CONNECTOR.
2. Set GONG_USER, NOTION_USER, and SLACK_USER to the PMM's real identity (not a shared marketing bot); they can differ per service if a different account authorizes each connector.
3. Set COMPETITOR_NAMES, LOOKBACK_DAYS, and NOTION_BATTLECARDS_PARENT_PAGE_ID to my battlecards parent page. Configure a Gong tracker per competitor; the transcript text-scan is only a fallback.
4. If I swap a connector, mirror connectors.py: execute_tool(tool_name, identifier, connection_name, tool_input), then unwrap the MCP envelope for MCP-variant connectors.
5. Keep the idempotency ledger: state.py keys every sent mention by (rep, call, competitor) so overlapping runs never re-DM a rep.
6. Run python run_flow.py once with a test competitor, then describe how to schedule it for the whole team.
Each one runs on delegated identity, scoped per user.