n8n-nodes-outlook-subscription 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/README.md +102 -0
- package/dist/credentials/MicrosoftOutlookSubscriptionOAuth2Api.credentials.js +29 -0
- package/dist/credentials/MicrosoftOutlookSubscriptionOAuth2Api.credentials.js.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/nodes/OutlookSubscription/OutlookSubscription.node.js +1145 -0
- package/dist/nodes/OutlookSubscription/OutlookSubscription.node.js.map +1 -0
- package/dist/nodes/OutlookSubscription/outlookSubscription.svg +8 -0
- package/dist/nodes/OutlookSubscriptionLifecycleTrigger/OutlookSubscriptionLifecycleTrigger.node.js +96 -0
- package/dist/nodes/OutlookSubscriptionLifecycleTrigger/OutlookSubscriptionLifecycleTrigger.node.js.map +1 -0
- package/dist/nodes/OutlookSubscriptionLifecycleTrigger/outlookSubscriptionLifecycleTrigger.svg +9 -0
- package/dist/nodes/OutlookSubscriptionNotificationTrigger/OutlookSubscriptionNotificationTrigger.node.js +211 -0
- package/dist/nodes/OutlookSubscriptionNotificationTrigger/OutlookSubscriptionNotificationTrigger.node.js.map +1 -0
- package/dist/nodes/OutlookSubscriptionNotificationTrigger/outlookSubscriptionNotificationTrigger.svg +8 -0
- package/dist/nodes/shared/graph.js +368 -0
- package/dist/nodes/shared/graph.js.map +1 -0
- package/package.json +51 -0
package/README.md
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# n8n-nodes-outlook-subscription
|
|
2
|
+
|
|
3
|
+
n8n community nodes for Microsoft Outlook mail automation and change notifications via Microsoft Graph.
|
|
4
|
+
|
|
5
|
+
## Nodes
|
|
6
|
+
|
|
7
|
+
### Outlook Subscription (action node)
|
|
8
|
+
|
|
9
|
+
Manage Microsoft Graph subscriptions and perform full Outlook mail operations.
|
|
10
|
+
|
|
11
|
+
**Subscription** resource:
|
|
12
|
+
|
|
13
|
+
| Operation | Description |
|
|
14
|
+
|---|---|
|
|
15
|
+
| Create | Create one or more subscriptions, with duplicate detection |
|
|
16
|
+
| Delete | Delete a subscription by ID |
|
|
17
|
+
| List | List all active subscriptions |
|
|
18
|
+
| Renew | Extend a subscription's expiry |
|
|
19
|
+
|
|
20
|
+
**Message** resource:
|
|
21
|
+
|
|
22
|
+
| Operation | Description |
|
|
23
|
+
|---|---|
|
|
24
|
+
| Delete | Soft-delete a message (moves to Deleted Items) |
|
|
25
|
+
| Get | Fetch a message with optional `$select` / `$expand` |
|
|
26
|
+
| List | Query messages with filter, ordering, field selection, and auto-pagination |
|
|
27
|
+
| Move | Move a message to a folder — pick from list, enter an ID, or create a new folder |
|
|
28
|
+
| Reply | Reply to a message (HTML or plain text) |
|
|
29
|
+
| Reply All | Reply-all to a message (HTML or plain text) |
|
|
30
|
+
| Send | Send a new email with optional CC, BCC, and a binary attachment |
|
|
31
|
+
| Update | Set flag status, single-value extended properties, or any arbitrary PATCH fields |
|
|
32
|
+
|
|
33
|
+
**Attachment** resource:
|
|
34
|
+
|
|
35
|
+
| Operation | Description |
|
|
36
|
+
|---|---|
|
|
37
|
+
| Download | Download an attachment as binary data |
|
|
38
|
+
| List | List all attachments on a message |
|
|
39
|
+
|
|
40
|
+
**User** resource:
|
|
41
|
+
|
|
42
|
+
| Operation | Description |
|
|
43
|
+
|---|---|
|
|
44
|
+
| Get | Fetch a user profile by ID or UPN |
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
### Outlook Subscription Notification Trigger
|
|
49
|
+
|
|
50
|
+
Receives Microsoft Graph change notifications via webhook.
|
|
51
|
+
|
|
52
|
+
- Automatically handles Graph validation token handshakes.
|
|
53
|
+
- Resolves the full message for `message` notifications (configurable).
|
|
54
|
+
- Applies client-side message filters (subject, sender, custom fields).
|
|
55
|
+
- Opportunistically renews the subscription on delivery.
|
|
56
|
+
- Supports lifecycle notification URL for managed renewal.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
### Outlook Subscription Lifecycle Trigger
|
|
61
|
+
|
|
62
|
+
Receives Microsoft Graph lifecycle notifications (e.g. `subscriptionRemoved`, `reauthorizationRequired`) and surfaces them as n8n items for downstream handling.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Credentials
|
|
67
|
+
|
|
68
|
+
Use the **Microsoft Outlook Subscription OAuth2 API** credential (OAuth 2.0, delegated).
|
|
69
|
+
|
|
70
|
+
Required Microsoft Graph scopes:
|
|
71
|
+
|
|
72
|
+
| Scope | Required for |
|
|
73
|
+
|---|---|
|
|
74
|
+
| `openid` | Authentication |
|
|
75
|
+
| `offline_access` | Token refresh |
|
|
76
|
+
| `Mail.Read` | Read messages, subscriptions |
|
|
77
|
+
| `Mail.ReadWrite` | Update, delete, move, send, reply |
|
|
78
|
+
| `MailboxSettings.Read` | Folder operations |
|
|
79
|
+
| `User.Read.All` | User Get operation |
|
|
80
|
+
|
|
81
|
+
To access a shared mailbox or another user's mailbox, the signed-in account must have the necessary Exchange Online delegate permissions.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Node Architecture
|
|
86
|
+
|
|
87
|
+
| Use case | Node to use |
|
|
88
|
+
|---|---|
|
|
89
|
+
| n8n receives mail notifications in-workflow | `Outlook Subscription Notification Trigger` |
|
|
90
|
+
| An external service receives notifications | `Outlook Subscription` (create operation, supply your own URL) |
|
|
91
|
+
| Perform mail operations (send, move, list…) | `Outlook Subscription` |
|
|
92
|
+
| Handle subscription lifecycle events | `Outlook Subscription Lifecycle Trigger` |
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Notes
|
|
97
|
+
|
|
98
|
+
- Subscription lifetime is clamped to Microsoft Graph limits (45 min – 7 days).
|
|
99
|
+
- Duplicate subscriptions are detected and skipped automatically during Create.
|
|
100
|
+
- Message List supports full OData `$filter`, ordering, field selection, and auto-pagination via `@odata.nextLink`.
|
|
101
|
+
- Move to new folder: selecting "Create New Folder" creates the folder then moves the message atomically in two Graph calls.
|
|
102
|
+
- Send with attachment: enable **Add Attachment** and supply the binary field name from an upstream node.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MicrosoftOutlookSubscriptionOAuth2Api = void 0;
|
|
4
|
+
const scopes = [
|
|
5
|
+
"openid",
|
|
6
|
+
"offline_access",
|
|
7
|
+
"Mail.Read",
|
|
8
|
+
"Mail.ReadWrite",
|
|
9
|
+
"MailboxSettings.Read",
|
|
10
|
+
"User.Read.All",
|
|
11
|
+
];
|
|
12
|
+
class MicrosoftOutlookSubscriptionOAuth2Api {
|
|
13
|
+
constructor() {
|
|
14
|
+
this.name = "microsoftOutlookSubscriptionOAuth2Api";
|
|
15
|
+
this.extends = ["microsoftOAuth2Api"];
|
|
16
|
+
this.displayName = "Microsoft Outlook Subscription OAuth2 API";
|
|
17
|
+
this.documentationUrl = "microsoft";
|
|
18
|
+
this.properties = [
|
|
19
|
+
{
|
|
20
|
+
displayName: "Scope",
|
|
21
|
+
name: "scope",
|
|
22
|
+
type: "hidden",
|
|
23
|
+
default: scopes.join(" "),
|
|
24
|
+
},
|
|
25
|
+
];
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.MicrosoftOutlookSubscriptionOAuth2Api = MicrosoftOutlookSubscriptionOAuth2Api;
|
|
29
|
+
//# sourceMappingURL=MicrosoftOutlookSubscriptionOAuth2Api.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MicrosoftOutlookSubscriptionOAuth2Api.credentials.js","sourceRoot":"","sources":["../../credentials/MicrosoftOutlookSubscriptionOAuth2Api.credentials.ts"],"names":[],"mappings":";;;AAEA,MAAM,MAAM,GAAG;IACb,QAAQ;IACR,gBAAgB;IAChB,WAAW;IACX,gBAAgB;IAChB,sBAAsB;IACtB,eAAe;CAChB,CAAC;AAEF,MAAa,qCAAqC;IAAlD;QACE,SAAI,GAAG,uCAAuC,CAAC;QAE/C,YAAO,GAAG,CAAC,oBAAoB,CAAC,CAAC;QAEjC,gBAAW,GAAG,2CAA2C,CAAC;QAE1D,qBAAgB,GAAG,WAAW,CAAC;QAE/B,eAAU,GAAsB;YAC9B;gBACE,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;aAC1B;SACF,CAAC;IACJ,CAAC;CAAA;AAjBD,sFAiBC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./credentials/MicrosoftOutlookSubscriptionOAuth2Api.credentials"), exports);
|
|
18
|
+
__exportStar(require("./nodes/OutlookSubscription/OutlookSubscription.node"), exports);
|
|
19
|
+
__exportStar(require("./nodes/OutlookSubscriptionNotificationTrigger/OutlookSubscriptionNotificationTrigger.node"), exports);
|
|
20
|
+
__exportStar(require("./nodes/OutlookSubscriptionLifecycleTrigger/OutlookSubscriptionLifecycleTrigger.node"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kGAAgF;AAChF,uFAAqE;AACrE,6HAA2G;AAC3G,uHAAqG"}
|