Pulls opportunity context from Salesforce, captures key decisions from Slack, and syncs a running summary to the deal room doc in Google Drive -- only when the deal actually changed.
This repo uses an AE_EMAIL env var (with per-connector *_USER identities) to simulate one Account Executive. In production, pass each AE's real ID as the identifier on every Scalekit call, and send them an authorization link whenever their connector status is not ACTIVE.
logger.info("Step 0: Checking connector auth")
for connector_name, identifier in cfg.get_connector_users().items():
conn = Connector(actions, connector_name, identifier)
conn.check_auth()
# connectors.py -- check_auth()
resp = self.actions.get_or_create_connected_account(
connection_name=self.connector_name,
identifier=self.identifier,
)
if resp.connected_account.status != "ACTIVE":
link = self.actions.get_authorization_link(
connection_name=self.connector_name,
identifier=self.identifier,
).link
logger.warning(f"Authorize here: {link}")Three things you'd otherwise build: OAuth, token storage, refresh. Handled.
Clone github.com/scalekit-developers/workflow-agents-demos/tree/main/deal-room-sync-agent and adapt it for my sales stack.
I am building for: my sales org (or: a revenue product) ← edit this line
Connectors my users need: Salesforce, Slack MCP, Google Drive ← edit this line
Trigger: daily cron or POLLING_MODE=true. Deliver: a running summary comment on each opportunity's Google Drive deal room doc.
Steps:
1. Create Scalekit AgentKit connections for salesforce, slackmcp, googledrive -- copy the exact (auto-suffixed) connection names from the dashboard into .env.
2. Map identifier to each AE's real user ID (not a shared sales bot). Per-connector *_USER overrides exist if identities differ per service.
3. If I swap a connector, mirror an existing class in connectors.py: execute_tool(tool_name, identifier, connection_name, tool_input) → read result.data (MCP envelopes unwrap automatically).
4. Keep the fingerprint gate in state.py: only write a new Drive comment when stage, amount, close date, next step, or the Slack excerpts actually changed.
5. Target the opportunity with OPPORTUNITY_ID (exact) or OPPORTUNITY_NAME (substring match), and the doc with DEAL_ROOM_DOC_ID or find-or-create via DEAL_ROOM_DOC_NAME.
6. Run python run_flow.py for one opportunity, then describe how to deploy for many AEs.
Each one runs on delegated identity, scoped per user.