@zapier/microsoft-outlook-connector 0.0.0 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +93 -0
- package/NOTICE +8 -0
- package/NOTICE.md +8 -0
- package/README.md +145 -2
- package/SKILL.md +159 -0
- package/cli.js +71 -0
- package/cli.ts +5 -0
- package/connections.ts +69 -0
- package/dist/cli.js +4 -0
- package/dist/index.js +1823 -0
- package/index.ts +103 -0
- package/package.json +65 -4
- package/preflight.sh +157 -0
- package/references/microsoft-outlook-api-gotchas.md +210 -0
- package/scripts/copyMessage.ts +68 -0
- package/scripts/createContact.ts +39 -0
- package/scripts/createDraft.ts +71 -0
- package/scripts/createEvent.ts +61 -0
- package/scripts/createMailFolder.ts +68 -0
- package/scripts/createReplyDraft.ts +81 -0
- package/scripts/deleteContact.ts +47 -0
- package/scripts/deleteEvent.ts +61 -0
- package/scripts/deleteMessage.ts +57 -0
- package/scripts/forwardMessage.ts +75 -0
- package/scripts/getAttachment.ts +60 -0
- package/scripts/getContact.ts +44 -0
- package/scripts/getEvent.ts +63 -0
- package/scripts/getMe.ts +42 -0
- package/scripts/getMessage.ts +68 -0
- package/scripts/listAttachments.ts +94 -0
- package/scripts/listCalendarView.ts +99 -0
- package/scripts/listCalendars.ts +85 -0
- package/scripts/listCategories.ts +49 -0
- package/scripts/listContacts.ts +81 -0
- package/scripts/listEvents.ts +94 -0
- package/scripts/listMailFolders.ts +98 -0
- package/scripts/listMessages.ts +106 -0
- package/scripts/moveMessage.ts +68 -0
- package/scripts/replyToMessage.ts +73 -0
- package/scripts/sendDraft.ts +55 -0
- package/scripts/sendMail.ts +68 -0
- package/scripts/updateContact.ts +49 -0
- package/scripts/updateEvent.ts +69 -0
- package/scripts/updateMessage.ts +99 -0
- package/tsup.config.ts +63 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Elastic License 2.0
|
|
2
|
+
|
|
3
|
+
URL: https://www.elastic.co/licensing/elastic-license
|
|
4
|
+
|
|
5
|
+
## Acceptance
|
|
6
|
+
|
|
7
|
+
By using the software, you agree to all of the terms and conditions below.
|
|
8
|
+
|
|
9
|
+
## Copyright License
|
|
10
|
+
|
|
11
|
+
The licensor grants you a non-exclusive, royalty-free, worldwide,
|
|
12
|
+
non-sublicensable, non-transferable license to use, copy, distribute, make
|
|
13
|
+
available, and prepare derivative works of the software, in each case subject to
|
|
14
|
+
the limitations and conditions below.
|
|
15
|
+
|
|
16
|
+
## Limitations
|
|
17
|
+
|
|
18
|
+
You may not provide the software to third parties as a hosted or managed
|
|
19
|
+
service, where the service provides users with access to any substantial set of
|
|
20
|
+
the features or functionality of the software.
|
|
21
|
+
|
|
22
|
+
You may not move, change, disable, or circumvent the license key functionality
|
|
23
|
+
in the software, and you may not remove or obscure any functionality in the
|
|
24
|
+
software that is protected by the license key.
|
|
25
|
+
|
|
26
|
+
You may not alter, remove, or obscure any licensing, copyright, or other notices
|
|
27
|
+
of the licensor in the software. Any use of the licensor's trademarks is subject
|
|
28
|
+
to applicable law.
|
|
29
|
+
|
|
30
|
+
## Patents
|
|
31
|
+
|
|
32
|
+
The licensor grants you a license, under any patent claims the licensor can
|
|
33
|
+
license, or becomes able to license, to make, have made, use, sell, offer for
|
|
34
|
+
sale, import and have imported the software, in each case subject to the
|
|
35
|
+
limitations and conditions in this license. This license does not cover any
|
|
36
|
+
patent claims that you cause to be infringed by modifications or additions to
|
|
37
|
+
the software. If you or your company make any written claim that the software
|
|
38
|
+
infringes or contributes to infringement of any patent, your patent license for
|
|
39
|
+
the software granted under these terms ends immediately. If your company makes
|
|
40
|
+
such a claim, your patent license ends immediately for work on behalf of your
|
|
41
|
+
company.
|
|
42
|
+
|
|
43
|
+
## Notices
|
|
44
|
+
|
|
45
|
+
You must ensure that anyone who gets a copy of any part of the software from you
|
|
46
|
+
also gets a copy of these terms.
|
|
47
|
+
|
|
48
|
+
If you modify the software, you must include in any modified copies of the
|
|
49
|
+
software prominent notices stating that you have modified the software.
|
|
50
|
+
|
|
51
|
+
## No Other Rights
|
|
52
|
+
|
|
53
|
+
These terms do not imply any licenses other than those expressly granted in
|
|
54
|
+
these terms.
|
|
55
|
+
|
|
56
|
+
## Termination
|
|
57
|
+
|
|
58
|
+
If you use the software in violation of these terms, such use is not licensed,
|
|
59
|
+
and your licenses will automatically terminate. If the licensor provides you
|
|
60
|
+
with a notice of your violation, and you cease all violation of this license no
|
|
61
|
+
later than 30 days after you receive that notice, your licenses will be
|
|
62
|
+
reinstated retroactively. However, if you violate these terms after such
|
|
63
|
+
reinstatement, any additional violation of these terms will cause your licenses
|
|
64
|
+
to terminate automatically and permanently.
|
|
65
|
+
|
|
66
|
+
## No Liability
|
|
67
|
+
|
|
68
|
+
*As far as the law allows, the software comes as is, without any warranty or
|
|
69
|
+
condition, and the licensor will not be liable to you for any damages arising
|
|
70
|
+
out of these terms or the use or nature of the software, under any kind of
|
|
71
|
+
legal claim.*
|
|
72
|
+
|
|
73
|
+
## Definitions
|
|
74
|
+
|
|
75
|
+
The **licensor** is the entity offering these terms, and the **software** is the
|
|
76
|
+
software the licensor makes available under these terms, including any portion
|
|
77
|
+
of it.
|
|
78
|
+
|
|
79
|
+
**you** refers to the individual or entity agreeing to these terms.
|
|
80
|
+
|
|
81
|
+
**your company** is any legal entity, sole proprietorship, or other kind of
|
|
82
|
+
organization that you work for, plus all organizations that have control over,
|
|
83
|
+
are under the control of, or are under common control with that
|
|
84
|
+
organization. **control** means ownership of substantially all the assets of an
|
|
85
|
+
entity, or the power to direct its management and policies by vote, contract, or
|
|
86
|
+
otherwise. Control can be direct or indirect.
|
|
87
|
+
|
|
88
|
+
**your licenses** are all the licenses granted to you for the software under
|
|
89
|
+
these terms.
|
|
90
|
+
|
|
91
|
+
**use** means anything you do with the software requiring one of your licenses.
|
|
92
|
+
|
|
93
|
+
**trademark** means trademarks, service marks, and similar rights.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Independent, unofficial connector for Microsoft Outlook.
|
|
2
|
+
|
|
3
|
+
Zapier licenses only the connector code in this package, under the Elastic
|
|
4
|
+
License 2.0. Zapier grants no rights in Microsoft Outlook's API, services, data,
|
|
5
|
+
schemas, documentation, or other materials, which remain the property of
|
|
6
|
+
Microsoft Outlook. Microsoft Outlook and its logos are trademarks of their owner, used only to
|
|
7
|
+
identify the service this connector works with. Not affiliated with, endorsed
|
|
8
|
+
by, or sponsored by Microsoft Outlook.
|
package/NOTICE.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Independent, unofficial connector for Microsoft Outlook.
|
|
2
|
+
|
|
3
|
+
Zapier licenses only the connector code in this package, under the Elastic
|
|
4
|
+
License 2.0. Zapier grants no rights in Microsoft Outlook's API, services, data,
|
|
5
|
+
schemas, documentation, or other materials, which remain the property of
|
|
6
|
+
Microsoft Outlook. Microsoft Outlook and its logos are trademarks of their owner, used only to
|
|
7
|
+
identify the service this connector works with. Not affiliated with, endorsed
|
|
8
|
+
by, or sponsored by Microsoft Outlook.
|
package/README.md
CHANGED
|
@@ -1,4 +1,147 @@
|
|
|
1
1
|
# @zapier/microsoft-outlook-connector
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
_Independent, unofficial connector for Microsoft Outlook. Not affiliated with, endorsed by, or sponsored by Microsoft Outlook. "Microsoft Outlook" is a trademark of its owner, used only to identify the service this connector works with._
|
|
4
|
+
|
|
5
|
+
Agent-callable Microsoft Outlook tools that wrap the [Microsoft Graph API](https://learn.microsoft.com/en-us/graph/api/overview) v1.0 for a single user's mailbox: read and search mail, compose/send/reply/forward, organize messages (read state, flag, importance, categories, move, copy, delete), browse mail folders and attachments, manage calendar events, and manage personal contacts — 30 tools across mail, folders, categories, calendar, and contacts. Use when the user mentions Outlook, Microsoft 365 mail/calendar/contacts, or wants to send, read, search, or organize email, schedule events, or look up contacts — even if they don't name Outlook explicitly. Every call authorizes with a single OAuth 2.0 bearer token, supplied either through Zapier-managed auth or as a direct Graph access token.
|
|
6
|
+
|
|
7
|
+
This connector is the same artifact across four shapes: MCP server, CLI bin, importable Node module, and an [Agent Skill](https://agentskills.io/) anchored by [`SKILL.md`](SKILL.md). Pick the shape that matches how your agent runs.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Run a tool with zero install — npx fetches the package on first use
|
|
13
|
+
MICROSOFT_OUTLOOK_ACCESS_TOKEN=xxx npx @zapier/microsoft-outlook-connector run <toolName> '{ ... }' --connection env:MICROSOFT_OUTLOOK_ACCESS_TOKEN
|
|
14
|
+
|
|
15
|
+
# Install as a dependency to import the tools in your own code
|
|
16
|
+
npm install @zapier/microsoft-outlook-connector
|
|
17
|
+
|
|
18
|
+
# Or install as an Agent Skill (https://agentskills.io)
|
|
19
|
+
npx skills zapier/connectors --skill microsoft-outlook
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Auth is one `[<resolver>:]<value>` connection string passed with `--connection`. The value is a _selector_, not the secret: `--connection zapier:<connection-id>` routes through Zapier-managed auth (recommended; no third-party secret enters the agent's environment — store the id in `MICROSOFT_OUTLOOK_ZAPIER_CONNECTION_ID` and pass `--connection "zapier:$MICROSOFT_OUTLOOK_ZAPIER_CONNECTION_ID"` if you like), and `--connection env:MICROSOFT_OUTLOOK_ACCESS_TOKEN` reads a direct token from `$MICROSOFT_OUTLOOK_ACCESS_TOKEN` (the token stays in `env`, never on argv). The `<resolver>:` prefix is optional — a bare value is claimed by the first matching resolver. See [`SKILL.md`](SKILL.md#auth) for tradeoffs and how to find a connection ID.
|
|
23
|
+
|
|
24
|
+
## Tools
|
|
25
|
+
|
|
26
|
+
All tools use the single connection `microsoft-outlook`. Mail and calendar tools accept an optional `mailbox` input (shared mailbox); the six event tools accept an optional `calendarId`.
|
|
27
|
+
|
|
28
|
+
**Profile**
|
|
29
|
+
|
|
30
|
+
| Tool | Description |
|
|
31
|
+
| ------- | ------------------------------------------------------------------------------- |
|
|
32
|
+
| `getMe` | Get the signed-in user's profile (name, email, UPN); doubles as the auth probe. |
|
|
33
|
+
|
|
34
|
+
**Mail — compose & send**
|
|
35
|
+
|
|
36
|
+
| Tool | Description |
|
|
37
|
+
| ------------------ | ----------------------------------------------------------- |
|
|
38
|
+
| `sendMail` | Compose and send an email in one step (returns no id). |
|
|
39
|
+
| `createDraft` | Create a draft email; returns the draft id for `sendDraft`. |
|
|
40
|
+
| `sendDraft` | Send an existing draft by id. |
|
|
41
|
+
| `replyToMessage` | Reply (or reply-all) to a message and send immediately. |
|
|
42
|
+
| `createReplyDraft` | Create a draft reply (or reply-all) to edit before sending. |
|
|
43
|
+
| `forwardMessage` | Forward a message to new recipients and send immediately. |
|
|
44
|
+
|
|
45
|
+
**Mail — organize & read**
|
|
46
|
+
|
|
47
|
+
| Tool | Description |
|
|
48
|
+
| ------------------ | ---------------------------------------------------------------------- |
|
|
49
|
+
| `updateMessage` | Update read state, flag, importance, or categories on a message. |
|
|
50
|
+
| `moveMessage` | Move a message to another folder (returns a new id). |
|
|
51
|
+
| `copyMessage` | Copy a message into another folder, leaving the original. |
|
|
52
|
+
| `deleteMessage` | Delete a message (moves it to Deleted Items; reversible). |
|
|
53
|
+
| `listMessages` | List or search messages, newest first (the id-resolution entry point). |
|
|
54
|
+
| `getMessage` | Get a single message by id, including the full body. |
|
|
55
|
+
| `listAttachments` | List the attachments on a message. |
|
|
56
|
+
| `getAttachment` | Get one attachment by id, including its base64 content. |
|
|
57
|
+
| `listMailFolders` | List mail folders (top-level or a folder's subfolders). |
|
|
58
|
+
| `createMailFolder` | Create a mail folder (top-level or a subfolder). |
|
|
59
|
+
| `listCategories` | List the mailbox's category names and colors. |
|
|
60
|
+
|
|
61
|
+
**Calendar**
|
|
62
|
+
|
|
63
|
+
| Tool | Description |
|
|
64
|
+
| ------------------ | ------------------------------------------------------- |
|
|
65
|
+
| `listCalendars` | List the user's calendars (resolves a `calendarId`). |
|
|
66
|
+
| `listEvents` | List events and recurring-series masters. |
|
|
67
|
+
| `listCalendarView` | List events in a date range, expanding recurrences. |
|
|
68
|
+
| `getEvent` | Get a single event by id (attendees, body, recurrence). |
|
|
69
|
+
| `createEvent` | Create a calendar event. |
|
|
70
|
+
| `updateEvent` | Update an event's fields or attendees. |
|
|
71
|
+
| `deleteEvent` | Delete (cancel) a calendar event. |
|
|
72
|
+
|
|
73
|
+
**Contacts**
|
|
74
|
+
|
|
75
|
+
| Tool | Description |
|
|
76
|
+
| --------------- | ------------------------------------ |
|
|
77
|
+
| `listContacts` | List or search personal contacts. |
|
|
78
|
+
| `getContact` | Get a single personal contact by id. |
|
|
79
|
+
| `createContact` | Create a personal contact. |
|
|
80
|
+
| `updateContact` | Update fields on a personal contact. |
|
|
81
|
+
| `deleteContact` | Delete a personal contact by id. |
|
|
82
|
+
|
|
83
|
+
Run `npx @zapier/microsoft-outlook-connector run <toolName> --help` to see any tool's exact input contract + the available resolvers.
|
|
84
|
+
|
|
85
|
+
## Usage
|
|
86
|
+
|
|
87
|
+
```ts
|
|
88
|
+
import { listMessages } from "@zapier/microsoft-outlook-connector";
|
|
89
|
+
|
|
90
|
+
// Each named export is the consumer-facing (input, opts) => Promise<{ data, meta }>.
|
|
91
|
+
// Pass auth as one `[<resolver>:]<value>` string.
|
|
92
|
+
const { data } = await listMessages(
|
|
93
|
+
{ search: "subject:invoice", limit: 5 },
|
|
94
|
+
{ connection: "env:MICROSOFT_OUTLOOK_ACCESS_TOKEN" },
|
|
95
|
+
);
|
|
96
|
+
// data => { items: [{ id, subject, from, receivedDateTime, ... }], next_cursor? }
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## MCP Server
|
|
100
|
+
|
|
101
|
+
Add one stanza to any MCP-aware client (Claude Desktop, Cursor, Claude Code, …) to auto-discover the tools over stdio:
|
|
102
|
+
|
|
103
|
+
<!-- prettier-ignore -->
|
|
104
|
+
```jsonc
|
|
105
|
+
// e.g. claude_desktop_config.json or .cursor/mcp.json
|
|
106
|
+
{
|
|
107
|
+
"mcpServers": {
|
|
108
|
+
"microsoft-outlook": {
|
|
109
|
+
"command": "npx",
|
|
110
|
+
"args": ["@zapier/microsoft-outlook-connector", "mcp", "--connection", "zapier:<connection-id>"],
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
No Zapier account? Use the `env:` resolver — point `--connection` at an env-var name and keep the token in `env`: `"args": ["@zapier/microsoft-outlook-connector", "mcp", "--connection", "env:MICROSOFT_OUTLOOK_ACCESS_TOKEN"]` with `"env": { "MICROSOFT_OUTLOOK_ACCESS_TOKEN": "xxx" }`.
|
|
117
|
+
|
|
118
|
+
## When to use this
|
|
119
|
+
|
|
120
|
+
- An agent needs to act on one user's Outlook mailbox: read or search mail, send/reply/forward, organize messages and folders, work with attachments, manage calendar events, or manage personal contacts.
|
|
121
|
+
- You want request/response tools (call → result), addressable by id, optionally targeting a shared mailbox or a specific calendar.
|
|
122
|
+
|
|
123
|
+
## When NOT to use this
|
|
124
|
+
|
|
125
|
+
- **Triggers / change notifications** — there is no "watch for new mail/events" or webhook subscription here; the connector is request/response only.
|
|
126
|
+
- **Large attachments (≥3 MB)** — only inline attachments under 3 MB are supported; large-file upload sessions are not.
|
|
127
|
+
- **Group/shared _calendars_, distribution lists, mailbox rules, or auto-replies** — out of scope. (Shared _mailboxes_ are supported via the `mailbox` input.)
|
|
128
|
+
|
|
129
|
+
## Links
|
|
130
|
+
|
|
131
|
+
- [`SKILL.md`](SKILL.md) — runtime guidance for agents
|
|
132
|
+
- [Microsoft Graph API reference](https://learn.microsoft.com/en-us/graph/api/overview) — the underlying vendor API
|
|
133
|
+
- [Source](https://github.com/zapier/connectors/tree/main/apps/microsoft-outlook)
|
|
134
|
+
|
|
135
|
+
## Legal
|
|
136
|
+
|
|
137
|
+
**Scope of license.** Zapier licenses only the connector code in this package. Zapier grants no rights in Microsoft Outlook's API, services, data, schemas, documentation, or other materials, which remain the property of Microsoft Outlook. Your use of Microsoft Outlook's API is governed by your own agreement with Microsoft Outlook.
|
|
138
|
+
|
|
139
|
+
**Trademarks and affiliation.** Microsoft Outlook and its logos are trademarks of their owner, used here only to identify the service this connector works with. This connector is not affiliated with, endorsed by, or sponsored by Microsoft Outlook.
|
|
140
|
+
|
|
141
|
+
**Your responsibility.** This connector calls Microsoft Outlook's API using credentials you supply. You are responsible for holding a valid Microsoft Outlook account, for complying with Microsoft Outlook's API terms, developer policies, and acceptable use rules, and for the data you send and receive through it.
|
|
142
|
+
|
|
143
|
+
**No warranty.** This connector is provided "as is," without warranty of any kind, and is not an official Microsoft Outlook product. Zapier is not responsible for changes Microsoft Outlook makes to its API or for any consequence of your use of Microsoft Outlook's API. See the repository LICENSE for the full disclaimer.
|
|
144
|
+
|
|
145
|
+
**Forks.** You may fork and modify this connector under the Elastic License 2.0. You may state that your fork is "based on" Zapier's connector, but you may not use the "Zapier" name or logo as the name or branding of your fork, or in any way that suggests Zapier produces, endorses, or supports it.
|
|
146
|
+
|
|
147
|
+
Licensed under the Elastic License 2.0. See the repository LICENSE and NOTICE.
|
package/SKILL.md
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: microsoft-outlook
|
|
3
|
+
description: Agent-callable Microsoft Outlook tools — read and search mail, send/reply/forward, organize messages and folders, manage calendar events, and manage contacts. Use when the user mentions Outlook, Microsoft 365 mail/calendar/contacts, or wants to send, read, search, or organize email, schedule events, or look up contacts — even if they don't name Outlook explicitly.
|
|
4
|
+
license: Elastic-2.0
|
|
5
|
+
compatibility: Requires Node.js 22.18+ or Bun 1.x; run `npm install` in this directory first.
|
|
6
|
+
metadata:
|
|
7
|
+
title: Microsoft Outlook
|
|
8
|
+
source: https://github.com/zapier/connectors/blob/main/apps/microsoft-outlook/SKILL.md
|
|
9
|
+
zapier-app-key: MicrosoftOutlookCLIAPI
|
|
10
|
+
api-docs: https://learn.microsoft.com/en-us/graph/api/overview
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Microsoft Outlook
|
|
14
|
+
|
|
15
|
+
_Independent, unofficial connector for Microsoft Outlook. Not affiliated with, endorsed by, or sponsored by Microsoft Outlook. "Microsoft Outlook" is a trademark of its owner, used only to identify the service this connector works with._
|
|
16
|
+
|
|
17
|
+
Tools for a single user's Outlook mailbox against the [Microsoft Graph API](https://learn.microsoft.com/en-us/graph/api/overview) v1.0 (`https://graph.microsoft.com/v1.0/`): read and search mail, compose/send/reply/forward, organize messages (read state, flag, importance, categories, move, copy, delete), browse mail folders and attachments, manage calendar events, and manage personal contacts. 30 tools across profile, mail, folders, categories, calendar, and contacts. All calls authorize with one OAuth bearer token.
|
|
18
|
+
|
|
19
|
+
## When to use this connector
|
|
20
|
+
|
|
21
|
+
- An agent needs to **read or search mail** — list/search messages (by folder, KQL, or OData filter), read a full message, list and download attachments.
|
|
22
|
+
- An agent needs to **send or reply** — compose-and-send, create a draft and send it later, reply / reply-all, or forward.
|
|
23
|
+
- An agent needs to **organize mail** — mark read/unread, flag, set importance, categorize, move, copy, or delete a message; browse and create mail folders.
|
|
24
|
+
- An agent needs to **work with the calendar or contacts** — list calendars, list events or a date-range view, create / update / delete events, and create / read / update / delete personal contacts.
|
|
25
|
+
|
|
26
|
+
## Scripts
|
|
27
|
+
|
|
28
|
+
One file per tool in [`scripts/`](scripts/); each tool's `inputSchema` / `outputSchema` (Zod) in the script file is the source of truth for its contract. All tools use the single connection `microsoft-outlook`. Mail and calendar tools accept an optional `mailbox` input to act on a shared mailbox; the six event tools accept an optional `calendarId` (resolve it via `listCalendars`).
|
|
29
|
+
|
|
30
|
+
| Script | Tool name | Connections | Description |
|
|
31
|
+
| ------------------------------------------------------------ | ------------------ | ------------------- | ----------------------------------------------------------------------------- |
|
|
32
|
+
| [`scripts/getMe.ts`](scripts/getMe.ts) | `getMe` | `microsoft-outlook` | Get the signed-in user's profile (name, email, UPN). Resolves "my email". |
|
|
33
|
+
| [`scripts/sendMail.ts`](scripts/sendMail.ts) | `sendMail` | `microsoft-outlook` | Compose and send an email in one step (returns no id). |
|
|
34
|
+
| [`scripts/createDraft.ts`](scripts/createDraft.ts) | `createDraft` | `microsoft-outlook` | Create a draft email; returns the draft id for sendDraft. |
|
|
35
|
+
| [`scripts/sendDraft.ts`](scripts/sendDraft.ts) | `sendDraft` | `microsoft-outlook` | Send an existing draft by id. |
|
|
36
|
+
| [`scripts/replyToMessage.ts`](scripts/replyToMessage.ts) | `replyToMessage` | `microsoft-outlook` | Reply (or reply-all) to a message and send immediately. |
|
|
37
|
+
| [`scripts/createReplyDraft.ts`](scripts/createReplyDraft.ts) | `createReplyDraft` | `microsoft-outlook` | Create a draft reply (or reply-all) to edit before sending. |
|
|
38
|
+
| [`scripts/forwardMessage.ts`](scripts/forwardMessage.ts) | `forwardMessage` | `microsoft-outlook` | Forward a message to new recipients and send immediately. |
|
|
39
|
+
| [`scripts/updateMessage.ts`](scripts/updateMessage.ts) | `updateMessage` | `microsoft-outlook` | Update read state, flag, importance, or categories on a message. |
|
|
40
|
+
| [`scripts/moveMessage.ts`](scripts/moveMessage.ts) | `moveMessage` | `microsoft-outlook` | Move a message to another folder (returns a new id). |
|
|
41
|
+
| [`scripts/copyMessage.ts`](scripts/copyMessage.ts) | `copyMessage` | `microsoft-outlook` | Copy a message into another folder, leaving the original. |
|
|
42
|
+
| [`scripts/deleteMessage.ts`](scripts/deleteMessage.ts) | `deleteMessage` | `microsoft-outlook` | Delete a message (moves it to Deleted Items; reversible). |
|
|
43
|
+
| [`scripts/listMessages.ts`](scripts/listMessages.ts) | `listMessages` | `microsoft-outlook` | List or search messages, newest first (the id-resolution entry point). |
|
|
44
|
+
| [`scripts/getMessage.ts`](scripts/getMessage.ts) | `getMessage` | `microsoft-outlook` | Get a single message by id, including the full body. |
|
|
45
|
+
| [`scripts/listAttachments.ts`](scripts/listAttachments.ts) | `listAttachments` | `microsoft-outlook` | List the attachments on a message. |
|
|
46
|
+
| [`scripts/getAttachment.ts`](scripts/getAttachment.ts) | `getAttachment` | `microsoft-outlook` | Get one attachment by id, including its base64 content. |
|
|
47
|
+
| [`scripts/listMailFolders.ts`](scripts/listMailFolders.ts) | `listMailFolders` | `microsoft-outlook` | List mail folders (top-level or a folder's subfolders). |
|
|
48
|
+
| [`scripts/createMailFolder.ts`](scripts/createMailFolder.ts) | `createMailFolder` | `microsoft-outlook` | Create a mail folder (top-level or a subfolder). |
|
|
49
|
+
| [`scripts/listCategories.ts`](scripts/listCategories.ts) | `listCategories` | `microsoft-outlook` | List the mailbox's category names and colors. |
|
|
50
|
+
| [`scripts/listCalendars.ts`](scripts/listCalendars.ts) | `listCalendars` | `microsoft-outlook` | List the user's calendars (resolves a calendarId). |
|
|
51
|
+
| [`scripts/listEvents.ts`](scripts/listEvents.ts) | `listEvents` | `microsoft-outlook` | List events and recurring-series masters. |
|
|
52
|
+
| [`scripts/listCalendarView.ts`](scripts/listCalendarView.ts) | `listCalendarView` | `microsoft-outlook` | List events in a date range, expanding recurrences ("what's on my calendar"). |
|
|
53
|
+
| [`scripts/getEvent.ts`](scripts/getEvent.ts) | `getEvent` | `microsoft-outlook` | Get a single event by id (attendees, body, recurrence). |
|
|
54
|
+
| [`scripts/createEvent.ts`](scripts/createEvent.ts) | `createEvent` | `microsoft-outlook` | Create a calendar event. |
|
|
55
|
+
| [`scripts/updateEvent.ts`](scripts/updateEvent.ts) | `updateEvent` | `microsoft-outlook` | Update an event's fields or attendees (attendees replace). |
|
|
56
|
+
| [`scripts/deleteEvent.ts`](scripts/deleteEvent.ts) | `deleteEvent` | `microsoft-outlook` | Delete (cancel) a calendar event. |
|
|
57
|
+
| [`scripts/listContacts.ts`](scripts/listContacts.ts) | `listContacts` | `microsoft-outlook` | List or search personal contacts. |
|
|
58
|
+
| [`scripts/getContact.ts`](scripts/getContact.ts) | `getContact` | `microsoft-outlook` | Get a single personal contact by id. |
|
|
59
|
+
| [`scripts/createContact.ts`](scripts/createContact.ts) | `createContact` | `microsoft-outlook` | Create a personal contact. |
|
|
60
|
+
| [`scripts/updateContact.ts`](scripts/updateContact.ts) | `updateContact` | `microsoft-outlook` | Update fields on a personal contact (array fields replace). |
|
|
61
|
+
| [`scripts/deleteContact.ts`](scripts/deleteContact.ts) | `deleteContact` | `microsoft-outlook` | Delete a personal contact by id. |
|
|
62
|
+
|
|
63
|
+
**Always learn a script's input contract before calling it — never guess field names, casing, or types.** Run `--help` on either entrypoint — `./scripts/<script>.ts --help` or `npx @zapier/microsoft-outlook-connector run <script> --help` — which renders `inputSchema` as JSON Schema and lists the connection flag(s) and available resolvers. Guessing the payload just produces a `ZodError` and wastes a round-trip.
|
|
64
|
+
|
|
65
|
+
## Output format
|
|
66
|
+
|
|
67
|
+
Every script returns a `{ data, meta }` envelope (same shape across the CLI's JSON output, the imported SDK return value, and the MCP tool's `structuredContent`):
|
|
68
|
+
|
|
69
|
+
- **`data`** — the script's result (the shape declared by its `outputSchema`).
|
|
70
|
+
- **`meta.outputDataValidation`** — what validating `data` did:
|
|
71
|
+
- `{ skipped: false, droppedPaths: null }` — validated, nothing removed.
|
|
72
|
+
- `{ skipped: false, droppedPaths: [...], instruction }` — validated, but those paths (fields the API returned that the `outputSchema` doesn't declare) were stripped from `data`. If you need them, re-run with output validation skipped.
|
|
73
|
+
- `{ skipped: true }` — validation was bypassed; `data` is the raw, unchecked API output.
|
|
74
|
+
|
|
75
|
+
**Reading dropped fields / `skipOutputDataValidation`.** To receive the raw, unvalidated result, set the single token `skipOutputDataValidation` — CLI: append `--skipOutputDataValidation`; MCP: pass `meta: { skipOutputDataValidation: true }` as a tool argument; SDK: pass `{ skipOutputDataValidation: true }` in the run options. Input validation is never skipped.
|
|
76
|
+
|
|
77
|
+
**Trimming the result / `filterOutputData`.** To shrink a large result down to the fields you need, pass a jq expression that post-processes `data` — CLI: append `--filterOutputData '<jq>'`; MCP: pass `meta: { filterOutputData: "<jq>" }` as a tool argument. The jq runs against `data` only, NOT the `{ data, meta }` envelope, so write it rooted at `data` (see this script's output schema). The transformed value replaces `data`, `meta` is preserved, and the result is NOT re-validated against the output schema. The imported SDK has no `filterOutputData` option — reshape the returned `data` in code instead.
|
|
78
|
+
|
|
79
|
+
## Disambiguation & refusals
|
|
80
|
+
|
|
81
|
+
**Disambiguation before a write.** Before acting on a contact, event, or message you looked up by name/subject (e.g. update a contact found via `listContacts`, or reply to an event found via `listEvents`), count the **exact case-insensitive matches** on the name/subject:
|
|
82
|
+
|
|
83
|
+
- **Exactly one match** — act on it. Don't over-ask; a single unambiguous match is the answer.
|
|
84
|
+
- **Two or more that tie** — stop. List the tied candidates with a distinguishing field (a contact's `emailAddresses`/`companyName`, an event's `start`/`organizer`, a message's `from`/`receivedDateTime`) and ask the user which one they mean. Don't pick arbitrarily and don't write to all of them.
|
|
85
|
+
|
|
86
|
+
**Unsupported operations — say so and stop; don't fake it with another tool.** This catalog deliberately does not:
|
|
87
|
+
|
|
88
|
+
- **Watch for new mail or events (triggers).** There is no "notify me when an email arrives" or polling tool; the connector is request/response only. Don't simulate it with repeated `listMessages` calls and claim it's a subscription.
|
|
89
|
+
- **Send attachments larger than 3 MB.** Only inline attachments under 3 MB are supported; large-file upload sessions are not. Don't claim a large file was sent.
|
|
90
|
+
- **Access group / shared _calendars_ or distribution lists.** Group calendars and directory groups aren't exposed. (Shared _mailboxes_ are, via the `mailbox` input.)
|
|
91
|
+
- **Permanently delete** mail (`deleteMessage` is a reversible move to Deleted Items) or manage mailbox rules, auto-replies, or focused-inbox settings.
|
|
92
|
+
|
|
93
|
+
If asked for any of these, tell the user it's unsupported and stop — don't reach for an unrelated tool to approximate it.
|
|
94
|
+
|
|
95
|
+
## Auth
|
|
96
|
+
|
|
97
|
+
The connector needs a single Microsoft Graph **OAuth 2.0 bearer token**, resolved into the one `microsoft-outlook` connection slot. Pass auth as one connection string with `--connection [<resolver>:]<value>` (CLI / MCP) or `{ connection: "[<resolver>:]<value>" }` (imported). The value is a _selector_, not the secret. Two resolvers:
|
|
98
|
+
|
|
99
|
+
- **`env:<ENV_VAR>`** — direct mode. Read a Graph access token from the named environment variable (conventionally `env:MICROSOFT_OUTLOOK_ACCESS_TOKEN`, with the token exported in `MICROSOFT_OUTLOOK_ACCESS_TOKEN`; it stays in `env`, never on argv). The token must already carry the delegated scopes the tools need (`User.Read`, `Mail.ReadWrite`, `Mail.Send`, `Calendars.ReadWrite`, `Contacts.ReadWrite`, `MailboxSettings.Read`, plus the `.Shared` variants for shared mailboxes); there is **no token refresh in this mode**, so supply a fresh token.
|
|
100
|
+
- **`zapier:<connection-id>`** — Zapier-managed auth. Route through a Zapier Microsoft Outlook connection; the Zapier auth / retries / governance layer injects and refreshes the token for you. **Prerequisite: a Zapier account** (free signup at <https://zapier.com>). Find the ID with the Zapier SDK CLI: `npx @zapier/zapier-sdk-cli list-connections MicrosoftOutlookCLIAPI` (run `login` first if unauthenticated; add `--json` for machine output).
|
|
101
|
+
|
|
102
|
+
Adding scopes later requires the user to reconnect — the granted scope set is fixed at connect time. If no connection is passed the script fails with an actionable error telling you to `Pass --connection [<resolver>:]<value>` and lists the resolvers in match order.
|
|
103
|
+
|
|
104
|
+
## Using this skill
|
|
105
|
+
|
|
106
|
+
### 0. Pre-flight and auth
|
|
107
|
+
|
|
108
|
+
Run the bundled pre-flight check **once** at the start of a session to learn how to run the scripts in the current harness, then run scripts directly — reuse the result for the rest of the session. It detects a usable runtime (Node 22.18+ or Bun) and that dependencies are installed; it does **not** probe the network or auth (the scripts own that). Read `PREFLIGHT_STATUS` first — the single verdict token; `PREFLIGHT_RUNNER` names the runtime.
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
./preflight.sh
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Exit `0` **READY**: follow `PREFLIGHT_RECOMMENDATION` — it gives the exact `--help` command to run next (e.g. `node /path/scripts/listMessages.ts --help`). The `--help` output renders `inputSchema` as JSON Schema, lists the connection flag(s) the script reads and every resolver each accepts, and tells you exactly what to provide. Use the runner from `PREFLIGHT_RUNNER` against the local script path — never `npx` (a sandbox that blocked the dep install may also block registry fetches). If a script call later fails with a network error, egress is blocked — recommend the user set up Zapier's remote MCP at `https://mcp.zapier.com`.
|
|
115
|
+
|
|
116
|
+
Exit `1` **NEEDS_ACTION**: follow `PREFLIGHT_RECOMMENDATION` — it spells out the single self-verifying install step and the exact `--help` command to run afterward. Re-running the pre-flight to reconfirm is optional.
|
|
117
|
+
|
|
118
|
+
The three invocation paths below all assume the pre-flight reported `READY`.
|
|
119
|
+
|
|
120
|
+
### 1. Execute scripts directly
|
|
121
|
+
|
|
122
|
+
When the agent has shell access to the installed directory, run a script file straight from `scripts/`. Each script is `chmod +x` with a Node-targeted shebang. **Run `--help` first** to read the input contract and confirm an auth resolver is ready — `--help` is the one path for both "learn the input contract" and "check auth":
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# Inspect the contract + resolvers first
|
|
126
|
+
./scripts/listMessages.ts --help
|
|
127
|
+
|
|
128
|
+
# Then invoke (direct token — token stays in env)
|
|
129
|
+
MICROSOFT_OUTLOOK_ACCESS_TOKEN=eyJ0... ./scripts/listMessages.ts '{"search":"subject:invoice"}' --connection env:MICROSOFT_OUTLOOK_ACCESS_TOKEN
|
|
130
|
+
|
|
131
|
+
# Or route through a Zapier connection
|
|
132
|
+
./scripts/getMe.ts '{}' --connection zapier:conn_xxx
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Prerequisites: Node.js 22.18+ (or Bun 1.x) on `PATH`, plus `npm install` once in this directory. Pin the runtime explicitly with `node scripts/<name>.ts …` or `bun scripts/<name>.ts …` when needed — all forms run the same script body.
|
|
136
|
+
|
|
137
|
+
### 2. Use the package's CLI
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
MICROSOFT_OUTLOOK_ACCESS_TOKEN=eyJ0... npx @zapier/microsoft-outlook-connector run listMessages '{"search":"subject:invoice"}' --connection env:MICROSOFT_OUTLOOK_ACCESS_TOKEN
|
|
141
|
+
npx @zapier/microsoft-outlook-connector --help # all scripts
|
|
142
|
+
npx @zapier/microsoft-outlook-connector run listMessages --help # per-script schema + resolvers
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Same scripts, different entry point. Use `bunx` when `PREFLIGHT_RUNNER` is `bun`. Some harnesses block `npx`/`bunx` — fall back to (1).
|
|
146
|
+
|
|
147
|
+
### 3. Use as a recipe
|
|
148
|
+
|
|
149
|
+
When no shipped script matches, read this `SKILL.md`, the [`references/`](references/) files, and the `scripts/` files as a recipe to generate custom code. Each script is one `export default defineTool({...})` from `@zapier/connectors-sdk` referencing the connection key `"microsoft-outlook"`; imitate that shape (Zod input/output schemas, `(input, ctx) => …` run body, the direct-mode auth being a Bearer token in the `Authorization` header). If you persist generated code, add a comment pointing back to this skill's source:
|
|
150
|
+
|
|
151
|
+
```ts
|
|
152
|
+
// Source: https://github.com/zapier/connectors/blob/main/apps/microsoft-outlook/SKILL.md
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## API quirks worth knowing
|
|
156
|
+
|
|
157
|
+
| Reference | Load it when |
|
|
158
|
+
| -------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
159
|
+
| [`references/microsoft-outlook-api-gotchas.md`](references/microsoft-outlook-api-gotchas.md) | A call errors and you need recovery guidance (401/403/404/413/429), an id stops resolving after a move, or you're unsure how paging, `search` vs `filter`, attachments (3 MB), all-day/online events, date-time + time zones, the 3-email contact cap, or categories behave. |
|
package/cli.js
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Connector CLI entry point.
|
|
4
|
+
*
|
|
5
|
+
* When dist/cli.js is present (npm install route, or after a local build):
|
|
6
|
+
* → delegates to the compiled CLI, works on any Node version.
|
|
7
|
+
*
|
|
8
|
+
* When dist/ is absent (git-clone route, no build step):
|
|
9
|
+
* → handles the `build` subcommand directly (any Node version, no TS needed),
|
|
10
|
+
* then falls through to cli.ts for all other subcommands (requires Node 22.18+
|
|
11
|
+
* or Bun for TypeScript stripping outside node_modules).
|
|
12
|
+
*
|
|
13
|
+
* `build` subcommand: compiles the connector so that
|
|
14
|
+
* `import { search } from "@zapier/notion-connector"` works on any Node version
|
|
15
|
+
* even when the connector was installed from a git/file source. Invoked
|
|
16
|
+
* automatically by the `prepare` lifecycle hook on git-clone installs.
|
|
17
|
+
* Tries `npx tsup`, falls back to `bunx tsup`, exits 0 regardless so that
|
|
18
|
+
* `npm install` / `pnpm install` never fails in restricted environments.
|
|
19
|
+
*
|
|
20
|
+
* Managed by @zapier/connectors-dev — do not edit; synced byte-for-byte
|
|
21
|
+
* across every connector.
|
|
22
|
+
*/
|
|
23
|
+
import { spawnSync } from "node:child_process";
|
|
24
|
+
import { existsSync } from "node:fs";
|
|
25
|
+
import { dirname, join } from "node:path";
|
|
26
|
+
import { fileURLToPath } from "node:url";
|
|
27
|
+
|
|
28
|
+
const dir = dirname(fileURLToPath(import.meta.url));
|
|
29
|
+
|
|
30
|
+
if (process.argv[2] === "build") {
|
|
31
|
+
if (!existsSync(join(dir, "dist", "cli.js"))) {
|
|
32
|
+
// Try the locally-installed tsup binary first so module resolution for
|
|
33
|
+
// typescript (a required tsup peer) works from the connector's own
|
|
34
|
+
// node_modules. Fall back to npx/bunx for environments without a local
|
|
35
|
+
// install (e.g. fresh git-clone before npm install).
|
|
36
|
+
const localTsup = join(dir, "node_modules", ".bin", "tsup");
|
|
37
|
+
const candidates = existsSync(localTsup)
|
|
38
|
+
? [
|
|
39
|
+
[process.execPath, [localTsup]],
|
|
40
|
+
["npx", ["tsup"]],
|
|
41
|
+
["bunx", ["tsup"]],
|
|
42
|
+
]
|
|
43
|
+
: [
|
|
44
|
+
["npx", ["tsup"]],
|
|
45
|
+
["bunx", ["tsup"]],
|
|
46
|
+
];
|
|
47
|
+
for (const [cmd, args] of candidates) {
|
|
48
|
+
const { status } = spawnSync(cmd, args, {
|
|
49
|
+
stdio: "inherit",
|
|
50
|
+
shell: true,
|
|
51
|
+
cwd: dir,
|
|
52
|
+
});
|
|
53
|
+
if (status === 0) break;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
process.exit(0);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Spawn the target as a subprocess so it runs as the entry point.
|
|
60
|
+
// Dynamic import() would set import.meta.main = false, causing
|
|
61
|
+
// runDispatchCli to return early without executing anything.
|
|
62
|
+
const target = existsSync(join(dir, "dist", "cli.js"))
|
|
63
|
+
? join(dir, "dist", "cli.js")
|
|
64
|
+
: join(dir, "cli.ts");
|
|
65
|
+
|
|
66
|
+
const { status } = spawnSync(
|
|
67
|
+
process.execPath,
|
|
68
|
+
[target, ...process.argv.slice(2)],
|
|
69
|
+
{ stdio: "inherit" },
|
|
70
|
+
);
|
|
71
|
+
process.exit(status ?? 1);
|
package/cli.ts
ADDED
package/connections.ts
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// Microsoft Graph authorizes every call — read or write, mail or calendar or
|
|
2
|
+
// contacts — with a single OAuth 2.0 bearer token. There is no bot/user split
|
|
3
|
+
// and no per-request credential switch, so one connection key
|
|
4
|
+
// (`microsoft-outlook`) resolved by the standard chain (Zapier-managed first,
|
|
5
|
+
// direct env-token fallback) covers the whole connector.
|
|
6
|
+
//
|
|
7
|
+
// On top of auth, every request carries `Prefer: IdType="ImmutableId"`. Outlook
|
|
8
|
+
// message and event ids otherwise change when an item moves between folders,
|
|
9
|
+
// which is the dominant cause of stale-id 404s; immutable ids stay stable
|
|
10
|
+
// across moves, so an id captured from one call keeps working on the next.
|
|
11
|
+
// Scripts that set their own `Prefer` token (plain-text bodies on getMessage,
|
|
12
|
+
// a calendar timezone on calendar reads) are preserved — the wrapper appends to
|
|
13
|
+
// the comma-separated Prefer list rather than overwriting it.
|
|
14
|
+
|
|
15
|
+
import {
|
|
16
|
+
defineEnvResolver,
|
|
17
|
+
zapierConnectionResolver,
|
|
18
|
+
} from "@zapier/connectors-sdk";
|
|
19
|
+
|
|
20
|
+
const IMMUTABLE_ID_PREFER = 'IdType="ImmutableId"';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Wrap a fetch so every request asks for immutable ids, merging with any
|
|
24
|
+
* `Prefer` token the caller already set (Prefer is a comma-separated list).
|
|
25
|
+
*/
|
|
26
|
+
function withImmutableId(
|
|
27
|
+
fetchImpl: typeof globalThis.fetch,
|
|
28
|
+
): typeof globalThis.fetch {
|
|
29
|
+
return ((input, init = {}) => {
|
|
30
|
+
const headers = new Headers(init.headers ?? undefined);
|
|
31
|
+
const existing = headers.get("Prefer");
|
|
32
|
+
headers.set(
|
|
33
|
+
"Prefer",
|
|
34
|
+
existing ? `${existing}, ${IMMUTABLE_ID_PREFER}` : IMMUTABLE_ID_PREFER,
|
|
35
|
+
);
|
|
36
|
+
return fetchImpl(input, { ...init, headers });
|
|
37
|
+
}) as typeof globalThis.fetch;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** A fetch that sends the given token as `Authorization: Bearer <token>`. */
|
|
41
|
+
function bearerFetch(token: string): typeof globalThis.fetch {
|
|
42
|
+
return ((input, init = {}) => {
|
|
43
|
+
const headers = new Headers(init.headers ?? undefined);
|
|
44
|
+
headers.set("Authorization", `Bearer ${token}`);
|
|
45
|
+
return globalThis.fetch(input, { ...init, headers });
|
|
46
|
+
}) as typeof globalThis.fetch;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Zapier-managed path: the Zapier auth layer injects the bearer token; we only
|
|
50
|
+
// add the Prefer header on top of the resolved fetch.
|
|
51
|
+
const zapierOutlookResolver = {
|
|
52
|
+
...zapierConnectionResolver,
|
|
53
|
+
resolve: async (value: string) =>
|
|
54
|
+
withImmutableId(await zapierConnectionResolver.resolve(value)),
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
// Direct path: read a Microsoft Graph access token from the named env var and
|
|
58
|
+
// send it as a Bearer header (no refresh in this mode — the runner supplies a
|
|
59
|
+
// valid token), then add the Prefer header.
|
|
60
|
+
const directOutlookResolver = defineEnvResolver({
|
|
61
|
+
name: "env",
|
|
62
|
+
valueDescription:
|
|
63
|
+
"env var holding a Microsoft Graph access token, sent as `Authorization: Bearer <token>`; matches when the var is set",
|
|
64
|
+
build: (token) => withImmutableId(bearerFetch(token)),
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
export const connectionResolvers = {
|
|
68
|
+
"microsoft-outlook": [zapierOutlookResolver, directOutlookResolver],
|
|
69
|
+
} as const;
|
package/dist/cli.js
ADDED