n8n-nodes-base 1.76.0 → 1.77.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.
Files changed (95) hide show
  1. package/dist/build.tsbuildinfo +1 -1
  2. package/dist/credentials/GoogleChatOAuth2Api.credentials.d.ts +8 -0
  3. package/dist/credentials/GoogleChatOAuth2Api.credentials.js +26 -0
  4. package/dist/credentials/GoogleChatOAuth2Api.credentials.js.map +1 -0
  5. package/dist/known/credentials.json +10 -0
  6. package/dist/nodes/ActiveCampaign/__schema__/v1.0.0/account/get.json +110 -0
  7. package/dist/nodes/EmailSend/v2/EmailSendV2.node.d.ts +5 -2
  8. package/dist/nodes/EmailSend/v2/EmailSendV2.node.js +25 -6
  9. package/dist/nodes/EmailSend/v2/EmailSendV2.node.js.map +1 -1
  10. package/dist/nodes/EmailSend/v2/descriptions.d.ts +3 -0
  11. package/dist/nodes/EmailSend/v2/descriptions.js +22 -0
  12. package/dist/nodes/EmailSend/v2/descriptions.js.map +1 -0
  13. package/dist/nodes/EmailSend/v2/send.operation.d.ts +1 -2
  14. package/dist/nodes/EmailSend/v2/send.operation.js +8 -69
  15. package/dist/nodes/EmailSend/v2/send.operation.js.map +1 -1
  16. package/dist/nodes/EmailSend/v2/sendAndWait.operation.d.ts +3 -0
  17. package/dist/nodes/EmailSend/v2/sendAndWait.operation.js +33 -0
  18. package/dist/nodes/EmailSend/v2/sendAndWait.operation.js.map +1 -0
  19. package/dist/nodes/EmailSend/v2/utils.d.ts +12 -0
  20. package/dist/nodes/EmailSend/v2/utils.js +51 -0
  21. package/dist/nodes/EmailSend/v2/utils.js.map +1 -0
  22. package/dist/nodes/ExecuteWorkflow/ExecuteWorkflow/ExecuteWorkflow.node.d.ts +2 -4
  23. package/dist/nodes/ExecuteWorkflow/ExecuteWorkflow/ExecuteWorkflow.node.js +5 -6
  24. package/dist/nodes/ExecuteWorkflow/ExecuteWorkflow/ExecuteWorkflow.node.js.map +1 -1
  25. package/dist/nodes/ExecuteWorkflow/ExecuteWorkflow/ExecuteWorkflow.node.json +1 -1
  26. package/dist/nodes/ExecuteWorkflow/ExecuteWorkflow/methods/index.d.ts +1 -0
  27. package/dist/nodes/ExecuteWorkflow/ExecuteWorkflow/methods/index.js +38 -0
  28. package/dist/nodes/ExecuteWorkflow/ExecuteWorkflow/methods/index.js.map +1 -0
  29. package/dist/nodes/ExecuteWorkflow/ExecuteWorkflow/methods/localResourceMapping.d.ts +2 -0
  30. package/dist/nodes/ExecuteWorkflow/ExecuteWorkflow/methods/localResourceMapping.js +23 -0
  31. package/dist/nodes/ExecuteWorkflow/ExecuteWorkflow/methods/localResourceMapping.js.map +1 -0
  32. package/dist/nodes/ExecuteWorkflow/ExecuteWorkflowTrigger/ExecuteWorkflowTrigger.node.js +9 -9
  33. package/dist/nodes/ExecuteWorkflow/ExecuteWorkflowTrigger/ExecuteWorkflowTrigger.node.js.map +1 -1
  34. package/dist/nodes/ExecutionData/ExecutionData.node.js +16 -0
  35. package/dist/nodes/ExecutionData/ExecutionData.node.js.map +1 -1
  36. package/dist/nodes/Form/common.descriptions.d.ts +1 -0
  37. package/dist/nodes/Form/common.descriptions.js +50 -5
  38. package/dist/nodes/Form/common.descriptions.js.map +1 -1
  39. package/dist/nodes/Form/utils.d.ts +1 -0
  40. package/dist/nodes/Form/utils.js +27 -2
  41. package/dist/nodes/Form/utils.js.map +1 -1
  42. package/dist/nodes/Google/Calendar/GoogleCalendar.node.js.map +1 -1
  43. package/dist/nodes/Google/Chat/GenericFunctions.d.ts +4 -1
  44. package/dist/nodes/Google/Chat/GenericFunctions.js +34 -9
  45. package/dist/nodes/Google/Chat/GenericFunctions.js.map +1 -1
  46. package/dist/nodes/Google/Chat/GoogleChat.node.d.ts +2 -0
  47. package/dist/nodes/Google/Chat/GoogleChat.node.js +47 -0
  48. package/dist/nodes/Google/Chat/GoogleChat.node.js.map +1 -1
  49. package/dist/nodes/Google/Chat/GoogleChat.node.json +4 -1
  50. package/dist/nodes/Google/Chat/descriptions/MessageDescription.d.ts +2 -1
  51. package/dist/nodes/Google/Chat/descriptions/MessageDescription.js +20 -10
  52. package/dist/nodes/Google/Chat/descriptions/MessageDescription.js.map +1 -1
  53. package/dist/nodes/Google/Chat/googleChat.svg +19 -1
  54. package/dist/nodes/Google/Gmail/v2/GmailV2.node.js +4 -21
  55. package/dist/nodes/Google/Gmail/v2/GmailV2.node.js.map +1 -1
  56. package/dist/nodes/HttpRequest/test/node/workflow.pagination.json +10 -10
  57. package/dist/nodes/Microsoft/Outlook/v2/MicrosoftOutlookV2.node.d.ts +2 -0
  58. package/dist/nodes/Microsoft/Outlook/v2/MicrosoftOutlookV2.node.js +2 -0
  59. package/dist/nodes/Microsoft/Outlook/v2/MicrosoftOutlookV2.node.js.map +1 -1
  60. package/dist/nodes/Microsoft/Outlook/v2/actions/message/index.d.ts +3 -2
  61. package/dist/nodes/Microsoft/Outlook/v2/actions/message/index.js +11 -1
  62. package/dist/nodes/Microsoft/Outlook/v2/actions/message/index.js.map +1 -1
  63. package/dist/nodes/Microsoft/Outlook/v2/actions/message/sendAndWait.operation.d.ts +3 -0
  64. package/dist/nodes/Microsoft/Outlook/v2/actions/message/sendAndWait.operation.js +39 -0
  65. package/dist/nodes/Microsoft/Outlook/v2/actions/message/sendAndWait.operation.js.map +1 -0
  66. package/dist/nodes/Microsoft/Outlook/v2/actions/node.description.js +2 -0
  67. package/dist/nodes/Microsoft/Outlook/v2/actions/node.description.js.map +1 -1
  68. package/dist/nodes/Microsoft/Outlook/v2/actions/node.type.d.ts +1 -1
  69. package/dist/nodes/Microsoft/Outlook/v2/actions/router.js +8 -0
  70. package/dist/nodes/Microsoft/Outlook/v2/actions/router.js.map +1 -1
  71. package/dist/nodes/Slack/V2/SlackV2.node.js +4 -21
  72. package/dist/nodes/Slack/V2/SlackV2.node.js.map +1 -1
  73. package/dist/nodes/Telegram/GenericFunctions.d.ts +12 -0
  74. package/dist/nodes/Telegram/GenericFunctions.js +28 -0
  75. package/dist/nodes/Telegram/GenericFunctions.js.map +1 -1
  76. package/dist/nodes/Telegram/Telegram.node.d.ts +2 -0
  77. package/dist/nodes/Telegram/Telegram.node.js +31 -0
  78. package/dist/nodes/Telegram/Telegram.node.js.map +1 -1
  79. package/dist/nodes/Transform/Summarize/Summarize.node.js +24 -18
  80. package/dist/nodes/Transform/Summarize/Summarize.node.js.map +1 -1
  81. package/dist/nodes/Transform/Summarize/test/workflow.summarize_hint.json +70 -0
  82. package/dist/nodes/Transform/Summarize/utils.js +7 -7
  83. package/dist/nodes/Transform/Summarize/utils.js.map +1 -1
  84. package/dist/types/credentials.json +1 -0
  85. package/dist/types/nodes.json +15 -15
  86. package/dist/utils/sendAndWait/descriptions.d.ts +2 -0
  87. package/dist/utils/sendAndWait/descriptions.js +24 -0
  88. package/dist/utils/sendAndWait/descriptions.js.map +1 -0
  89. package/dist/utils/sendAndWait/utils.d.ts +7 -1
  90. package/dist/utils/sendAndWait/utils.js +214 -67
  91. package/dist/utils/sendAndWait/utils.js.map +1 -1
  92. package/dist/utils/workflowInputsResourceMapping/GenericFunctions.d.ts +7 -3
  93. package/dist/utils/workflowInputsResourceMapping/GenericFunctions.js +9 -3
  94. package/dist/utils/workflowInputsResourceMapping/GenericFunctions.js.map +1 -1
  95. package/package.json +7 -6
@@ -0,0 +1,8 @@
1
+ import type { ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class GoogleChatOAuth2Api implements ICredentialType {
3
+ name: string;
4
+ extends: string[];
5
+ displayName: string;
6
+ documentationUrl: string;
7
+ properties: INodeProperties[];
8
+ }
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GoogleChatOAuth2Api = void 0;
4
+ const scopes = [
5
+ 'https://www.googleapis.com/auth/chat.spaces',
6
+ 'https://www.googleapis.com/auth/chat.messages',
7
+ 'https://www.googleapis.com/auth/chat.memberships',
8
+ ];
9
+ class GoogleChatOAuth2Api {
10
+ constructor() {
11
+ this.name = 'googleChatOAuth2Api';
12
+ this.extends = ['googleOAuth2Api'];
13
+ this.displayName = 'Chat OAuth2 API';
14
+ this.documentationUrl = 'google/oauth-single-service';
15
+ this.properties = [
16
+ {
17
+ displayName: 'Scope',
18
+ name: 'scope',
19
+ type: 'hidden',
20
+ default: scopes.join(' '),
21
+ },
22
+ ];
23
+ }
24
+ }
25
+ exports.GoogleChatOAuth2Api = GoogleChatOAuth2Api;
26
+ //# sourceMappingURL=GoogleChatOAuth2Api.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GoogleChatOAuth2Api.credentials.js","sourceRoot":"","sources":["../../credentials/GoogleChatOAuth2Api.credentials.ts"],"names":[],"mappings":";;;AAEA,MAAM,MAAM,GAAG;IACd,6CAA6C;IAC7C,+CAA+C;IAC/C,kDAAkD;CAClD,CAAC;AAEF,MAAa,mBAAmB;IAAhC;QACC,SAAI,GAAG,qBAAqB,CAAC;QAE7B,YAAO,GAAG,CAAC,iBAAiB,CAAC,CAAC;QAE9B,gBAAW,GAAG,iBAAiB,CAAC;QAEhC,qBAAgB,GAAG,6BAA6B,CAAC;QAEjD,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;aACzB;SACD,CAAC;IACH,CAAC;CAAA;AAjBD,kDAiBC"}
@@ -870,6 +870,16 @@
870
870
  "googleCalendarTrigger"
871
871
  ]
872
872
  },
873
+ "googleChatOAuth2Api": {
874
+ "className": "GoogleChatOAuth2Api",
875
+ "sourcePath": "dist/credentials/GoogleChatOAuth2Api.credentials.js",
876
+ "extends": [
877
+ "googleOAuth2Api"
878
+ ],
879
+ "supportedNodes": [
880
+ "googleChat"
881
+ ]
882
+ },
873
883
  "googleCloudNaturalLanguageOAuth2Api": {
874
884
  "className": "GoogleCloudNaturalLanguageOAuth2Api",
875
885
  "sourcePath": "dist/credentials/GoogleCloudNaturalLanguageOAuth2Api.credentials.js",
@@ -0,0 +1,110 @@
1
+ {
2
+ "type": "object",
3
+ "value": [
4
+ {
5
+ "key": "account",
6
+ "type": "Object",
7
+ "value": [
8
+ {
9
+ "key": "accountUrl",
10
+ "type": "string",
11
+ "value": "",
12
+ "path": ".account.accountUrl"
13
+ },
14
+ {
15
+ "key": "createdTimestamp",
16
+ "type": "string",
17
+ "value": "",
18
+ "path": ".account.createdTimestamp"
19
+ },
20
+ {
21
+ "key": "id",
22
+ "type": "string",
23
+ "value": "",
24
+ "path": ".account.id"
25
+ },
26
+ {
27
+ "key": "links",
28
+ "type": "Object",
29
+ "value": [
30
+ {
31
+ "key": "accountContacts",
32
+ "type": "string",
33
+ "value": "",
34
+ "path": ".account.links.accountContacts"
35
+ },
36
+ {
37
+ "key": "accountCustomFieldData",
38
+ "type": "string",
39
+ "value": "",
40
+ "path": ".account.links.accountCustomFieldData"
41
+ },
42
+ {
43
+ "key": "contactEmails",
44
+ "type": "string",
45
+ "value": "",
46
+ "path": ".account.links.contactEmails"
47
+ },
48
+ {
49
+ "key": "emailActivities",
50
+ "type": "string",
51
+ "value": "",
52
+ "path": ".account.links.emailActivities"
53
+ },
54
+ {
55
+ "key": "notes",
56
+ "type": "string",
57
+ "value": "",
58
+ "path": ".account.links.notes"
59
+ },
60
+ {
61
+ "key": "owner",
62
+ "type": "string",
63
+ "value": "",
64
+ "path": ".account.links.owner"
65
+ },
66
+ {
67
+ "key": "required",
68
+ "type": "string",
69
+ "value": "",
70
+ "path": ".account.links.required"
71
+ }
72
+ ],
73
+ "path": ".account.links"
74
+ },
75
+ {
76
+ "key": "name",
77
+ "type": "string",
78
+ "value": "",
79
+ "path": ".account.name"
80
+ },
81
+ {
82
+ "key": "owner",
83
+ "type": "string",
84
+ "value": "",
85
+ "path": ".account.owner"
86
+ },
87
+ {
88
+ "key": "updatedTimestamp",
89
+ "type": "string",
90
+ "value": "",
91
+ "path": ".account.updatedTimestamp"
92
+ },
93
+ {
94
+ "key": "required",
95
+ "type": "string",
96
+ "value": "",
97
+ "path": ".account.required"
98
+ }
99
+ ],
100
+ "path": ".account"
101
+ },
102
+ {
103
+ "key": "required",
104
+ "type": "string",
105
+ "value": "",
106
+ "path": ".required"
107
+ }
108
+ ],
109
+ "path": ""
110
+ }
@@ -1,12 +1,15 @@
1
1
  import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeBaseDescription, INodeTypeDescription } from 'n8n-workflow';
2
- import * as send from './send.operation';
2
+ import { smtpConnectionTest } from './utils';
3
+ import { sendAndWaitWebhook } from '../../../utils/sendAndWait/utils';
4
+ export declare const versionDescription: INodeTypeDescription;
3
5
  export declare class EmailSendV2 implements INodeType {
4
6
  description: INodeTypeDescription;
5
7
  constructor(baseDescription: INodeTypeBaseDescription);
6
8
  methods: {
7
9
  credentialTest: {
8
- smtpConnectionTest: typeof send.smtpConnectionTest;
10
+ smtpConnectionTest: typeof smtpConnectionTest;
9
11
  };
10
12
  };
13
+ webhook: typeof sendAndWaitWebhook;
11
14
  execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
12
15
  }
@@ -33,9 +33,14 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.EmailSendV2 = void 0;
36
+ exports.EmailSendV2 = exports.versionDescription = void 0;
37
+ const n8n_workflow_1 = require("n8n-workflow");
37
38
  const send = __importStar(require("./send.operation"));
38
- const versionDescription = {
39
+ const sendAndWait = __importStar(require("./sendAndWait.operation"));
40
+ const utils_1 = require("./utils");
41
+ const descriptions_1 = require("../../../utils/sendAndWait/descriptions");
42
+ const utils_2 = require("../../../utils/sendAndWait/utils");
43
+ exports.versionDescription = {
39
44
  displayName: 'Send Email',
40
45
  name: 'emailSend',
41
46
  icon: 'fa:envelope',
@@ -56,6 +61,7 @@ const versionDescription = {
56
61
  testedBy: 'smtpConnectionTest',
57
62
  },
58
63
  ],
64
+ webhooks: descriptions_1.sendAndWaitWebhooksDescription,
59
65
  properties: [
60
66
  {
61
67
  displayName: 'Resource',
@@ -73,7 +79,7 @@ const versionDescription = {
73
79
  {
74
80
  displayName: 'Operation',
75
81
  name: 'operation',
76
- type: 'hidden',
82
+ type: 'options',
77
83
  noDataExpression: true,
78
84
  default: 'send',
79
85
  options: [
@@ -82,24 +88,37 @@ const versionDescription = {
82
88
  value: 'send',
83
89
  action: 'Send an Email',
84
90
  },
91
+ {
92
+ name: 'Send and Wait for Response',
93
+ value: n8n_workflow_1.SEND_AND_WAIT_OPERATION,
94
+ action: 'Send message and wait for response',
95
+ },
85
96
  ],
86
97
  },
87
98
  ...send.description,
99
+ ...sendAndWait.description,
88
100
  ],
89
101
  };
90
102
  class EmailSendV2 {
91
103
  constructor(baseDescription) {
92
104
  this.methods = {
93
- credentialTest: { smtpConnectionTest: send.smtpConnectionTest },
105
+ credentialTest: { smtpConnectionTest: utils_1.smtpConnectionTest },
94
106
  };
107
+ this.webhook = utils_2.sendAndWaitWebhook;
95
108
  this.description = {
96
109
  ...baseDescription,
97
- ...versionDescription,
110
+ ...exports.versionDescription,
98
111
  };
99
112
  }
100
113
  async execute() {
101
114
  let returnData = [];
102
- returnData = await send.execute.call(this);
115
+ const operation = this.getNodeParameter('operation', 0);
116
+ if (operation === n8n_workflow_1.SEND_AND_WAIT_OPERATION) {
117
+ returnData = await sendAndWait.execute.call(this);
118
+ }
119
+ if (operation === 'send') {
120
+ returnData = await send.execute.call(this);
121
+ }
103
122
  return returnData;
104
123
  }
105
124
  }
@@ -1 +1 @@
1
- {"version":3,"file":"EmailSendV2.node.js","sourceRoot":"","sources":["../../../../nodes/EmailSend/v2/EmailSendV2.node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,uDAAyC;AAEzC,MAAM,kBAAkB,GAAyB;IAChD,WAAW,EAAE,YAAY;IACzB,IAAI,EAAE,WAAW;IACjB,IAA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C,IAAI,CAAC,IAAI,CAAC,CAAC;QAE3C,OAAO,UAAU,CAAC;IACnB,CAAC;CACD;AArBD,kCAqBC"}
1
+ {"version":3,"file":"EmailSendV2.node.js","sourceRoot":"","sources":["../../../../nodes/EmailSend/v2/EmailSendV2.node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,+CAA2E;AAE3E,uDAAyC;AACzC,qEAAuD;AACvD,mCAA6C;AAC7C,0EAAyF;AACzF,4DAAsE;AAEzD,QAAA,kBAAkB,GAAyB;IACvD,WAAW,EAAE,YAAY;IACzB,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,CAAC,QAAQ,CAAC;IACjB,OAAO,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC;IACjB,WAAW,EAAE,oCAAoC;IACjD,QAAQ,EAAE;QACT,IAAI,EAAE,YAAY;QAClB,KAAK,EAAE,SAAS;KAChB;IACD,MAAM,EAAE,QAAyB;IACjC,OAAO,EAAE,QAAyB;IAClC,YAAY,EAAE,IAAI;IAClB,WAAW,EAAE;QACZ;YACC,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,IAAI;YACd,QAAQ,EAAE,oBAAoB;SAC9B;KACD;IACD,QAAQ,EAAE,6CAA8B;IACxC,UAAU,EAAE;QACX;YACC,WAAW,EAAE,UAAU;YACvB,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,QAAQ;YACd,gBAAgB,EAAE,IAAI;YACtB,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE;gBACR;oBACC,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,OAAO;iBACd;aACD;SACD;QACD;YACC,WAAW,EAAE,WAAW;YACxB,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,SAAS;YACf,gBAAgB,EAAE,IAAI;YACtB,OAAO,EAAE,MAAM;YACf,OAAO,EAAE;gBACR;oBACC,IAAI,EAAE,MAAM;oBACZ,KAAK,EAAE,MAAM;oBACb,MAAM,EAAE,eAAe;iBACvB;gBACD;oBACC,IAAI,EAAE,4BAA4B;oBAClC,KAAK,EAAE,sCAAuB;oBAC9B,MAAM,EAAE,oCAAoC;iBAC5C;aACD;SACD;QACD,GAAG,IAAI,CAAC,WAAW;QACnB,GAAG,WAAW,CAAC,WAAW;KAC1B;CACD,CAAC;AAEF,MAAa,WAAW;IAGvB,YAAY,eAAyC;QAOrD,YAAO,GAAG;YACT,cAAc,EAAE,EAAE,kBAAkB,EAAlB,0BAAkB,EAAE;SACtC,CAAC;QAEF,YAAO,GAAG,0BAAkB,CAAC;QAV5B,IAAI,CAAC,WAAW,GAAG;YAClB,GAAG,eAAe;YAClB,GAAG,0BAAkB;SACrB,CAAC;IACH,CAAC;IAQD,KAAK,CAAC,OAAO;QACZ,IAAI,UAAU,GAA2B,EAAE,CAAC;QAC5C,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;QAExD,IAAI,SAAS,KAAK,sCAAuB,EAAE,CAAC;YAC3C,UAAU,GAAG,MAAM,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnD,CAAC;QAED,IAAI,SAAS,KAAK,MAAM,EAAE,CAAC;YAC1B,UAAU,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5C,CAAC;QAED,OAAO,UAAU,CAAC;IACnB,CAAC;CACD;AA9BD,kCA8BC"}
@@ -0,0 +1,3 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const fromEmailProperty: INodeProperties;
3
+ export declare const toEmailProperty: INodeProperties;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toEmailProperty = exports.fromEmailProperty = void 0;
4
+ exports.fromEmailProperty = {
5
+ displayName: 'From Email',
6
+ name: 'fromEmail',
7
+ type: 'string',
8
+ default: '',
9
+ required: true,
10
+ placeholder: 'admin@example.com',
11
+ description: 'Email address of the sender. You can also specify a name: Nathan Doe &lt;nate@n8n.io&gt;.',
12
+ };
13
+ exports.toEmailProperty = {
14
+ displayName: 'To Email',
15
+ name: 'toEmail',
16
+ type: 'string',
17
+ default: '',
18
+ required: true,
19
+ placeholder: 'info@example.com',
20
+ description: 'Email address of the recipient. You can also specify a name: Nathan Doe &lt;nate@n8n.io&gt;.',
21
+ };
22
+ //# sourceMappingURL=descriptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"descriptions.js","sourceRoot":"","sources":["../../../../nodes/EmailSend/v2/descriptions.ts"],"names":[],"mappings":";;;AAEa,QAAA,iBAAiB,GAAoB;IACjD,WAAW,EAAE,YAAY;IACzB,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,EAAE;IACX,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,mBAAmB;IAChC,WAAW,EACV,2FAA2F;CAC5F,CAAC;AAEW,QAAA,eAAe,GAAoB;IAC/C,WAAW,EAAE,UAAU;IACvB,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,EAAE;IACX,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EACV,8FAA8F;CAC/F,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { ICredentialsDecrypted, ICredentialTestFunctions, IExecuteFunctions, INodeCredentialTestResult, INodeExecutionData, INodeProperties } from 'n8n-workflow';
1
+ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
2
2
  export declare const description: {
3
3
  displayOptions: import("n8n-workflow").IDisplayOptions;
4
4
  displayName: string;
@@ -23,5 +23,4 @@ export declare const description: {
23
23
  validateType?: import("n8n-workflow").FieldType;
24
24
  ignoreValidationDuringExecution?: boolean;
25
25
  }[];
26
- export declare function smtpConnectionTest(this: ICredentialTestFunctions, credential: ICredentialsDecrypted): Promise<INodeCredentialTestResult>;
27
26
  export declare function execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
@@ -1,31 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.description = void 0;
4
- exports.smtpConnectionTest = smtpConnectionTest;
5
4
  exports.execute = execute;
6
5
  const n8n_workflow_1 = require("n8n-workflow");
7
- const nodemailer_1 = require("nodemailer");
8
6
  const utilities_1 = require("../../../utils/utilities");
9
- const descriptions_1 = require("../../../utils/descriptions");
7
+ const descriptions_1 = require("./descriptions");
8
+ const utils_1 = require("./utils");
9
+ const descriptions_2 = require("../../../utils/descriptions");
10
10
  const properties = [
11
- {
12
- displayName: 'From Email',
13
- name: 'fromEmail',
14
- type: 'string',
15
- default: '',
16
- required: true,
17
- placeholder: 'admin@example.com',
18
- description: 'Email address of the sender. You can also specify a name: Nathan Doe &lt;nate@n8n.io&gt;.',
19
- },
20
- {
21
- displayName: 'To Email',
22
- name: 'toEmail',
23
- type: 'string',
24
- default: '',
25
- required: true,
26
- placeholder: 'info@example.com',
27
- description: 'Email address of the recipient. You can also specify a name: Nathan Doe &lt;nate@n8n.io&gt;.',
28
- },
11
+ descriptions_1.fromEmailProperty,
12
+ descriptions_1.toEmailProperty,
29
13
  {
30
14
  displayName: 'Subject',
31
15
  name: 'subject',
@@ -125,7 +109,7 @@ const properties = [
125
109
  default: {},
126
110
  options: [
127
111
  {
128
- ...descriptions_1.appendAttributionOption,
112
+ ...descriptions_2.appendAttributionOption,
129
113
  description: 'Whether to include the phrase “This email was sent automatically with n8n” to the end of the email',
130
114
  },
131
115
  {
@@ -176,55 +160,11 @@ const displayOptions = {
176
160
  },
177
161
  };
178
162
  exports.description = (0, utilities_1.updateDisplayOptions)(displayOptions, properties);
179
- function configureTransport(credentials, options) {
180
- const connectionOptions = {
181
- host: credentials.host,
182
- port: credentials.port,
183
- secure: credentials.secure,
184
- };
185
- if (credentials.secure === false) {
186
- connectionOptions.ignoreTLS = credentials.disableStartTls;
187
- }
188
- if (typeof credentials.hostName === 'string' && credentials.hostName) {
189
- connectionOptions.name = credentials.hostName;
190
- }
191
- if (credentials.user || credentials.password) {
192
- connectionOptions.auth = {
193
- user: credentials.user,
194
- pass: credentials.password,
195
- };
196
- }
197
- if (options.allowUnauthorizedCerts === true) {
198
- connectionOptions.tls = {
199
- rejectUnauthorized: false,
200
- };
201
- }
202
- return (0, nodemailer_1.createTransport)(connectionOptions);
203
- }
204
- async function smtpConnectionTest(credential) {
205
- const credentials = credential.data;
206
- const transporter = configureTransport(credentials, {});
207
- try {
208
- await transporter.verify();
209
- return {
210
- status: 'OK',
211
- message: 'Connection successful!',
212
- };
213
- }
214
- catch (error) {
215
- return {
216
- status: 'Error',
217
- message: error.message,
218
- };
219
- }
220
- finally {
221
- transporter.close();
222
- }
223
- }
224
163
  async function execute() {
225
164
  const items = this.getInputData();
226
165
  const nodeVersion = this.getNode().typeVersion;
227
166
  const instanceId = this.getInstanceId();
167
+ const credentials = await this.getCredentials('smtp');
228
168
  const returnData = [];
229
169
  let item;
230
170
  for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
@@ -235,8 +175,7 @@ async function execute() {
235
175
  const subject = this.getNodeParameter('subject', itemIndex);
236
176
  const emailFormat = this.getNodeParameter('emailFormat', itemIndex);
237
177
  const options = this.getNodeParameter('options', itemIndex, {});
238
- const credentials = await this.getCredentials('smtp');
239
- const transporter = configureTransport(credentials, options);
178
+ const transporter = (0, utils_1.configureTransport)(credentials, options);
240
179
  const mailOptions = {
241
180
  from: fromEmail,
242
181
  to: toEmail,
@@ -1 +1 @@
1
- {"version":3,"file":"send.operation.js","sourceRoot":"","sources":["../../../../nodes/EmailSend/v2/send.operation.ts"],"names":[],"mappings":";;;AA4OA,gDAoBC;AAED,0BA+GC;AAvWD,+CAA4C;AAC5C,2CAA6C;AAG7C,gDAAwD;AAExD,8DAAsE;AAEtE,MAAM,UAAU,GAAsB;IAErC;QACC,WAAW,E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AAY;qBACjB,CAAC,CAAC;gBACJ,CAAC;gBAED,IAAI,WAAW,CAAC,MAAM,EAAE,CAAC;oBACxB,WAAW,CAAC,WAAW,GAAG,WAAW,CAAC;gBACvC,CAAC;YACF,CAAC;YAED,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;YAErD,UAAU,CAAC,IAAI,CAAC;gBACf,IAAI,EAAE,IAA8B;gBACpC,UAAU,EAAE;oBACX,IAAI,EAAE,SAAS;iBACf;aACD,CAAC,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;gBAC3B,UAAU,CAAC,IAAI,CAAC;oBACf,IAAI,EAAE;wBACL,KAAK,EAAE,KAAK,CAAC,OAAO;qBACpB;oBACD,UAAU,EAAE;wBACX,IAAI,EAAE,SAAS;qBACf;iBACD,CAAC,CAAC;gBACH,SAAS;YACV,CAAC;YACD,OAAO,KAAK,CAAC,IAAI,CAAC;YAClB,MAAM,IAAI,2BAAY,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAmB,CAAC,CAAC;QAC7D,CAAC;IACF,CAAC;IAED,OAAO,CAAC,UAAU,CAAC,CAAC;AACrB,CAAC"}
1
+ {"version":3,"file":"send.operation.js","sourceRoot":"","sources":["../../../../nodes/EmailSend/v2/send.operation.ts"],"names":[],"mappings":";;;AA+KA,0BA8GC;AAtRD,+CAA4C;AAE5C,gDAAwD;AAExD,iDAAoE;AACpE,mCAAoE;AACpE,8DAAsE;AAEtE,MAAM,UAAU,GAAsB;IAErC,gCAAiB;IACjB,8BAAe;IAEf;QACC,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,iBAAiB;QAC9B,WAAW,EAAE,2BAA2B;KACxC;IACD;QACC,WAAW,EAAE,cAAc;QAC3B,IAA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IAAI,CAAC,OAAO,EAAE,EAAE,KAAmB,CAAC,CAAC;QAC7D,CAAC;IACF,CAAC;IAED,OAAO,CAAC,UAAU,CAAC,CAAC;AACrB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
2
+ export declare const description: INodeProperties[];
3
+ export declare function execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.description = void 0;
4
+ exports.execute = execute;
5
+ const descriptions_1 = require("./descriptions");
6
+ const utils_1 = require("./utils");
7
+ const email_templates_1 = require("../../../utils/sendAndWait/email-templates");
8
+ const utils_2 = require("../../../utils/sendAndWait/utils");
9
+ exports.description = (0, utils_2.getSendAndWaitProperties)([descriptions_1.fromEmailProperty, descriptions_1.toEmailProperty], 'email');
10
+ async function execute() {
11
+ const fromEmail = this.getNodeParameter('fromEmail', 0);
12
+ const toEmail = this.getNodeParameter('toEmail', 0);
13
+ const config = (0, utils_2.getSendAndWaitConfig)(this);
14
+ const buttons = [];
15
+ for (const option of config.options) {
16
+ buttons.push((0, utils_2.createButton)(config.url, option.label, option.value, option.style));
17
+ }
18
+ const instanceId = this.getInstanceId();
19
+ const htmlBody = (0, email_templates_1.createEmailBody)(config.message, buttons.join('\n'), instanceId);
20
+ const mailOptions = {
21
+ from: fromEmail,
22
+ to: toEmail,
23
+ subject: config.title,
24
+ html: htmlBody,
25
+ };
26
+ const credentials = await this.getCredentials('smtp');
27
+ const transporter = (0, utils_1.configureTransport)(credentials, {});
28
+ await transporter.sendMail(mailOptions);
29
+ const waitTill = (0, utils_2.configureWaitTillDate)(this);
30
+ await this.putExecutionToWait(waitTill);
31
+ return [this.getInputData()];
32
+ }
33
+ //# sourceMappingURL=sendAndWait.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sendAndWait.operation.js","sourceRoot":"","sources":["../../../../n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AAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IAExC,MAAM,QAAQ,GAAG,IAAA,6BAAqB,EAAC,IAAI,CAAC,CAAC;IAE7C,MAAM,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACxC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;AAC9B,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { IDataObject, ICredentialsDecrypted, ICredentialTestFunctions, INodeCredentialTestResult } from 'n8n-workflow';
2
+ import type SMTPTransport from 'nodemailer/lib/smtp-transport';
3
+ export type EmailSendOptions = {
4
+ appendAttribution?: boolean;
5
+ allowUnauthorizedCerts?: boolean;
6
+ attachments?: string;
7
+ ccEmail?: string;
8
+ bccEmail?: string;
9
+ replyTo?: string;
10
+ };
11
+ export declare function configureTransport(credentials: IDataObject, options: EmailSendOptions): import("nodemailer").Transporter<SMTPTransport.SentMessageInfo>;
12
+ export declare function smtpConnectionTest(this: ICredentialTestFunctions, credential: ICredentialsDecrypted): Promise<INodeCredentialTestResult>;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.configureTransport = configureTransport;
4
+ exports.smtpConnectionTest = smtpConnectionTest;
5
+ const nodemailer_1 = require("nodemailer");
6
+ function configureTransport(credentials, options) {
7
+ const connectionOptions = {
8
+ host: credentials.host,
9
+ port: credentials.port,
10
+ secure: credentials.secure,
11
+ };
12
+ if (credentials.secure === false) {
13
+ connectionOptions.ignoreTLS = credentials.disableStartTls;
14
+ }
15
+ if (typeof credentials.hostName === 'string' && credentials.hostName) {
16
+ connectionOptions.name = credentials.hostName;
17
+ }
18
+ if (credentials.user || credentials.password) {
19
+ connectionOptions.auth = {
20
+ user: credentials.user,
21
+ pass: credentials.password,
22
+ };
23
+ }
24
+ if (options.allowUnauthorizedCerts === true) {
25
+ connectionOptions.tls = {
26
+ rejectUnauthorized: false,
27
+ };
28
+ }
29
+ return (0, nodemailer_1.createTransport)(connectionOptions);
30
+ }
31
+ async function smtpConnectionTest(credential) {
32
+ const credentials = credential.data;
33
+ const transporter = configureTransport(credentials, {});
34
+ try {
35
+ await transporter.verify();
36
+ return {
37
+ status: 'OK',
38
+ message: 'Connection successful!',
39
+ };
40
+ }
41
+ catch (error) {
42
+ return {
43
+ status: 'Error',
44
+ message: error.message,
45
+ };
46
+ }
47
+ finally {
48
+ transporter.close();
49
+ }
50
+ }
51
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../nodes/EmailSend/v2/utils.ts"],"names":[],"mappings":";;AAkBA,gDA6BC;AAED,gDAoBC;AA/DD,2CAA6C;AAY7C,SAAgB,kBAAkB,CAAC,WAAwB,EAAE,OAAyB;IACrF,MAAM,iBAAiB,GAA0B;QAChD,IAAI,EAAE,WAAW,CAAC,IAAc;QAChC,IAAI,EAAE,WAAW,CAAC,IAAc;QAChC,MAAM,EAAE,WAAW,CAAC,MAAiB;KACrC,CAAC;IAEF,IAAI,WAAW,CAAC,MAAM,KAAK,KAAK,EAAE,CAAC;QAClC,iBAAiB,CAAC,SAAS,GAAG,WAAW,CAAC,eAA0B,CAAC;IACtE,CAAC;IAED,IAAI,OAAO,WAAW,CAAC,QAAQ,KAAK,QAAQ,IAAI,WAAW,CAAC,QAAQ,EAAE,CAAC;QACtE,iBAAiB,CAAC,IAAI,GAAG,WAAW,CAAC,QAAQ,CAAC;IAC/C,CAAC;IAED,IAAI,WAAW,CAAC,IAAI,IAAI,WAAW,CAAC,QAAQ,EAAE,CAAC;QAC9C,iBAAiB,CAAC,IAAI,GAAG;YACxB,IAAI,EAAE,WAAW,CAAC,IAAc;YAChC,IAAI,EAAE,WAAW,CAAC,QAAkB;SACpC,CAAC;IACH,CAAC;IAED,IAAI,OAAO,CAAC,sBAAsB,KAAK,IAAI,EAAE,CAAC;QAC7C,iBAAiB,CAAC,GAAG,GAAG;YACvB,kBAAkB,EAAE,KAAK;SACzB,CAAC;IACH,CAAC;IAED,OAAO,IAAA,4BAAe,EAAC,iBAAiB,CAAC,CAAC;AAC3C,CAAC;AAEM,KAAK,UAAU,kBAAkB,CAEvC,UAAiC;IAEjC,MAAM,WAAW,GAAG,UAAU,CAAC,IAAK,CAAC;IACrC,MAAM,WAAW,GAAG,kBAAkB,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IACxD,IAAI,CAAC;QACJ,MAAM,WAAW,CAAC,MAAM,EAAE,CAAC;QAC3B,OAAO;YACN,MAAM,EAAE,IAAI;YACZ,OAAO,EAAE,wBAAwB;SACjC,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,OAAO;YACN,MAAM,EAAE,OAAO;YACf,OAAO,EAAE,KAAK,CAAC,OAAO;SACtB,CAAC;IACH,CAAC;YAAS,CAAC;QACV,WAAW,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;AACF,CAAC"}
@@ -1,11 +1,9 @@
1
1
  import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
- import { loadWorkflowInputMappings } from '../../../utils/workflowInputsResourceMapping/GenericFunctions';
2
+ import { localResourceMapping } from './methods';
3
3
  export declare class ExecuteWorkflow implements INodeType {
4
4
  description: INodeTypeDescription;
5
5
  methods: {
6
- localResourceMapping: {
7
- loadWorkflowInputMappings: typeof loadWorkflowInputMappings;
8
- };
6
+ localResourceMapping: typeof localResourceMapping;
9
7
  };
10
8
  execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
11
9
  }
@@ -3,12 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ExecuteWorkflow = void 0;
4
4
  const n8n_workflow_1 = require("n8n-workflow");
5
5
  const GenericFunctions_1 = require("./GenericFunctions");
6
+ const methods_1 = require("./methods");
6
7
  const utilities_1 = require("../../../utils/utilities");
7
8
  const GenericFunctions_2 = require("../../../utils/workflowInputsResourceMapping/GenericFunctions");
8
9
  class ExecuteWorkflow {
9
10
  constructor() {
10
11
  this.description = {
11
- displayName: 'Execute Workflow',
12
+ displayName: 'Execute Sub-workflow',
12
13
  name: 'executeWorkflow',
13
14
  icon: 'fa:sign-in-alt',
14
15
  iconColor: 'orange-red',
@@ -31,7 +32,7 @@ class ExecuteWorkflow {
31
32
  default: 'call_workflow',
32
33
  options: [
33
34
  {
34
- name: 'Call Another Workflow',
35
+ name: 'Execute a Sub-Workflow',
35
36
  value: 'call_workflow',
36
37
  },
37
38
  ],
@@ -186,7 +187,7 @@ class ExecuteWorkflow {
186
187
  typeOptions: {
187
188
  loadOptionsDependsOn: ['workflowId.value'],
188
189
  resourceMapper: {
189
- localResourceMapperMethod: 'loadWorkflowInputMappings',
190
+ localResourceMapperMethod: 'loadSubWorkflowInputs',
190
191
  valuesLabel: 'Workflow Inputs',
191
192
  mode: 'map',
192
193
  fieldWords: {
@@ -247,9 +248,7 @@ class ExecuteWorkflow {
247
248
  ],
248
249
  };
249
250
  this.methods = {
250
- localResourceMapping: {
251
- loadWorkflowInputMappings: GenericFunctions_2.loadWorkflowInputMappings,
252
- },
251
+ localResourceMapping: methods_1.localResourceMapping,
253
252
  };
254
253
  }
255
254
  async execute() {