@advenimuss/n8n-nodes-msgraph 0.2.1 → 0.2.2

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 CHANGED
@@ -1 +1,180 @@
1
-
1
+ # n8n-nodes-msgraph
2
+
3
+ This is a custom n8n node that provides enhanced Microsoft Graph API integration with built-in rate limiting and retry handling. It allows you to make requests to any Microsoft Graph API endpoint while automatically handling throttling responses (HTTP 429) using Microsoft's recommended retry-after approach.
4
+
5
+ ## Features
6
+
7
+ * 🔄 Automatic rate limit handling with retry logic
8
+ * ⏱️ Configurable retry intervals using Microsoft's retry-after header
9
+ * 🎯 Support for all Microsoft Graph API endpoints
10
+ * 🔐 OAuth2 authentication support
11
+ * 📝 Detailed error handling and logging
12
+ * 🛠️ Configurable request parameters (method, URL, headers, query parameters, body)
13
+ * 📦 Response format selection (JSON/String)
14
+
15
+ ## Installation
16
+
17
+ You can install this node in your n8n instance by:
18
+
19
+ ```bash
20
+ npm install @advenimuss/n8n-nodes-msgraph
21
+ ```
22
+
23
+
24
+ ## Configuration
25
+
26
+
27
+ 1. Create a new Microsoft Graph API credential in n8n:
28
+ * Go to Settings > Credentials > New
29
+ * Search for "Microsoft Graph API"
30
+ * Configure with your Azure AD application details (or with an existing access token via a previous API call to get the token with a client secret)
31
+ 2. In your workflow:
32
+ * Add the "Microsoft Graph" node
33
+ * Select your credential
34
+ * Configure the HTTP method, URL, and other parameters
35
+ * Enable/configure rate limit handling if needed
36
+
37
+ ## Rate Limiting Features
38
+
39
+ The node includes smart handling of Microsoft Graph API rate limits:
40
+
41
+ * Automatically detects HTTP 429 responses
42
+ * Uses the retry-after header from Microsoft's response
43
+ * Configurable maximum retry attempts
44
+ * Customizable retry delay with expression support
45
+ * Detailed logging of retry attempts
46
+
47
+ ## Development Setup
48
+
49
+
50
+ 1. Clone this repository:
51
+
52
+ ```bash
53
+ git clone https://github.com/advenimuss/n8n-nodes-msgraph.git
54
+ cd n8n-nodes-msgraph
55
+ ```
56
+
57
+
58
+ 2. Install dependencies:
59
+
60
+ ```bash
61
+ npm install
62
+ ```
63
+
64
+
65
+ 3. Build the node:
66
+
67
+ ```bash
68
+ npm run build
69
+ ```
70
+
71
+
72
+ 4. Link for local testing:
73
+
74
+ ```bash
75
+ npm link
76
+ ```
77
+
78
+
79
+ 5. In your local n8n installation directory:
80
+
81
+ ```bash
82
+ npm link @advenimuss/n8n-nodes-msgraph
83
+ ```
84
+
85
+ ## Testing
86
+
87
+
88
+ 1. Run the linter:
89
+
90
+ ```bash
91
+ npm run lint
92
+ ```
93
+
94
+
95
+ 2. Fix linting issues:
96
+
97
+ ```bash
98
+ npm run lintfix
99
+ ```
100
+
101
+ ## Building for Production
102
+
103
+
104
+ 1. Update version in package.json
105
+ 2. Build the project:
106
+
107
+ ```bash
108
+ npm run build
109
+ ```
110
+
111
+
112
+ 3. Test the build:
113
+
114
+ ```bash
115
+ npm run lint
116
+ ```
117
+
118
+ ## Publishing to npm
119
+
120
+
121
+ 1. Login to npm:
122
+
123
+ ```bash
124
+ npm login
125
+ ```
126
+
127
+
128
+ 2. Publish the package:
129
+
130
+ ```bash
131
+ npm publish --access public
132
+ ```
133
+
134
+ ## Example Usage
135
+
136
+ ### Basic GET Request
137
+
138
+ ```typescript
139
+ {
140
+ "resource": "custom",
141
+ "method": "GET",
142
+ "url": "https://graph.microsoft.com/v1.0/me",
143
+ "authentication": "msGraphOAuth2Api"
144
+ }
145
+ ```
146
+
147
+ ### Handling Rate Limits
148
+
149
+ ```typescript
150
+ {
151
+ "resource": "custom",
152
+ "method": "GET",
153
+ "url": "https://graph.microsoft.com/v1.0/users",
154
+ "authentication": "msGraphOAuth2Api",
155
+ "options": {
156
+ "enableThrottling": true,
157
+ "maxRetries": 5,
158
+ "retryAfter": "{{$response.headers['retry-after'] || 2}}"
159
+ }
160
+ }
161
+ ```
162
+
163
+ ## License
164
+
165
+ [MIT](LICENSE)
166
+
167
+ ## Support
168
+
169
+ * Create an issue in this repository
170
+
171
+ ## Contributing
172
+
173
+
174
+ 1. Fork the repository
175
+ 2. Create a feature branch
176
+ 3. Commit your changes
177
+ 4. Push to the branch
178
+ 5. Create a Pull Request
179
+
180
+
@@ -1,6 +1,7 @@
1
1
  import { ICredentialType, INodeProperties } from 'n8n-workflow';
2
2
  export declare class MsGraphOAuth2Api implements ICredentialType {
3
3
  name: string;
4
+ extends: string[];
4
5
  displayName: string;
5
6
  documentationUrl: string;
6
7
  properties: INodeProperties[];
@@ -4,22 +4,24 @@ exports.MsGraphOAuth2Api = void 0;
4
4
  class MsGraphOAuth2Api {
5
5
  constructor() {
6
6
  this.name = 'msGraphOAuth2Api';
7
+ this.extends = ['oAuth2Api']; // CRITICAL: Enables n8n's OAuth handler
7
8
  this.displayName = 'Microsoft Graph OAuth2 API';
8
- this.documentationUrl = 'https://docs.microsoft.com/en-us/graph/auth-v2-user';
9
+ this.documentationUrl = 'https://docs.microsoft.com/en-us/graph/auth-v2-service';
9
10
  this.properties = [
10
11
  {
11
- displayName: 'Authorization URL',
12
- name: 'authUrl',
13
- type: 'string',
14
- default: 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize',
15
- required: true,
12
+ displayName: 'Grant Type',
13
+ name: 'grantType',
14
+ type: 'hidden',
15
+ default: 'clientCredentials', // App-only flow (no user interaction)
16
16
  },
17
17
  {
18
- displayName: 'Token URL',
19
- name: 'tokenUrl',
18
+ displayName: 'Access Token URL',
19
+ name: 'accessTokenUrl',
20
20
  type: 'string',
21
- default: 'https://login.microsoftonline.com/common/oauth2/v2.0/token',
21
+ default: '',
22
22
  required: true,
23
+ placeholder: 'https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/token',
24
+ description: 'Token endpoint URL. Replace {tenant-id} with your Azure AD Tenant ID (GUID). Client credentials flow requires tenant-specific URL - cannot use /common/.',
23
25
  },
24
26
  {
25
27
  displayName: 'Client ID',
@@ -27,6 +29,7 @@ class MsGraphOAuth2Api {
27
29
  type: 'string',
28
30
  default: '',
29
31
  required: true,
32
+ description: 'Application (client) ID from your Azure AD app registration',
30
33
  },
31
34
  {
32
35
  displayName: 'Client Secret',
@@ -37,30 +40,21 @@ class MsGraphOAuth2Api {
37
40
  },
38
41
  default: '',
39
42
  required: true,
43
+ description: 'Client secret value (not the secret ID) from Azure AD app registration → Certificates & secrets',
40
44
  },
41
45
  {
42
46
  displayName: 'Scope',
43
47
  name: 'scope',
44
48
  type: 'string',
45
- default: 'offline_access user.read',
46
- description: 'Space-separated list of scopes to request',
49
+ default: 'https://graph.microsoft.com/.default',
47
50
  required: true,
51
+ description: 'For client credentials, use .default to get all granted Application permissions. Do not change unless you know what you are doing.',
48
52
  },
49
53
  {
50
54
  displayName: 'Authentication',
51
55
  name: 'authentication',
52
- type: 'options',
53
- options: [
54
- {
55
- name: 'Body',
56
- value: 'body',
57
- },
58
- {
59
- name: 'Header',
60
- value: 'header',
61
- },
62
- ],
63
- default: 'header',
56
+ type: 'hidden',
57
+ default: 'body', // Microsoft prefers credentials in body for client credentials
64
58
  },
65
59
  ];
66
60
  }
@@ -1 +1 @@
1
- {"version":3,"file":"MsGraphOAuth2Api.credentials.js","sourceRoot":"","sources":["../../credentials/MsGraphOAuth2Api.credentials.ts"],"names":[],"mappings":";;;AAKA,MAAa,gBAAgB;IAA7B;QACC,SAAI,GAAG,kBAAkB,CAAC;QAC1B,gBAAW,GAAG,4BAA4B,CAAC;QAC3C,qBAAgB,GAAG,qDAAqD,CAAC;QACzE,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,mBAAmB;gBAChC,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,gEAAgE;gBACzE,QAAQ,EAAE,IAAI;aACd;YACD;gBACC,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,4DAA4D;gBACrE,QAAQ,EAAE,IAAI;aACd;YACD;gBACC,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;aACd;YACD;gBACC,WAAW,EAAE,eAAe;gBAC5B,IAAI,EAAE,cAAc;gBACpB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;aACd;YACD;gBACC,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,0BAA0B;gBACnC,WAAW,EAAE,2CAA2C;gBACxD,QAAQ,EAAE,IAAI;aACd;YACD;gBACC,WAAW,EAAE,gBAAgB;gBAC7B,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE;oBACR;wBACC,IAAI,EAAE,MAAM;wBACZ,KAAK,EAAE,MAAM;qBACb;oBACD;wBACC,IAAI,EAAE,QAAQ;wBACd,KAAK,EAAE,QAAQ;qBACf;iBACD;gBACD,OAAO,EAAE,QAAQ;aACjB;SACD,CAAC;IACH,CAAC;CAAA;AA7DD,4CA6DC"}
1
+ {"version":3,"file":"MsGraphOAuth2Api.credentials.js","sourceRoot":"","sources":["../../credentials/MsGraphOAuth2Api.credentials.ts"],"names":[],"mappings":";;;AAKA,MAAa,gBAAgB;IAA7B;QACC,SAAI,GAAG,kBAAkB,CAAC;QAC1B,YAAO,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,wCAAwC;QACjE,gBAAW,GAAG,4BAA4B,CAAC;QAC3C,qBAAgB,GAAG,wDAAwD,CAAC;QAE5E,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,mBAAmB,EAAE,sCAAsC;aACpE;YACD;gBACC,WAAW,EAAE,kBAAkB;gBAC/B,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,iEAAiE;gBAC9E,WAAW,EAAE,0JAA0J;aACvK;YACD;gBACC,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,6DAA6D;aAC1E;YACD;gBACC,WAAW,EAAE,eAAe;gBAC5B,IAAI,EAAE,cAAc;gBACpB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,iGAAiG;aAC9G;YACD;gBACC,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,sCAAsC;gBAC/C,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,oIAAoI;aACjJ;YACD;gBACC,WAAW,EAAE,gBAAgB;gBAC7B,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,MAAM,EAAE,+DAA+D;aAChF;SACD,CAAC;IACH,CAAC;CAAA;AAxDD,4CAwDC"}
@@ -15,263 +15,165 @@ class MsGraph {
15
15
  defaults: {
16
16
  name: 'Microsoft Graph',
17
17
  },
18
- // @ts-expect-error - n8n types issue
19
18
  inputs: ['main'],
20
- // @ts-expect-error - n8n types issue
21
19
  outputs: ['main'],
22
20
  credentials: [
23
21
  {
24
22
  name: 'msGraphOAuth2Api',
25
23
  required: false,
24
+ displayOptions: {
25
+ show: {
26
+ authentication: ['oauth2'],
27
+ },
28
+ },
26
29
  },
27
30
  ],
28
31
  properties: [
32
+ // ==================== Authentication ====================
29
33
  {
30
34
  displayName: 'Authentication',
31
35
  name: 'authentication',
32
36
  type: 'options',
33
37
  options: [
34
38
  {
35
- name: 'OAuth2 (via Credentials)',
39
+ name: 'OAuth2 (Client Credentials)',
36
40
  value: 'oauth2',
41
+ description: 'Use OAuth2 credentials configured in n8n (recommended)',
37
42
  },
38
43
  {
39
- name: 'Access Token',
44
+ name: 'Access Token (Manual)',
40
45
  value: 'accessToken',
46
+ description: 'Provide a pre-obtained access token',
41
47
  },
42
48
  ],
43
49
  default: 'oauth2',
44
- description: 'The authentication method to use',
50
+ description: 'How to authenticate with Microsoft Graph API',
45
51
  },
46
52
  {
47
53
  displayName: 'Access Token',
48
54
  name: 'accessToken',
49
55
  type: 'string',
56
+ typeOptions: {
57
+ password: true,
58
+ },
50
59
  displayOptions: {
51
60
  show: {
52
61
  authentication: ['accessToken'],
53
62
  },
54
63
  },
55
64
  default: '',
56
- description: 'Access token obtained from Microsoft Identity Platform (Azure AD). Can be set via an expression from the result of a previous node.',
57
65
  required: true,
66
+ description: 'Bearer token obtained from Microsoft Identity Platform. Can use an expression to reference output from a previous node.',
58
67
  },
68
+ // ==================== Request Configuration ====================
59
69
  {
60
70
  displayName: 'HTTP Method',
61
71
  name: 'method',
62
72
  type: 'options',
63
73
  options: [
64
- {
65
- name: 'DELETE',
66
- value: 'DELETE',
67
- },
68
- {
69
- name: 'GET',
70
- value: 'GET',
71
- },
72
- {
73
- name: 'PATCH',
74
- value: 'PATCH',
75
- },
76
- {
77
- name: 'POST',
78
- value: 'POST',
79
- },
80
- {
81
- name: 'PUT',
82
- value: 'PUT',
83
- },
74
+ { name: 'GET', value: 'GET' },
75
+ { name: 'POST', value: 'POST' },
76
+ { name: 'PATCH', value: 'PATCH' },
77
+ { name: 'PUT', value: 'PUT' },
78
+ { name: 'DELETE', value: 'DELETE' },
84
79
  ],
85
80
  default: 'GET',
86
- description: 'The HTTP method to use for the request',
81
+ description: 'HTTP method for the request',
87
82
  },
88
83
  {
89
84
  displayName: 'URL',
90
85
  name: 'url',
91
86
  type: 'string',
92
87
  default: '',
93
- placeholder: 'https://graph.microsoft.com/v1.0/me',
94
- description: 'The URL to make the request to',
88
+ placeholder: 'https://graph.microsoft.com/v1.0/users',
95
89
  required: true,
90
+ description: 'Full Microsoft Graph API URL. Use v1.0 for production, beta for preview features.',
96
91
  },
97
92
  {
98
- displayName: 'Headers',
99
- name: 'headers',
100
- placeholder: 'Add Header',
93
+ displayName: 'Request Body',
94
+ name: 'body',
95
+ type: 'json',
96
+ displayOptions: {
97
+ show: {
98
+ method: ['PATCH', 'POST', 'PUT'],
99
+ },
100
+ },
101
+ default: '',
102
+ description: 'JSON body for the request',
103
+ },
104
+ // ==================== Query Parameters ====================
105
+ {
106
+ displayName: 'Query Parameters',
107
+ name: 'queryParameters',
108
+ placeholder: 'Add Parameter',
101
109
  type: 'fixedCollection',
102
110
  typeOptions: {
103
111
  multipleValues: true,
104
112
  },
105
113
  default: {},
114
+ description: 'OData query parameters like $select, $filter, $expand, $top, etc.',
106
115
  options: [
107
116
  {
108
117
  name: 'parameter',
109
- displayName: 'Header',
118
+ displayName: 'Parameter',
110
119
  values: [
111
120
  {
112
121
  displayName: 'Name',
113
122
  name: 'name',
114
123
  type: 'string',
115
124
  default: '',
116
- description: 'Name of the header',
125
+ placeholder: '$select',
126
+ description: 'Parameter name (e.g., $select, $filter, $expand, $top, $orderby)',
117
127
  },
118
128
  {
119
129
  displayName: 'Value',
120
130
  name: 'value',
121
131
  type: 'string',
122
132
  default: '',
123
- description: 'Value of the header',
133
+ placeholder: 'id,displayName,mail',
134
+ description: 'Parameter value',
124
135
  },
125
136
  ],
126
137
  },
127
138
  ],
128
139
  },
140
+ // ==================== Headers ====================
129
141
  {
130
- displayName: 'Query Parameters',
131
- name: 'queryParameters',
132
- placeholder: 'Add Parameter',
142
+ displayName: 'Headers',
143
+ name: 'headers',
144
+ placeholder: 'Add Header',
133
145
  type: 'fixedCollection',
134
146
  typeOptions: {
135
147
  multipleValues: true,
136
148
  },
137
149
  default: {},
150
+ description: 'Custom HTTP headers to include in the request',
138
151
  options: [
139
152
  {
140
153
  name: 'parameter',
141
- displayName: 'Parameter',
154
+ displayName: 'Header',
142
155
  values: [
143
156
  {
144
157
  displayName: 'Name',
145
158
  name: 'name',
146
159
  type: 'string',
147
160
  default: '',
148
- description: 'Name of the parameter',
161
+ placeholder: 'ConsistencyLevel',
162
+ description: 'Header name',
149
163
  },
150
164
  {
151
165
  displayName: 'Value',
152
166
  name: 'value',
153
167
  type: 'string',
154
168
  default: '',
155
- description: 'Value of the parameter',
156
- },
157
- ],
158
- },
159
- ],
160
- },
161
- {
162
- displayName: 'Body',
163
- name: 'body',
164
- type: 'json',
165
- displayOptions: {
166
- show: {
167
- method: ['PATCH', 'POST', 'PUT'],
168
- },
169
- },
170
- default: '',
171
- description: 'Body of the request',
172
- },
173
- {
174
- displayName: 'Response Format',
175
- name: 'responseFormat',
176
- type: 'options',
177
- options: [
178
- {
179
- name: 'JSON',
180
- value: 'json',
181
- },
182
- {
183
- name: 'String',
184
- value: 'string',
185
- },
186
- ],
187
- default: 'json',
188
- description: 'The format in which the data gets returned from the URL',
189
- },
190
- {
191
- displayName: 'Handle Throttling',
192
- name: 'handleThrottling',
193
- type: 'fixedCollection',
194
- typeOptions: {
195
- multipleValues: false,
196
- },
197
- default: {},
198
- options: [
199
- {
200
- name: 'values',
201
- displayName: 'Values',
202
- values: [
203
- {
204
- displayName: 'Enable Throttle Handling',
205
- name: 'enabled',
206
- type: 'boolean',
207
- default: true,
208
- description: 'Whether to handle rate limiting (HTTP 429 responses)',
209
- },
210
- {
211
- displayName: 'Retry After (Seconds)',
212
- name: 'retryAfterExpression',
213
- displayOptions: {
214
- show: {
215
- enabled: [true],
216
- },
217
- },
218
- type: 'string',
219
- default: '={{$response.headers["retry-after"] || 2}}',
220
- description: 'Expression to determine how long to wait before retry. Access the retry-after header with $response.headers["retry-after"]',
221
- },
222
- {
223
- displayName: 'Limit Number of Retries',
224
- name: 'limitRetries',
225
- displayOptions: {
226
- show: {
227
- enabled: [true],
228
- },
229
- },
230
- type: 'boolean',
231
- default: true,
232
- description: 'Whether to limit the number of retry attempts',
233
- },
234
- {
235
- displayName: 'Maximum Retries',
236
- name: 'maxRetries',
237
- displayOptions: {
238
- show: {
239
- enabled: [true],
240
- limitRetries: [true],
241
- },
242
- },
243
- type: 'number',
244
- default: 5,
245
- description: 'Maximum number of retries to attempt if rate limited',
246
- },
247
- ],
248
- },
249
- ],
250
- },
251
- {
252
- displayName: 'Error Handling',
253
- name: 'errorHandling',
254
- type: 'fixedCollection',
255
- typeOptions: {
256
- multipleValues: false,
257
- },
258
- default: {},
259
- options: [
260
- {
261
- name: 'values',
262
- displayName: 'Values',
263
- values: [
264
- {
265
- displayName: 'Continue On Error',
266
- name: 'continueOnError',
267
- type: 'boolean',
268
- default: false,
269
- description: 'Whether to continue execution even when an error occurs',
169
+ placeholder: 'eventual',
170
+ description: 'Header value',
270
171
  },
271
172
  ],
272
173
  },
273
174
  ],
274
175
  },
176
+ // ==================== Options (Collapsible) ====================
275
177
  {
276
178
  displayName: 'Options',
277
179
  name: 'options',
@@ -279,19 +181,56 @@ class MsGraph {
279
181
  placeholder: 'Add Option',
280
182
  default: {},
281
183
  options: [
184
+ {
185
+ displayName: 'Response Format',
186
+ name: 'responseFormat',
187
+ type: 'options',
188
+ options: [
189
+ { name: 'JSON', value: 'json' },
190
+ { name: 'Text', value: 'string' },
191
+ ],
192
+ default: 'json',
193
+ description: 'How to parse the response from Microsoft Graph',
194
+ },
282
195
  {
283
196
  displayName: 'Full Response',
284
197
  name: 'fullResponse',
285
198
  type: 'boolean',
286
199
  default: false,
287
- description: 'Whether to return the full response data instead of only the body',
200
+ description: 'Whether to return the full response including headers and status code',
288
201
  },
289
202
  {
290
- displayName: 'Timeout',
203
+ displayName: 'Timeout (ms)',
291
204
  name: 'timeout',
292
205
  type: 'number',
293
206
  default: 10000,
294
- description: 'Time in ms to wait for the server to send response headers before aborting the request',
207
+ description: 'Request timeout in milliseconds',
208
+ },
209
+ {
210
+ displayName: 'Handle Rate Limiting',
211
+ name: 'handleRateLimiting',
212
+ type: 'boolean',
213
+ default: true,
214
+ description: 'Whether to automatically retry when rate limited (HTTP 429)',
215
+ },
216
+ {
217
+ displayName: 'Max Retries',
218
+ name: 'maxRetries',
219
+ type: 'number',
220
+ default: 5,
221
+ description: 'Maximum number of retry attempts when rate limited',
222
+ displayOptions: {
223
+ show: {
224
+ handleRateLimiting: [true],
225
+ },
226
+ },
227
+ },
228
+ {
229
+ displayName: 'Continue On Error',
230
+ name: 'continueOnError',
231
+ type: 'boolean',
232
+ default: false,
233
+ description: 'Whether to continue workflow execution when this node encounters an error',
295
234
  },
296
235
  ],
297
236
  },
@@ -299,198 +238,166 @@ class MsGraph {
299
238
  };
300
239
  }
301
240
  async execute() {
302
- var _a, _b, _c;
241
+ var _a, _b, _c, _d, _e;
303
242
  const items = this.getInputData();
304
243
  const returnItems = [];
305
244
  for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
306
245
  try {
307
- // Get authentication parameters
246
+ // Get authentication method and token
308
247
  const authMethod = this.getNodeParameter('authentication', itemIndex, 'oauth2');
309
248
  let accessToken;
310
249
  if (authMethod === 'oauth2') {
311
- // Get credentials for MS Graph API
312
250
  const credentials = await this.getCredentials('msGraphOAuth2Api');
313
- accessToken = credentials.access_token;
251
+ // n8n's OAuth2 handler stores the token in oauthTokenData.access_token
252
+ const oauthTokenData = credentials.oauthTokenData;
253
+ accessToken = (oauthTokenData === null || oauthTokenData === void 0 ? void 0 : oauthTokenData.access_token) || credentials.access_token;
254
+ if (!accessToken) {
255
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'No access token found in credentials. Please reconnect your OAuth2 credentials.', { itemIndex });
256
+ }
314
257
  }
315
258
  else {
316
- // Get the access token directly from the parameter
317
259
  accessToken = this.getNodeParameter('accessToken', itemIndex, '');
318
260
  if (!accessToken) {
319
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Access Token is required for this authentication method', {
320
- itemIndex,
321
- });
261
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Access Token is required when using manual token authentication', { itemIndex });
322
262
  }
323
263
  }
324
- // Get parameters
264
+ // Get request parameters
325
265
  const method = this.getNodeParameter('method', itemIndex);
326
266
  const url = this.getNodeParameter('url', itemIndex);
327
- const responseFormat = this.getNodeParameter('responseFormat', itemIndex);
328
267
  const options = this.getNodeParameter('options', itemIndex, {});
329
- // Get throttling options
330
- const throttleSettings = this.getNodeParameter('handleThrottling.values', itemIndex, {
331
- enabled: true,
332
- retryAfterExpression: '={{$response.headers["retry-after"] || 2}}',
333
- limitRetries: true,
334
- maxRetries: 5,
335
- });
336
- // Get body, headers and query parameters
268
+ // Set defaults for options
269
+ const responseFormat = options.responseFormat || 'json';
270
+ const timeout = options.timeout || 10000;
271
+ const handleRateLimiting = options.handleRateLimiting !== false;
272
+ const maxRetries = (_a = options.maxRetries) !== null && _a !== void 0 ? _a : 5;
273
+ // Get body for POST/PATCH/PUT
337
274
  let body;
338
275
  if (['PATCH', 'POST', 'PUT'].includes(method)) {
339
- body = this.getNodeParameter('body', itemIndex, {});
340
- if (body !== '' && typeof body === 'string') {
341
- // Try to parse the body as JSON
276
+ const bodyParam = this.getNodeParameter('body', itemIndex, '');
277
+ if (bodyParam && bodyParam.trim() !== '') {
342
278
  try {
343
- body = JSON.parse(body);
279
+ body = JSON.parse(bodyParam);
344
280
  }
345
281
  catch {
346
- // If parsing fails, throw an error
347
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Body must be a valid JSON', {
348
- itemIndex,
349
- });
282
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Request body must be valid JSON', { itemIndex });
350
283
  }
351
284
  }
352
285
  }
353
- // Get headers
354
- const headerParameters = this.getNodeParameter('headers', itemIndex, {});
355
- const headers = {};
356
- if (headerParameters.parameter) {
357
- for (const param of headerParameters.parameter) {
358
- headers[param.name] = param.value;
286
+ // Build headers
287
+ const headerParams = this.getNodeParameter('headers', itemIndex, {});
288
+ const headers = {
289
+ Authorization: `Bearer ${accessToken}`,
290
+ Accept: 'application/json',
291
+ };
292
+ if (['PATCH', 'POST', 'PUT'].includes(method)) {
293
+ headers['Content-Type'] = 'application/json';
294
+ }
295
+ // Add custom headers (can override defaults)
296
+ if (headerParams.parameter) {
297
+ for (const param of headerParams.parameter) {
298
+ if (param.name) {
299
+ headers[param.name] = param.value;
300
+ }
359
301
  }
360
302
  }
361
- // Get query parameters
362
- const queryParameters = this.getNodeParameter('queryParameters', itemIndex, {});
303
+ // Build query string
304
+ const queryParams = this.getNodeParameter('queryParameters', itemIndex, {});
363
305
  const qs = {};
364
- if (queryParameters.parameter) {
365
- for (const param of queryParameters.parameter) {
366
- qs[param.name] = param.value;
306
+ if (queryParams.parameter) {
307
+ for (const param of queryParams.parameter) {
308
+ if (param.name) {
309
+ qs[param.name] = param.value;
310
+ }
367
311
  }
368
312
  }
369
- // Add authorization header
370
- headers.Authorization = `Bearer ${accessToken}`;
371
- // Add Content-Type header if not present
372
- if (!headers['Content-Type'] && ['PATCH', 'POST', 'PUT'].includes(method)) {
373
- headers['Content-Type'] = 'application/json';
374
- }
375
- // Add Accept header if not present
376
- if (!headers.Accept) {
377
- headers.Accept = 'application/json';
378
- }
379
- // Execute the request with retry logic for rate limiting
313
+ // Execute request with retry logic
380
314
  let response;
381
- let retryCount = 0;
382
- let retryAfter = 0;
383
315
  let responseHeaders = {};
384
- const maxRetries = throttleSettings.limitRetries ? throttleSettings.maxRetries : Infinity;
385
- while (throttleSettings.enabled && retryCount <= maxRetries) {
316
+ let statusCode = 200;
317
+ let retryCount = 0;
318
+ let shouldRetry = true;
319
+ while (shouldRetry) {
320
+ shouldRetry = false;
386
321
  try {
387
- // If we need to retry, wait for the specified time
388
- if (retryCount > 0 && retryAfter > 0) {
389
- this.logger.info(`Rate limited by MS Graph API. Retrying after ${retryAfter} seconds (Attempt ${retryCount}/${maxRetries})`);
390
- await new Promise(resolve => setTimeout(resolve, retryAfter * 1000));
391
- }
392
- // Make the request
322
+ // When json:false, body must be stringified manually
323
+ const requestBody = body
324
+ ? (responseFormat === 'json' ? body : JSON.stringify(body))
325
+ : undefined;
393
326
  const requestOptions = {
394
327
  method,
395
328
  url,
396
329
  headers,
397
- qs,
398
- body,
330
+ qs: Object.keys(qs).length > 0 ? qs : undefined,
331
+ body: requestBody,
399
332
  json: responseFormat === 'json',
400
- timeout: options.timeout || 10000,
333
+ timeout,
401
334
  resolveWithFullResponse: true,
402
335
  };
403
- // Use any instead of the actual type because response.headers is not recognized in n8n types
404
336
  const fullResponse = await this.helpers.request(requestOptions);
405
337
  response = fullResponse.body;
406
338
  responseHeaders = fullResponse.headers || {};
407
- // No need to retry on success
408
- break;
339
+ statusCode = fullResponse.statusCode || 200;
409
340
  }
410
341
  catch (error) {
411
- responseHeaders = ((_a = error.response) === null || _a === void 0 ? void 0 : _a.headers) || {};
412
- // Check if this is a rate limiting error (HTTP 429)
413
- if (error.statusCode === 429 && retryCount < maxRetries) {
342
+ const err = error;
343
+ // Handle rate limiting (HTTP 429)
344
+ if (err.statusCode === 429 && handleRateLimiting && retryCount < maxRetries) {
414
345
  retryCount++;
415
- // Get the Retry-After header value and compile the expression if provided
416
- if (throttleSettings.retryAfterExpression) {
417
- try {
418
- // Evaluate the expression
419
- const expressionResult = this.getNodeParameter('handleThrottling.values.retryAfterExpression', itemIndex, 2);
420
- if (typeof expressionResult === 'number' || (typeof expressionResult === 'string' && !isNaN(Number(expressionResult)))) {
421
- retryAfter = Number(expressionResult);
422
- }
423
- else {
424
- // Default to exponential backoff if expression doesn't evaluate to a number
425
- retryAfter = Math.pow(2, retryCount);
426
- }
427
- }
428
- catch {
429
- // If expression evaluation fails, use fallback
430
- const headerRetryAfter = parseInt((responseHeaders === null || responseHeaders === void 0 ? void 0 : responseHeaders['retry-after']) || (responseHeaders === null || responseHeaders === void 0 ? void 0 : responseHeaders['Retry-After']) || '0', 10);
431
- retryAfter = headerRetryAfter || Math.pow(2, retryCount);
432
- }
433
- }
434
- else {
435
- // Use header value if no expression is provided
436
- const headerRetryAfter = parseInt((responseHeaders === null || responseHeaders === void 0 ? void 0 : responseHeaders['retry-after']) || (responseHeaders === null || responseHeaders === void 0 ? void 0 : responseHeaders['Retry-After']) || '0', 10);
437
- retryAfter = headerRetryAfter || Math.pow(2, retryCount);
438
- }
439
- // Continue to the next iteration which will wait and retry
346
+ // Case-insensitive header lookup for Retry-After
347
+ const responseHeaders = ((_b = err.response) === null || _b === void 0 ? void 0 : _b.headers) || {};
348
+ const retryAfterHeader = (_c = Object.entries(responseHeaders)
349
+ .find(([key]) => key.toLowerCase() === 'retry-after')) === null || _c === void 0 ? void 0 : _c[1];
350
+ const retryAfter = retryAfterHeader ? parseInt(String(retryAfterHeader), 10) : Math.pow(2, retryCount);
351
+ this.logger.info(`Rate limited by Microsoft Graph. Waiting ${retryAfter}s before retry ${retryCount}/${maxRetries}`);
352
+ await new Promise(resolve => setTimeout(resolve, retryAfter * 1000));
353
+ shouldRetry = true;
440
354
  continue;
441
355
  }
442
- // For other errors or if we've exhausted retries, throw the error
443
356
  throw error;
444
357
  }
445
358
  }
446
- // Process the response
447
- let responseData;
448
- if (responseFormat === 'json') {
449
- responseData = response;
450
- if (options.fullResponse === true) {
451
- responseData = {
452
- body: response,
453
- headers: responseHeaders,
454
- statusCode: 200,
455
- };
456
- }
359
+ // Format response
360
+ let outputData;
361
+ if (options.fullResponse) {
362
+ outputData = {
363
+ body: response,
364
+ headers: responseHeaders,
365
+ statusCode,
366
+ };
367
+ }
368
+ else if (responseFormat === 'string') {
369
+ outputData = { data: typeof response === 'object' ? JSON.stringify(response) : String(response) };
457
370
  }
458
371
  else {
459
- // String
460
- responseData = typeof response === 'object' ? JSON.stringify(response) : (response || '').toString();
461
- if (options.fullResponse === true) {
462
- responseData = {
463
- body: responseData,
464
- headers: responseHeaders,
465
- statusCode: 200,
466
- };
467
- }
372
+ outputData = response;
468
373
  }
469
- // Return the response data
470
- const newItem = {
471
- json: responseData,
472
- binary: {},
374
+ returnItems.push({
375
+ json: outputData,
473
376
  pairedItem: { item: itemIndex },
474
- };
475
- returnItems.push(newItem);
377
+ });
476
378
  }
477
379
  catch (error) {
478
- if (this.continueOnFail()) {
380
+ const err = error;
381
+ // Check if we should continue on error
382
+ const options = this.getNodeParameter('options', itemIndex, {});
383
+ if (options.continueOnError || this.continueOnFail()) {
479
384
  returnItems.push({
480
385
  json: {
481
- error: error.message,
482
- statusCode: error.statusCode,
386
+ error: err.message || 'Unknown error',
387
+ statusCode: err.statusCode,
483
388
  url: this.getNodeParameter('url', itemIndex),
484
389
  method: this.getNodeParameter('method', itemIndex),
485
- headers: ((_b = error.response) === null || _b === void 0 ? void 0 : _b.headers) || {},
486
- body: ((_c = error.response) === null || _c === void 0 ? void 0 : _c.body) || null,
390
+ responseHeaders: ((_d = err.response) === null || _d === void 0 ? void 0 : _d.headers) || {},
391
+ responseBody: ((_e = err.response) === null || _e === void 0 ? void 0 : _e.body) || null,
487
392
  },
488
- binary: {},
489
393
  pairedItem: { item: itemIndex },
490
394
  });
491
395
  continue;
492
396
  }
493
- throw error;
397
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), err.message || 'Request failed', {
398
+ itemIndex,
399
+ description: `Status: ${err.statusCode || 'unknown'}. Check that your app has the required Application permissions in Azure AD.`,
400
+ });
494
401
  }
495
402
  }
496
403
  return this.prepareOutputData(returnItems);
@@ -1 +1 @@
1
- {"version":3,"file":"MsGraph.node.js","sourceRoot":"","sources":["../../nodes/MsGraph.node.ts"],"names":[],"mappings":";;;AAAA,+CAMsB;AAEtB,MAAa,OAAO;IAApB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,iBAAiB;YAC9B,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,kBAAkB;YACxB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,sDAAsD;YAChE,WAAW,EAAE,0DAA0D;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EAAE,SAAS,EAAE,EAAE,CAAkC,CAAC;gBACjG,IAAI,OAAO,CAAC,eAAe,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;oBACtD,WAAW,CAAC,IAAI,CAAC;wBAChB,IAAI,EAAE;4BACL,KAAK,EAAE,GAAG,CAAC,OAAO,IAAI,eAAe;4BACrC,UAAU,EAAE,GAAG,CAAC,UAAU;4BAC1B,GAAG,EAAE,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,SAAS,CAAW;4BACtD,MAAM,EAAE,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,SAAS,CAAW;4BAC5D,eAAe,EAAE,CAAA,MAAA,GAAG,CAAC,QAAQ,0CAAE,OAAO,KAAI,EAAE;4BAC5C,YAAY,EAAE,CAAA,MAAA,GAAG,CAAC,QAAQ,0CAAE,IAAI,KAAI,IAAI;yBACxC;wBACD,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;qBAC/B,CAAC,CAAC;oBACH,SAAS;gBACV,CAAC;gBAED,MAAM,IAAI,iCAAkB,CAC3B,IAAI,CAAC,OAAO,EAAE,EACd,GAAG,CAAC,OAAO,IAAI,gBAAgB,EAC/B;oBACC,SAAS;oBACT,WAAW,EAAE,WAAW,GAAG,CAAC,UAAU,IAAI,SAAS,6EAA6E;iBAChI,CACD,CAAC;YACH,CAAC;QACF,CAAC;QAED,OAAO,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;IAC5C,CAAC;CACD;AAjcD,0BAicC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@advenimuss/n8n-nodes-msgraph",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "n8n node for Microsoft Graph API with retry handling",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",
@@ -22,7 +22,7 @@
22
22
  "main": "index.js",
23
23
  "type": "commonjs",
24
24
  "scripts": {
25
- "build": "tsc",
25
+ "build": "tsc && cp nodes/*.svg dist/nodes/",
26
26
  "dev": "tsc --watch",
27
27
  "format": "prettier --write .",
28
28
  "lint": "eslint nodes credentials --ext .ts",
@@ -48,11 +48,11 @@
48
48
  "@typescript-eslint/eslint-plugin": "^8.26.1",
49
49
  "@typescript-eslint/parser": "^8.26.1",
50
50
  "eslint": "^8.57.1",
51
- "eslint-plugin-n8n-nodes-base": "^1.16.1"
51
+ "eslint-plugin-n8n-nodes-base": "^1.16.1",
52
+ "typescript": "^5.3.0"
52
53
  },
53
- "dependencies": {
54
+ "peerDependencies": {
54
55
  "n8n-core": "^1.0.0",
55
- "n8n-workflow": "^1.0.0",
56
- "typescript": "^4.9.0"
56
+ "n8n-workflow": "^1.0.0"
57
57
  }
58
58
  }
File without changes