Open-source Python template. Creates or detects the hire in Deel, provisions their Workspace account, builds the Notion onboarding page, posts the welcome.
Two modes: create builds the Deel employee record from your config, scan only provisions hires your HR team already created. Deel cannot delete an employee record once created, so run with NEW_HIRE_DRY_RUN=true first.
CONNECTORS = {"deel": cfg.deel_connector, # e.g. deelmcp-zTWsHKTh
"notion": cfg.notion_connector, # e.g. notionmcp-chAb8Lfz
"slack": cfg.slack_connector,
"workspace": cfg.googledwd_connector}
for name, connection in CONNECTORS.items():
account = client.connect.get_or_create_connected_account(
connection_name=connection, identifier=cfg.identity[name])
logger.info("%s: %s", name, account.status)Four things you'd otherwise build: Deel OAuth, Workspace domain-wide delegation, Notion integration tokens, Slack scopes. Handled.
Clone github.com/scalekit-developers/workflow-agents-demos/tree/main/new-hire-provisioning-agent and adapt it for my onboarding stack.
I am building for: my people ops team (or: an HR tech product) <- edit this line
Connectors my users need: Deel, Google Workspace, Notion, Slack <- edit this line
Trigger: one run per hire, or polling against Deel's onboarding tracker. Deliver: an employee record, a Workspace account, a Notion onboarding page, and a Slack welcome.
Steps:
1. Create Scalekit AgentKit connections for deel, notion, an MCP-variant slack, and Google Workspace via the GOOGLEDWD connector. Copy each exact connection name into DEEL_CONNECTOR / NOTION_CONNECTOR / SLACK_CONNECTOR / GOOGLEDWD_CONNECTOR -- they are workspace-suffixed, not generic labels.
2. Share the Notion onboarding hub page with the integration (page menu > Connections), and invite the Slack bot into the welcome channel.
3. For Google Workspace, authorize all four DWD scopes together (openid, userinfo.email, userinfo.profile, admin.directory.user) and set GOOGLE_WORKSPACE_USER to a genuine Super Admin -- a non-admin subject 403s even when the connection looks healthy.
4. Run NEW_HIRE_DRY_RUN=true first. Deel cannot delete an employee record once created, so never skip this on a real org.
5. Use NEW_HIRE_MODE=scan if my HR team already creates hires in Deel; in that mode the agent must never write an employee record.
6. Keep the per-hire step ledger in state.py so reruns finish only what is missing, then describe how to run it continuously with POLLING_MODE=true.
Each one runs on delegated identity, scoped per user.