Polls Slack for new messages, classifies bugs and support requests with a LangGraph router, files GitHub issues or Zendesk tickets, and confirms in the thread.
This repo maps Slack user IDs to Scalekit identifiers in user_mapping.json, so every issue and ticket is created as the person who reported it. In production, feed that mapping from your own user system, and send a magic link whenever someone's connector status is not ACTIVE.
response = self.client.actions.list_connected_accounts(
identifier=user_identifier,
)
for connection in response.connected_accounts:
if connection.provider.upper() == service.upper():
if connection.status.upper() == "ACTIVE":
return connection
# Not authorized yet? Send the user a magic link
link = self.client.actions.connected_accounts \
.get_magic_link_for_connected_account(
connector=connector_name,
identifier=user_identifier,
).linkThree things you'd otherwise build: OAuth, token storage, refresh. Handled.
Clone github.com/scalekit-developers/workflow-agents-demos/tree/main/slack-triage-agent and adapt it for my engineering stack.
I am building for: my engineering org (or: a dev-tools product) ← edit this line
Connectors my users need: Slack, GitHub, Zendesk (optional) ← edit this line
Trigger: continuous polling (30s default). Deliver: GitHub issues or Zendesk tickets from triaged Slack messages, with an in-thread confirmation.
Steps:
1. Create Scalekit AgentKit connections for slack and github (plus zendesk if support routing is needed) -- copy the exact connection names from the dashboard into SCALEKIT_SLACK_CONNECTION / SCALEKIT_GITHUB_CONNECTION / SCALEKIT_ZENDESK_CONNECTION.
2. Map each Slack user ID to their Scalekit identifier in user_mapping.json (not a shared bot) -- in production, feed this from our user system.
3. If I swap a destination, mirror actions.py: execute_action_with_retry(identifier, tool, connection_name, parameters) → read result data; retries and backoff come free.
4. Keep the LangGraph router in routing.py (analyze → execute → confirm); tune GITHUB_KEYWORDS / ZENDESK_KEYWORDS in settings.py, or set OPENAI_API_KEY for LLM-based routing.
5. Point ALLOWED_CHANNELS at the channels to monitor and GITHUB_REPO_OWNER/GITHUB_REPO_NAME at the target repo.
6. Run python main_polling.py, post "bug: ..." in the channel to test, then describe how to deploy for the whole team.
Each one runs on delegated identity, scoped per user.