Skip to content

Commit 9cb648a

Browse files
docs(microsoft365): add Microsoft 365 connector documentation (#750)
* feat(connector-docs): add local-mode sync script + generator subagent Introduces scripts/sync-agent-connectors-local.js, a local-file variant of sync-agent-connectors.js for generating a single connector's docs from a local tool-agent checkout. Reuses the existing pure generators via newly exported helpers from the API-mode script (the auto-run main() is now gated so importing the module has no side effects). Also adds the connector-docs-generator subagent definition in .claude/agents/, plus a .gitignore exception so shared agent definitions travel with the repo. * docs(microsoft365): add Microsoft 365 connector documentation * chore: move connector-docs-generator agent to tool-agent repo The subagent definition belongs with the source of the work (the tool-agent repo where connectors are added), not with the consumer (this docs repo). Reverts the .gitignore re-include for .claude/agents/ since this repo no longer ships a tracked agent definition. The local-mode sync script (scripts/sync-agent-connectors-local.js) stays here — the subagent (now in tool-agent) invokes it across the repo boundary.
1 parent 26447cc commit 9cb648a

8 files changed

Lines changed: 2015 additions & 4 deletions

File tree

scripts/sync-agent-connectors-local.js

Lines changed: 480 additions & 0 deletions
Large diffs are not rendered by default.

scripts/sync-agent-connectors.js

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1515,7 +1515,32 @@ async function main() {
15151515
console.log('🎉 Done!')
15161516
}
15171517

1518-
main().catch((err) => {
1519-
console.error('❌ Error:', err.message)
1520-
process.exit(1)
1521-
})
1518+
// Only run main() when invoked directly (e.g. `node scripts/sync-agent-connectors.js`).
1519+
// Skips execution when this module is imported by sync-agent-connectors-local.js,
1520+
// which reuses the pure helpers exported below.
1521+
const invokedDirectly =
1522+
process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)
1523+
if (invokedDirectly) {
1524+
main().catch((err) => {
1525+
console.error('❌ Error:', err.message)
1526+
process.exit(1)
1527+
})
1528+
}
1529+
1530+
// Public exports — consumed by scripts/sync-agent-connectors-local.js to reuse
1531+
// the same MDX / .ts / catalog generators without changing this script's
1532+
// runtime behaviour.
1533+
export {
1534+
generateMdxContent,
1535+
generateTsDataFile,
1536+
generateCatalogFile,
1537+
toSafeIdentifier,
1538+
resolveAuthType,
1539+
normalizeConnectorCategories,
1540+
syncTemplateIndex,
1541+
SETUP_STEM_MAP,
1542+
USAGE_STEM_MAP,
1543+
QUICKSTART_STEM_MAP,
1544+
SECTION_ENTRIES,
1545+
CONNECTED_ACCOUNT_STEM_MAP,
1546+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{/* TODO: stub cloned from _section-after-setup-outlook-common-workflows.mdx for Microsoft 365. Review and update connector-specific references (URLs, scopes, app-registration steps) before merging. */}
2+
export const sectionTitle = 'Common workflows'
3+
4+
import { Tabs, TabItem } from '@astrojs/starlight/components'
5+
6+
<details>
7+
<summary>Proxy API call</summary>
8+
9+
<Tabs syncKey="tech-stack">
10+
<TabItem label="Node.js">
11+
```typescript
12+
const result = await actions.request({
13+
connectionName: 'microsoft365',
14+
identifier: 'user_123',
15+
path: '/v1.0/me/messages',
16+
method: 'GET',
17+
});
18+
console.log(result);
19+
```
20+
</TabItem>
21+
<TabItem label="Python">
22+
```python
23+
result = actions.request(
24+
connection_name='microsoft365',
25+
identifier='user_123',
26+
path="/v1.0/me/messages",
27+
method="GET"
28+
)
29+
print(result)
30+
```
31+
</TabItem>
32+
</Tabs>
33+
34+
</details>
35+
36+
<details>
37+
<summary>Execute a tool</summary>
38+
39+
<Tabs syncKey="tech-stack">
40+
<TabItem label="Node.js">
41+
```typescript
42+
const result = await actions.executeTool({
43+
connector: 'microsoft365',
44+
identifier: 'user_123',
45+
toolName: 'microsoft365_create_calendar_event',
46+
toolInput: {},
47+
});
48+
console.log(result);
49+
```
50+
</TabItem>
51+
<TabItem label="Python">
52+
```python
53+
result = actions.execute_tool(
54+
connection_name='microsoft365',
55+
identifier='user_123',
56+
tool_name='microsoft365_create_calendar_event',
57+
tool_input={},
58+
)
59+
print(result)
60+
```
61+
</TabItem>
62+
</Tabs>
63+
64+
</details>
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{/* TODO: stub cloned from _setup-outlook.mdx for Microsoft 365. Review and update connector-specific references (URLs, scopes, app-registration steps) before merging. */}
2+
import { Steps, Aside } from '@astrojs/starlight/components'
3+
4+
Register your Scalekit environment with the Microsoft 365 connector so Scalekit handles the authentication flow and token lifecycle for you. The connection name you create will be used to identify and invoke the connection programmatically. Then complete the configuration in your application as follows:
5+
6+
<Steps>
7+
1. ### Create the Microsoft 365 connection in Scalekit
8+
9+
- In [Scalekit dashboard](https://app.scalekit.com), go to **AgentKit** > **Connections** > **Create Connection**. Search for **Microsoft 365** and click **Create**.
10+
11+
{/* TODO: add screenshot — alt: "Search for Microsoft 365 and create a new connection", original src: @/assets/docs/agent-connectors/microsoft365/create-microsoft365-connection.png */}
12+
- In the **Configure Microsoft 365 Connection** dialog, copy the **Redirect URI**. You will need this when registering your app in Azure.
13+
14+
{/* TODO: add screenshot — alt: "Copy the redirect URI from the Configure Microsoft 365 Connection dialog", original src: @/assets/docs/agent-connectors/microsoft365/configure-microsoft365-connection.png */}
15+
2. ### Register an application in Azure
16+
17+
- Sign into [portal.azure.com](https://portal.azure.com) and go to **Microsoft Entra ID****App registrations**.
18+
19+
{/* TODO: add screenshot — alt: "App registrations page in Azure portal", original src: @/assets/docs/agent-connectors/microsoft365/azure-app-registrations.png */}
20+
- Click **New registration**. Enter a name for your app (for example, "Scalekit Microsoft 365 Connector").
21+
22+
- Under **Supported account types**, select **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**.
23+
24+
- Under **Redirect URI**, select **Web** and paste the redirect URI you copied from the Scalekit dashboard. Click **Register**.
25+
26+
{/* TODO: add screenshot — alt: "Paste the Scalekit redirect URI in Azure", original src: @/assets/docs/agent-connectors/microsoft365/azure-add-redirect-uri.png */}
27+
3. ### Get your client credentials
28+
29+
- From the app's **Overview** page, copy the **Application (client) ID**.
30+
31+
{/* TODO: add screenshot — alt: "Copy the Application (client) ID from the Azure app overview", original src: @/assets/docs/agent-connectors/microsoft365/azure-app-overview.png */}
32+
- Go to **Certificates & secrets** in the left sidebar, then click **+ New client secret**.
33+
34+
{/* TODO: add screenshot — alt: "Certificates and secrets page in Azure portal", original src: @/assets/docs/agent-connectors/microsoft365/azure-certificates-secrets.png */}
35+
- Enter a description (for example, "Secret for Scalekit Agent Actions"), set an expiry period, and click **Add**. Copy the secret **Value** immediately — it is only shown once.
36+
37+
{/* TODO: add screenshot — alt: "Add a client secret in Azure portal", original src: @/assets/docs/agent-connectors/microsoft365/azure-add-client-secret.png */}
38+
4. ### Add credentials in Scalekit
39+
40+
- In [Scalekit dashboard](https://app.scalekit.com), go to **AgentKit** > **Connections** and open the Microsoft 365 connection you created.
41+
42+
- Enter your credentials:
43+
- **Client ID** — the Application (client) ID from the Azure app overview
44+
- **Client Secret** — the secret value from Certificates & secrets
45+
- **Scopes** — select the permissions your app needs (for example, `Calendars.Read`, `Calendars.ReadWrite`, `Mail.Read`, `Mail.ReadWrite`, `Mail.Send`, `Contacts.Read`, `Contacts.ReadWrite`, `User.Read`, `offline_access`). See [Microsoft Graph permissions reference](https://learn.microsoft.com/en-us/graph/permissions-reference) for the full list.
46+
47+
- Click **Save**.
48+
</Steps>

src/components/templates/agent-connectors/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export { default as SetupMailchimpSection } from './_setup-mailchimp.mdx'
5959
export { default as SetupMicrosoftExcelSection } from './_setup-microsoft-excel.mdx'
6060
export { default as SetupMicrosoftTeamsSection } from './_setup-microsoft-teams.mdx'
6161
export { default as SetupMicrosoftWordSection } from './_setup-microsoft-word.mdx'
62+
export { default as SetupMicrosoft365Section } from './_setup-microsoft365.mdx'
6263
export { default as SetupMiroSection } from './_setup-miro.mdx'
6364
export { default as SetupMondaySection } from './_setup-monday.mdx'
6465
export { default as SetupNotionSection } from './_setup-notion.mdx'
@@ -149,6 +150,7 @@ export { default as SectionAfterSetupJiraCommonWorkflows } from './_section-afte
149150
export { default as SectionAfterSetupLeadiqCommonWorkflows } from './_section-after-setup-leadiq-common-workflows.mdx'
150151
export { default as SectionAfterSetupLinearCommonWorkflows } from './_section-after-setup-linear-common-workflows.mdx'
151152
export { default as SectionAfterSetupMailchimpCommonWorkflows } from './_section-after-setup-mailchimp-common-workflows.mdx'
153+
export { default as SectionAfterSetupMicrosoft365CommonWorkflows } from './_section-after-setup-microsoft365-common-workflows.mdx'
152154
export { default as SectionAfterSetupMicrosoftexcelCommonWorkflows } from './_section-after-setup-microsoftexcel-common-workflows.mdx'
153155
export { default as SectionAfterSetupMicrosoftteamsCommonWorkflows } from './_section-after-setup-microsoftteams-common-workflows.mdx'
154156
export { default as SectionAfterSetupMicrosoftwordCommonWorkflows } from './_section-after-setup-microsoftword-common-workflows.mdx'
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
---
2+
title: 'Microsoft 365 connector'
3+
tableOfContents: true
4+
description: 'Connect to Microsoft 365. Unified access to Outlook, Excel, Word, OneNote, OneDrive, SharePoint, and Teams through Microsoft Graph API.'
5+
sidebar:
6+
label: 'Microsoft 365'
7+
overviewTitle: 'Quickstart'
8+
connectorIcon: https://cdn.scalekit.com/sk-connect/assets/provider-icons/microsoft365.svg
9+
connectorAuthType: OAuth 2.0
10+
connectorCategories: [Productivity, Communication, Collaboration, Files & Documents, Calendar, Analytics]
11+
head:
12+
- tag: style
13+
content: |
14+
.sl-markdown-content h2 {
15+
font-size: var(--sl-text-xl);
16+
}
17+
.sl-markdown-content h3 {
18+
font-size: var(--sl-text-lg);
19+
}
20+
---
21+
22+
import ToolList from '@/components/ToolList.astro'
23+
import { tools } from '@/data/agent-connectors/microsoft365'
24+
import { Steps, Tabs, TabItem } from '@astrojs/starlight/components'
25+
import { AgentKitCredentials } from '@components/templates'
26+
import { SetupMicrosoft365Section } from '@components/templates'
27+
import { QuickstartGenericOauthSection } from '@components/templates'
28+
import { SectionAfterSetupMicrosoft365CommonWorkflows } from '@components/templates'
29+
30+
<Steps>
31+
32+
1. ### Install the SDK
33+
34+
<Tabs syncKey="tech-stack">
35+
<TabItem label="Node.js">
36+
```bash frame="terminal"
37+
npm install @scalekit-sdk/node
38+
```
39+
</TabItem>
40+
<TabItem label="Python">
41+
```bash frame="terminal"
42+
pip install scalekit
43+
```
44+
</TabItem>
45+
</Tabs>
46+
47+
Full SDK reference: [Node.js](/agentkit/sdks/node/) | [Python](/agentkit/sdks/python/)
48+
49+
2. ### Set your credentials
50+
51+
<AgentKitCredentials />
52+
53+
3. ### Set up the connector
54+
55+
Register your Microsoft 365 credentials with Scalekit so it handles the token lifecycle. You do this once per environment.
56+
57+
<details>
58+
<summary>Dashboard setup steps</summary>
59+
60+
<SetupMicrosoft365Section />
61+
62+
</details>
63+
64+
4. ### Authorize and make your first call
65+
66+
<QuickstartGenericOauthSection connector="microsoft365" toolName="microsoft365_outlook_mailbox_settings_get" providerName="Microsoft 365" />
67+
68+
</Steps>
69+
70+
## What you can do
71+
72+
Connect this agent connector to let your agent:
73+
74+
- **Event outlook accept, outlook decline, outlook forward** — Accept a calendar event invitation
75+
- **Create outlook** — Create a new calendar event in the user's Outlook calendar
76+
- **Delete outlook** — Delete a calendar event by ID
77+
- **Get outlook** — Download a specific attachment from an Outlook email message by attachment ID
78+
- **List outlook** — List all attachments on a specific Outlook email message
79+
- **Update outlook mailbox settings, outlook todo checklist items, outlook todo lists** — Update mailbox settings for the signed-in user
80+
81+
## Common workflows
82+
83+
<SectionAfterSetupMicrosoft365CommonWorkflows />
84+
85+
## Tool list
86+
87+
Use the exact tool names from the **Tool list** below when you call `execute_tool`. If you're not sure which name to use, list the tools available for the current user first.
88+
89+
<ToolList tools={tools} />

src/data/agent-connectors/catalog.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -837,4 +837,16 @@ export const catalog: Record<string, ProviderMeta> = {
837837
authType: 'OAuth 2.0',
838838
categories: ['Communication'],
839839
},
840+
microsoft365: {
841+
iconUrl: 'https://cdn.scalekit.com/sk-connect/assets/provider-icons/microsoft365.svg',
842+
authType: 'OAuth 2.0',
843+
categories: [
844+
'Productivity',
845+
'Communication',
846+
'Collaboration',
847+
'Files & Documents',
848+
'Calendar',
849+
'Analytics',
850+
],
851+
},
840852
}

0 commit comments

Comments
 (0)