n8n-nodes-extended-forms 0.1.1

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 (59) hide show
  1. package/LICENSE.md +19 -0
  2. package/README.md +52 -0
  3. package/dist/credentials/GithubIssuesApi.credentials.d.ts +10 -0
  4. package/dist/credentials/GithubIssuesApi.credentials.js +37 -0
  5. package/dist/credentials/GithubIssuesApi.credentials.js.map +1 -0
  6. package/dist/credentials/GithubIssuesOAuth2Api.credentials.d.ts +9 -0
  7. package/dist/credentials/GithubIssuesOAuth2Api.credentials.js +54 -0
  8. package/dist/credentials/GithubIssuesOAuth2Api.credentials.js.map +1 -0
  9. package/dist/icons/github.dark.svg +3 -0
  10. package/dist/icons/github.svg +3 -0
  11. package/dist/nodes/Form123/Form.node.d.ts +9 -0
  12. package/dist/nodes/Form123/Form.node.js +369 -0
  13. package/dist/nodes/Form123/Form.node.js.map +1 -0
  14. package/dist/nodes/Form123/Form.node.json +18 -0
  15. package/dist/nodes/Form123/FormTrigger.node.d.ts +4 -0
  16. package/dist/nodes/Form123/FormTrigger.node.js +28 -0
  17. package/dist/nodes/Form123/FormTrigger.node.js.map +1 -0
  18. package/dist/nodes/Form123/FormTrigger.node.json +18 -0
  19. package/dist/nodes/Form123/common.descriptions.d.ts +21 -0
  20. package/dist/nodes/Form123/common.descriptions.js +565 -0
  21. package/dist/nodes/Form123/common.descriptions.js.map +1 -0
  22. package/dist/nodes/Form123/cssVariables.d.ts +1 -0
  23. package/dist/nodes/Form123/cssVariables.js +74 -0
  24. package/dist/nodes/Form123/cssVariables.js.map +1 -0
  25. package/dist/nodes/Form123/form.svg +2 -0
  26. package/dist/nodes/Form123/interfaces.d.ts +52 -0
  27. package/dist/nodes/Form123/interfaces.js +5 -0
  28. package/dist/nodes/Form123/interfaces.js.map +1 -0
  29. package/dist/nodes/Form123/templates/form-trigger.handlebars +1496 -0
  30. package/dist/nodes/Form123/utils/descriptions.d.ts +2 -0
  31. package/dist/nodes/Form123/utils/descriptions.js +11 -0
  32. package/dist/nodes/Form123/utils/descriptions.js.map +1 -0
  33. package/dist/nodes/Form123/utils/formCompletionUtils.d.ts +8 -0
  34. package/dist/nodes/Form123/utils/formCompletionUtils.js +84 -0
  35. package/dist/nodes/Form123/utils/formCompletionUtils.js.map +1 -0
  36. package/dist/nodes/Form123/utils/formNodeUtils.d.ts +4 -0
  37. package/dist/nodes/Form123/utils/formNodeUtils.js +74 -0
  38. package/dist/nodes/Form123/utils/formNodeUtils.js.map +1 -0
  39. package/dist/nodes/Form123/utils/templateRenderer.d.ts +1 -0
  40. package/dist/nodes/Form123/utils/templateRenderer.js +69 -0
  41. package/dist/nodes/Form123/utils/templateRenderer.js.map +1 -0
  42. package/dist/nodes/Form123/utils/utilities.d.ts +6 -0
  43. package/dist/nodes/Form123/utils/utilities.js +47 -0
  44. package/dist/nodes/Form123/utils/utilities.js.map +1 -0
  45. package/dist/nodes/Form123/utils/utils.d.ts +76 -0
  46. package/dist/nodes/Form123/utils/utils.js +550 -0
  47. package/dist/nodes/Form123/utils/utils.js.map +1 -0
  48. package/dist/nodes/Form123/utils/waitUtils.d.ts +3 -0
  49. package/dist/nodes/Form123/utils/waitUtils.js +66 -0
  50. package/dist/nodes/Form123/utils/waitUtils.js.map +1 -0
  51. package/dist/nodes/Form123/v1/FormTriggerV1.node.d.ts +16 -0
  52. package/dist/nodes/Form123/v1/FormTriggerV1.node.js +83 -0
  53. package/dist/nodes/Form123/v1/FormTriggerV1.node.js.map +1 -0
  54. package/dist/nodes/Form123/v2/FormTriggerV2.node.d.ts +16 -0
  55. package/dist/nodes/Form123/v2/FormTriggerV2.node.js +194 -0
  56. package/dist/nodes/Form123/v2/FormTriggerV2.node.js.map +1 -0
  57. package/dist/package.json +61 -0
  58. package/dist/tsconfig.tsbuildinfo +1 -0
  59. package/package.json +61 -0
package/LICENSE.md ADDED
@@ -0,0 +1,19 @@
1
+ Copyright 2022 n8n
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
4
+ this software and associated documentation files (the "Software"), to deal in
5
+ the Software without restriction, including without limitation the rights to
6
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7
+ of the Software, and to permit persons to whom the Software is furnished to do
8
+ so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,52 @@
1
+ # n8n-nodes-custom-forms
2
+
3
+ This is an n8n community node package that provides custom form builder and trigger nodes for creating interactive forms in your n8n workflows.
4
+
5
+ Custom Forms is a powerful form solution that lets you create and manage forms directly within n8n workflows, with support for various field types, validation, and form submission handling.
6
+
7
+ [n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/reference/license/) workflow automation platform.
8
+
9
+ [Installation](#installation)
10
+ [Operations](#operations)
11
+ [Compatibility](#compatibility)
12
+ [Resources](#resources)
13
+
14
+ ## Installation
15
+
16
+ Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
17
+
18
+ For private packages, ensure you have npm authentication configured in your n8n environment.
19
+
20
+ ## Operations
21
+
22
+ ### Form Node
23
+ The Form node allows you to create and configure custom forms with various field types including:
24
+ - Text inputs
25
+ - Text areas
26
+ - Select dropdowns
27
+ - Checkboxes
28
+ - Radio buttons
29
+ - File uploads
30
+ - And more
31
+
32
+ ### Form Trigger Node
33
+ The Form Trigger node listens for form submissions and triggers your workflow when a form is submitted. It provides:
34
+ - Real-time form submission handling
35
+ - Data validation
36
+ - Customizable form templates
37
+ - Support for multiple form versions
38
+
39
+ ## Compatibility
40
+
41
+ - **Minimum n8n version**: 1.0.0
42
+ - **Node.js version**: v22 or higher
43
+
44
+ ## Resources
45
+
46
+ * [n8n community nodes documentation](https://docs.n8n.io/integrations/#community-nodes)
47
+ * [n8n Node Documentation](https://docs.n8n.io/integrations/creating-nodes/)
48
+ * [n8n Community Forum](https://community.n8n.io/)
49
+
50
+ ## License
51
+
52
+ [MIT](LICENSE.md)
@@ -0,0 +1,10 @@
1
+ import type { IAuthenticateGeneric, Icon, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class GithubIssuesApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ icon: Icon;
6
+ documentationUrl: string;
7
+ properties: INodeProperties[];
8
+ authenticate: IAuthenticateGeneric;
9
+ test: ICredentialTestRequest;
10
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GithubIssuesApi = void 0;
4
+ class GithubIssuesApi {
5
+ constructor() {
6
+ this.name = 'githubIssuesApi';
7
+ this.displayName = 'GitHub Issues API';
8
+ this.icon = { light: 'file:../icons/github.svg', dark: 'file:../icons/github.dark.svg' };
9
+ this.documentationUrl = 'https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#deleting-a-personal-access-token';
10
+ this.properties = [
11
+ {
12
+ displayName: 'Access Token',
13
+ name: 'accessToken',
14
+ type: 'string',
15
+ typeOptions: { password: true },
16
+ default: '',
17
+ },
18
+ ];
19
+ this.authenticate = {
20
+ type: 'generic',
21
+ properties: {
22
+ headers: {
23
+ Authorization: '=token {{$credentials?.accessToken}}',
24
+ },
25
+ },
26
+ };
27
+ this.test = {
28
+ request: {
29
+ baseURL: 'https://api.github.com',
30
+ url: '/user',
31
+ method: 'GET',
32
+ },
33
+ };
34
+ }
35
+ }
36
+ exports.GithubIssuesApi = GithubIssuesApi;
37
+ //# sourceMappingURL=GithubIssuesApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GithubIssuesApi.credentials.js","sourceRoot":"","sources":["../../credentials/GithubIssuesApi.credentials.ts"],"names":[],"mappings":";;;AAQA,MAAa,eAAe;IAA5B;QACC,SAAI,GAAG,iBAAiB,CAAC;QAEzB,gBAAW,GAAG,mBAAmB,CAAC;QAElC,SAAI,GAAS,EAAE,KAAK,EAAE,0BAA0B,EAAE,IAAI,EAAE,+BAA+B,EAAE,CAAC;QAE1F,qBAAgB,GACf,sJAAsJ,CAAC;QAExJ,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,cAAc;gBAC3B,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;aACX;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,aAAa,EAAE,sCAAsC;iBACrD;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,wBAAwB;gBACjC,GAAG,EAAE,OAAO;gBACZ,MAAM,EAAE,KAAK;aACb;SACD,CAAC;IACH,CAAC;CAAA;AApCD,0CAoCC"}
@@ -0,0 +1,9 @@
1
+ import type { Icon, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class GithubIssuesOAuth2Api implements ICredentialType {
3
+ name: string;
4
+ extends: string[];
5
+ displayName: string;
6
+ icon: Icon;
7
+ documentationUrl: string;
8
+ properties: INodeProperties[];
9
+ }
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GithubIssuesOAuth2Api = void 0;
4
+ class GithubIssuesOAuth2Api {
5
+ constructor() {
6
+ this.name = 'githubIssuesOAuth2Api';
7
+ this.extends = ['oAuth2Api'];
8
+ this.displayName = 'GitHub Issues OAuth2 API';
9
+ this.icon = { light: 'file:../icons/github.svg', dark: 'file:../icons/github.dark.svg' };
10
+ this.documentationUrl = 'https://docs.github.com/en/apps/oauth-apps';
11
+ this.properties = [
12
+ {
13
+ displayName: 'Grant Type',
14
+ name: 'grantType',
15
+ type: 'hidden',
16
+ default: 'authorizationCode',
17
+ },
18
+ {
19
+ displayName: 'Authorization URL',
20
+ name: 'authUrl',
21
+ type: 'hidden',
22
+ default: 'https://github.com/login/oauth/authorize',
23
+ required: true,
24
+ },
25
+ {
26
+ displayName: 'Access Token URL',
27
+ name: 'accessTokenUrl',
28
+ type: 'hidden',
29
+ default: 'https://github.com/login/oauth/access_token',
30
+ required: true,
31
+ },
32
+ {
33
+ displayName: 'Scope',
34
+ name: 'scope',
35
+ type: 'hidden',
36
+ default: 'repo',
37
+ },
38
+ {
39
+ displayName: 'Auth URI Query Parameters',
40
+ name: 'authQueryParameters',
41
+ type: 'hidden',
42
+ default: '',
43
+ },
44
+ {
45
+ displayName: 'Authentication',
46
+ name: 'authentication',
47
+ type: 'hidden',
48
+ default: 'header',
49
+ },
50
+ ];
51
+ }
52
+ }
53
+ exports.GithubIssuesOAuth2Api = GithubIssuesOAuth2Api;
54
+ //# sourceMappingURL=GithubIssuesOAuth2Api.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GithubIssuesOAuth2Api.credentials.js","sourceRoot":"","sources":["../../credentials/GithubIssuesOAuth2Api.credentials.ts"],"names":[],"mappings":";;;AAEA,MAAa,qBAAqB;IAAlC;QACC,SAAI,GAAG,uBAAuB,CAAC;QAE/B,YAAO,GAAG,CAAC,WAAW,CAAC,CAAC;QAExB,gBAAW,GAAG,0BAA0B,CAAC;QAEzC,SAAI,GAAS,EAAE,KAAK,EAAE,0BAA0B,EAAE,IAAI,EAAE,+BAA+B,EAAE,CAAC;QAE1F,qBAAgB,GAAG,4CAA4C,CAAC;QAEhE,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,mBAAmB;aAC5B;YACD;gBACC,WAAW,EAAE,mBAAmB;gBAChC,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,0CAA0C;gBACnD,QAAQ,EAAE,IAAI;aACd;YACD;gBACC,WAAW,EAAE,kBAAkB;gBAC/B,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,6CAA6C;gBACtD,QAAQ,EAAE,IAAI;aACd;YACD;gBACC,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,MAAM;aACf;YACD;gBACC,WAAW,EAAE,2BAA2B;gBACxC,IAAI,EAAE,qBAAqB;gBAC3B,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;aACX;YACD;gBACC,WAAW,EAAE,gBAAgB;gBAC7B,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,QAAQ;aACjB;SACD,CAAC;IACH,CAAC;CAAA;AAnDD,sDAmDC"}
@@ -0,0 +1,3 @@
1
+ <svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M20.0165 0C8.94791 0 0 9.01388 0 20.1653C0 29.0792 5.73324 36.6246 13.6868 39.2952C14.6812 39.496 15.0454 38.8613 15.0454 38.3274C15.0454 37.8599 15.0126 36.2575 15.0126 34.5879C9.4445 35.79 8.28498 32.1841 8.28498 32.1841C7.39015 29.847 6.06429 29.2463 6.06429 29.2463C4.24185 28.011 6.19704 28.011 6.19704 28.011C8.21861 28.1446 9.27938 30.081 9.27938 30.081C11.0686 33.1522 13.9518 32.2844 15.1118 31.7502C15.2773 30.4481 15.8079 29.5467 16.3713 29.046C11.9303 28.5785 7.25781 26.8425 7.25781 19.0967C7.25781 16.8932 8.05267 15.0905 9.31216 13.6884C9.11344 13.1877 8.41732 11.1174 9.51128 8.34644C9.51128 8.34644 11.2014 7.81217 15.0122 10.4164C16.6438 9.97495 18.3263 9.7504 20.0165 9.74851C21.7067 9.74851 23.4295 9.98246 25.0205 10.4164C28.8317 7.81217 30.5218 8.34644 30.5218 8.34644C31.6158 11.1174 30.9192 13.1877 30.7205 13.6884C32.0132 15.0905 32.7753 16.8932 32.7753 19.0967C32.7753 26.8425 28.1028 28.5449 23.6287 29.046C24.358 29.6802 24.9873 30.882 24.9873 32.7851C24.9873 35.4893 24.9545 37.6596 24.9545 38.327C24.9545 38.8613 25.3192 39.496 26.3132 39.2956C34.2667 36.6242 39.9999 29.0792 39.9999 20.1653C40.0327 9.01388 31.052 0 20.0165 0Z" fill="white"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M20.0165 0C8.94791 0 0 9.01388 0 20.1653C0 29.0792 5.73324 36.6246 13.6868 39.2952C14.6812 39.496 15.0454 38.8613 15.0454 38.3274C15.0454 37.8599 15.0126 36.2575 15.0126 34.5879C9.4445 35.79 8.28498 32.1841 8.28498 32.1841C7.39015 29.847 6.06429 29.2463 6.06429 29.2463C4.24185 28.011 6.19704 28.011 6.19704 28.011C8.21861 28.1446 9.27938 30.081 9.27938 30.081C11.0686 33.1522 13.9518 32.2844 15.1118 31.7502C15.2773 30.4481 15.8079 29.5467 16.3713 29.046C11.9303 28.5785 7.25781 26.8425 7.25781 19.0967C7.25781 16.8932 8.05267 15.0905 9.31216 13.6884C9.11344 13.1877 8.41732 11.1174 9.51128 8.34644C9.51128 8.34644 11.2014 7.81217 15.0122 10.4164C16.6438 9.97495 18.3263 9.7504 20.0165 9.74851C21.7067 9.74851 23.4295 9.98246 25.0205 10.4164C28.8317 7.81217 30.5218 8.34644 30.5218 8.34644C31.6158 11.1174 30.9192 13.1877 30.7205 13.6884C32.0132 15.0905 32.7753 16.8932 32.7753 19.0967C32.7753 26.8425 28.1028 28.5449 23.6287 29.046C24.358 29.6802 24.9873 30.882 24.9873 32.7851C24.9873 35.4893 24.9545 37.6596 24.9545 38.327C24.9545 38.8613 25.3192 39.496 26.3132 39.2956C34.2667 36.6242 39.9999 29.0792 39.9999 20.1653C40.0327 9.01388 31.052 0 20.0165 0Z" fill="#24292F"/>
3
+ </svg>
@@ -0,0 +1,9 @@
1
+ import type { IExecuteFunctions, INodeExecutionData, INodeProperties, INodeTypeDescription, IWebhookFunctions, IWebhookResponseData } from 'n8n-workflow';
2
+ import { Node } from 'n8n-workflow';
3
+ export declare const formFieldsProperties: INodeProperties[];
4
+ export declare class Form extends Node {
5
+ nodeInputData: INodeExecutionData[];
6
+ description: INodeTypeDescription;
7
+ webhook(context: IWebhookFunctions): Promise<IWebhookResponseData>;
8
+ execute(context: IExecuteFunctions): Promise<INodeExecutionData[][]>;
9
+ }
@@ -0,0 +1,369 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Form = exports.formFieldsProperties = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const cssVariables_1 = require("./cssVariables");
6
+ const formCompletionUtils_1 = require("./utils/formCompletionUtils");
7
+ const formNodeUtils_1 = require("./utils/formNodeUtils");
8
+ const utils_1 = require("./utils/utils");
9
+ const waitUtils_1 = require("./utils/waitUtils");
10
+ const common_descriptions_1 = require("./common.descriptions");
11
+ const waitTimeProperties = [
12
+ {
13
+ displayName: 'Limit Wait Time',
14
+ name: 'limitWaitTime',
15
+ type: 'boolean',
16
+ default: false,
17
+ description: 'Whether to limit the time this node should wait for a user response before execution resumes',
18
+ },
19
+ ...(0, n8n_workflow_1.updateDisplayOptions)({
20
+ show: {
21
+ limitWaitTime: [true],
22
+ },
23
+ }, waitUtils_1.limitWaitTimeProperties),
24
+ ];
25
+ exports.formFieldsProperties = [
26
+ {
27
+ displayName: 'Define Form',
28
+ name: 'defineForm',
29
+ type: 'options',
30
+ noDataExpression: true,
31
+ options: [
32
+ {
33
+ name: 'Using Fields Below',
34
+ value: 'fields',
35
+ },
36
+ {
37
+ name: 'Using JSON',
38
+ value: 'json',
39
+ },
40
+ ],
41
+ default: 'fields',
42
+ },
43
+ {
44
+ displayName: 'Form Fields',
45
+ name: 'jsonOutput',
46
+ type: 'json',
47
+ typeOptions: {
48
+ rows: 5,
49
+ },
50
+ default: '[\n {\n "fieldLabel": "Name",\n "placeholder": "enter your name",\n "requiredField": true\n },\n {\n "fieldLabel": "Age",\n "fieldType": "number",\n "placeholder": "enter your age"\n },\n {\n "fieldLabel": "Email",\n "fieldType": "email",\n "requiredField": true\n },\n {\n "fieldLabel": "Textarea",\n "fieldType": "textarea"\n },\n {\n "fieldLabel": "Dropdown Options",\n "fieldType": "dropdown",\n "fieldOptions": {\n "values": [\n {\n "option": "option 1"\n },\n {\n "option": "option 2"\n }\n ]\n },\n "requiredField": true\n },\n {\n "fieldLabel": "Checkboxes",\n "fieldType": "checkbox",\n "fieldOptions": {\n "values": [\n {\n "option": "option 1"\n },\n {\n "option": "option 2"\n }\n ]\n }\n },\n {\n "fieldLabel": "Radio",\n "fieldType": "radio",\n "fieldOptions": {\n "values": [\n {\n "option": "option 1"\n },\n {\n "option": "option 2"\n }\n ]\n }\n },\n {\n "fieldLabel": "Email",\n "fieldType": "email",\n "placeholder": "me@mail.con"\n },\n {\n "fieldLabel": "File",\n "fieldType": "file",\n "multipleFiles": true,\n "acceptFileTypes": ".jpg, .png"\n },\n {\n "fieldLabel": "Number",\n "fieldType": "number"\n },\n {\n "fieldLabel": "Password",\n "fieldType": "password"\n }\n]\n',
51
+ validateType: 'form-fields',
52
+ ignoreValidationDuringExecution: true,
53
+ hint: '<a href="https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.form/" target="_blank">See docs</a> for field syntax',
54
+ displayOptions: {
55
+ show: {
56
+ defineForm: ['json'],
57
+ },
58
+ },
59
+ },
60
+ { ...common_descriptions_1.formFields, displayOptions: { show: { defineForm: ['fields'] } } },
61
+ ];
62
+ const pageProperties = (0, n8n_workflow_1.updateDisplayOptions)({
63
+ show: {
64
+ operation: ['page'],
65
+ },
66
+ }, [
67
+ ...exports.formFieldsProperties,
68
+ ...waitTimeProperties,
69
+ {
70
+ displayName: 'Options',
71
+ name: 'options',
72
+ type: 'collection',
73
+ placeholder: 'Add option',
74
+ default: {},
75
+ options: [
76
+ { ...common_descriptions_1.formHeader, required: false },
77
+ { ...common_descriptions_1.formTitle, required: false },
78
+ common_descriptions_1.formDescription,
79
+ {
80
+ displayName: 'Button Label',
81
+ name: 'buttonLabel',
82
+ type: 'string',
83
+ default: 'Submit',
84
+ },
85
+ {
86
+ displayName: 'Custom Form Styling',
87
+ name: 'customCss',
88
+ type: 'string',
89
+ typeOptions: {
90
+ rows: 10,
91
+ editor: 'cssEditor',
92
+ },
93
+ default: cssVariables_1.cssVariables.trim(),
94
+ description: 'Override default styling of the public form interface with CSS',
95
+ },
96
+ ],
97
+ },
98
+ ]);
99
+ const completionProperties = (0, n8n_workflow_1.updateDisplayOptions)({
100
+ show: {
101
+ operation: ['completion'],
102
+ },
103
+ }, [
104
+ {
105
+ displayName: 'On n8n Form Submission',
106
+ name: 'respondWith',
107
+ type: 'options',
108
+ default: 'text',
109
+ options: [
110
+ {
111
+ name: 'Show Completion Screen',
112
+ value: 'text',
113
+ description: 'Show a response text to the user',
114
+ },
115
+ {
116
+ name: 'Redirect to URL',
117
+ value: 'redirect',
118
+ description: 'Redirect the user to a URL',
119
+ },
120
+ {
121
+ name: 'Show Text',
122
+ value: 'showText',
123
+ description: 'Display simple text or HTML',
124
+ },
125
+ {
126
+ name: 'Return Binary File',
127
+ value: 'returnBinary',
128
+ description: 'Return incoming binary file',
129
+ },
130
+ ],
131
+ },
132
+ {
133
+ displayName: 'URL',
134
+ name: 'redirectUrl',
135
+ validateType: 'url',
136
+ type: 'string',
137
+ default: '',
138
+ required: true,
139
+ displayOptions: {
140
+ show: {
141
+ respondWith: ['redirect'],
142
+ },
143
+ },
144
+ },
145
+ {
146
+ displayName: 'Completion Title',
147
+ name: 'completionTitle',
148
+ type: 'string',
149
+ default: '',
150
+ required: true,
151
+ displayOptions: {
152
+ show: {
153
+ respondWith: ['text', 'returnBinary'],
154
+ },
155
+ },
156
+ },
157
+ {
158
+ displayName: 'Completion Message',
159
+ name: 'completionMessage',
160
+ type: 'string',
161
+ default: '',
162
+ typeOptions: {
163
+ rows: 2,
164
+ },
165
+ displayOptions: {
166
+ show: {
167
+ respondWith: ['text', 'returnBinary'],
168
+ },
169
+ },
170
+ },
171
+ {
172
+ displayName: 'Text',
173
+ name: 'responseText',
174
+ type: 'string',
175
+ displayOptions: {
176
+ show: {
177
+ respondWith: ['showText'],
178
+ },
179
+ },
180
+ typeOptions: {
181
+ rows: 2,
182
+ },
183
+ default: '',
184
+ placeholder: 'e.g. Thanks for filling the form',
185
+ description: 'The text to display on the page. Use HTML to show a customized web page.',
186
+ },
187
+ {
188
+ displayName: 'Input Data Field Name',
189
+ name: 'inputDataFieldName',
190
+ type: 'string',
191
+ displayOptions: {
192
+ show: {
193
+ respondWith: ['returnBinary'],
194
+ },
195
+ },
196
+ default: 'data',
197
+ placeholder: 'e.g. data',
198
+ description: 'Find the name of input field containing the binary data to return in the Input panel on the left, in the Binary tab',
199
+ hint: 'The name of the input field containing the binary file data to be returned',
200
+ },
201
+ ...waitTimeProperties,
202
+ {
203
+ displayName: 'Options',
204
+ name: 'options',
205
+ type: 'collection',
206
+ placeholder: 'Add option',
207
+ default: {},
208
+ options: [
209
+ { ...common_descriptions_1.formTitle, required: false, displayName: 'Completion Page Title' },
210
+ {
211
+ displayName: 'Custom Form Styling',
212
+ name: 'customCss',
213
+ type: 'string',
214
+ typeOptions: {
215
+ rows: 10,
216
+ editor: 'cssEditor',
217
+ },
218
+ default: cssVariables_1.cssVariables.trim(),
219
+ description: 'Override default styling of the public form interface with CSS',
220
+ },
221
+ ],
222
+ displayOptions: {
223
+ show: {
224
+ respondWith: ['text', 'returnBinary', 'redirect'],
225
+ },
226
+ },
227
+ },
228
+ ]);
229
+ class Form extends n8n_workflow_1.Node {
230
+ constructor() {
231
+ super(...arguments);
232
+ this.nodeInputData = [];
233
+ this.description = {
234
+ displayName: 'n8n Form',
235
+ name: 'form',
236
+ icon: 'file:form.svg',
237
+ group: ['input'],
238
+ version: [1, 2.3],
239
+ description: 'Extended n8n Forms',
240
+ defaults: {
241
+ name: 'Form',
242
+ },
243
+ usableAsTool: true,
244
+ inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
245
+ outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
246
+ waitingNodeTooltip: '=Execution will continue when form is submitted on <a href="{{ $execution.resumeFormUrl }}" target="_blank">{{ $execution.resumeFormUrl }}</a>',
247
+ webhooks: [
248
+ {
249
+ name: 'default',
250
+ httpMethod: 'GET',
251
+ responseMode: 'onReceived',
252
+ path: '',
253
+ restartWebhook: true,
254
+ isFullPath: true,
255
+ nodeType: 'form',
256
+ },
257
+ {
258
+ name: 'default',
259
+ httpMethod: 'POST',
260
+ responseMode: 'responseNode',
261
+ path: '',
262
+ restartWebhook: true,
263
+ isFullPath: true,
264
+ nodeType: 'form',
265
+ },
266
+ ],
267
+ properties: [
268
+ {
269
+ displayName: 'An n8n Form Trigger node must be set up before this node',
270
+ name: 'triggerNotice',
271
+ type: 'notice',
272
+ default: '',
273
+ },
274
+ {
275
+ displayName: 'Page Type',
276
+ name: 'operation',
277
+ type: 'options',
278
+ default: 'page',
279
+ noDataExpression: true,
280
+ options: [
281
+ {
282
+ name: 'Next Form Page',
283
+ value: 'page',
284
+ },
285
+ {
286
+ name: 'Form Ending',
287
+ value: 'completion',
288
+ },
289
+ ],
290
+ },
291
+ ...pageProperties,
292
+ ...completionProperties,
293
+ ],
294
+ };
295
+ }
296
+ async webhook(context) {
297
+ const res = context.getResponseObject();
298
+ const operation = context.getNodeParameter('operation', '');
299
+ const trigger = (0, formNodeUtils_1.getFormTriggerNode)(context);
300
+ const mode = context.evaluateExpression(`{{ $('${trigger.name}').first().json.formMode }}`);
301
+ const defineForm = context.getNodeParameter('defineForm', false);
302
+ let fields = [];
303
+ if (defineForm === 'json') {
304
+ try {
305
+ const jsonOutput = context.getNodeParameter('jsonOutput', '', {
306
+ rawExpressions: true,
307
+ });
308
+ fields = (0, n8n_workflow_1.tryToParseJsonToFormFields)((0, utils_1.resolveRawData)(context, jsonOutput));
309
+ }
310
+ catch (error) {
311
+ throw new n8n_workflow_1.NodeOperationError(context.getNode(), error.message, {
312
+ description: error.message,
313
+ type: mode === 'test' ? 'manual-form-test' : undefined,
314
+ });
315
+ }
316
+ }
317
+ else {
318
+ fields = context.getNodeParameter('formFields.values', []);
319
+ }
320
+ const method = context.getRequestObject().method;
321
+ if (operation === 'completion' && method === 'GET') {
322
+ return await (0, formCompletionUtils_1.renderFormCompletion)(context, res, trigger);
323
+ }
324
+ if (operation === 'completion' && method === 'POST') {
325
+ return {
326
+ workflowData: [context.evaluateExpression('{{ $input.all() }}')],
327
+ };
328
+ }
329
+ if (method === 'GET') {
330
+ return await (0, formNodeUtils_1.renderFormNode)(context, res, trigger, fields, mode);
331
+ }
332
+ let useWorkflowTimezone = context.evaluateExpression(`{{ $('${trigger.name}').params.options?.useWorkflowTimezone }}`);
333
+ if (useWorkflowTimezone === undefined && (trigger === null || trigger === void 0 ? void 0 : trigger.typeVersion) > 2) {
334
+ useWorkflowTimezone = true;
335
+ }
336
+ const returnItem = await (0, utils_1.prepareFormReturnItem)(context, fields, mode, useWorkflowTimezone);
337
+ return {
338
+ webhookResponse: { status: 200 },
339
+ workflowData: [[returnItem]],
340
+ };
341
+ }
342
+ async execute(context) {
343
+ const operation = context.getNodeParameter('operation', 0);
344
+ if (operation === 'completion') {
345
+ this.nodeInputData = context.getInputData();
346
+ }
347
+ const parentNodes = context.getParentNodes(context.getNode().name);
348
+ const hasFormTrigger = parentNodes.some((node) => node.type === n8n_workflow_1.FORM_TRIGGER_NODE_TYPE);
349
+ if (!hasFormTrigger) {
350
+ throw new n8n_workflow_1.NodeOperationError(context.getNode(), 'Form Trigger node must be set before this node');
351
+ }
352
+ const childNodes = context.getChildNodes(context.getNode().name);
353
+ const hasNextPage = childNodes.some((node) => node.type === n8n_workflow_1.FORM_NODE_TYPE);
354
+ if (operation === 'completion' && hasNextPage) {
355
+ throw new n8n_workflow_1.NodeOperationError(context.getNode(), 'Completion has to be the last Form node in the workflow');
356
+ }
357
+ const waitTill = (0, waitUtils_1.configureWaitTillDate)(context, 'root');
358
+ await context.putExecutionToWait(waitTill);
359
+ context.sendResponse({
360
+ headers: {
361
+ location: context.evaluateExpression('{{ $execution.resumeFormUrl }}', 0),
362
+ },
363
+ statusCode: 307,
364
+ });
365
+ return [context.getInputData()];
366
+ }
367
+ }
368
+ exports.Form = Form;
369
+ //# sourceMappingURL=Form.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Form.node.js","sourceRoot":"","sources":["../../../nodes/Form123/Form.node.ts"],"names":[],"mappings":";;;AASA,+CAQsB;AAEtB,iDAA8C;AAC9C,qEAAmE;AACnE,yDAA2E;AAC3E,yCAAsE;AACtE,iDAAmF;AACnF,+DAA2F;AAE3F,MAAM,kBAAkB,GAAsB;IAC7C;QACC,WAAW,EAAE,iBAAiB;QAC9B,IAAI,EAAE,eAAe;QACrB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,KAAK;QACd,WAAW,EACV,8FAA8F;KAC/F;IACD,GAAG,IAAA,mCAAoB,EACtB;QACC,IAAI,EAAE;YACL,aAAa,EAAE,CAAC,IAAI,CAAC;SACrB;KACD,EAC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CAAC,CAAC;QACxD,MAAM,OAAO,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;QAE3C,OAAO,CAAC,YAAY,CAAC;YACpB,OAAO,EAAE;gBACR,QAAQ,EAAE,OAAO,CAAC,kBAAkB,CAAC,gCAAgC,EAAE,CAAC,CAAC;aACzE;YACD,UAAU,EAAE,GAAG;SACf,CAAC,CAAC;QAEH,OAAO,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IACjC,CAAC;CACD;AA3KD,oBA2KC"}
@@ -0,0 +1,18 @@
1
+ {
2
+ "node": "n8n-nodes-base.form",
3
+ "nodeVersion": "1.0",
4
+ "codexVersion": "1.0",
5
+ "categories": ["Core Nodes"],
6
+ "alias": ["_Form", "form", "table", "submit", "post", "page", "step", "stage", "multi"],
7
+ "resources": {
8
+ "primaryDocumentation": [
9
+ {
10
+ "url": "https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.form/"
11
+ }
12
+ ],
13
+ "generic": []
14
+ },
15
+ "subcategories": {
16
+ "Core Nodes": ["Helpers"]
17
+ }
18
+ }
@@ -0,0 +1,4 @@
1
+ import { VersionedNodeType } from 'n8n-workflow';
2
+ export declare class FormTrigger extends VersionedNodeType {
3
+ constructor();
4
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FormTrigger = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const FormTriggerV1_node_1 = require("./v1/FormTriggerV1.node");
6
+ const FormTriggerV2_node_1 = require("./v2/FormTriggerV2.node");
7
+ class FormTrigger extends n8n_workflow_1.VersionedNodeType {
8
+ constructor() {
9
+ const baseDescription = {
10
+ displayName: 'n8n Form Trigger',
11
+ name: 'formTrigger',
12
+ icon: 'file:form.svg',
13
+ group: ['trigger'],
14
+ description: 'Custom n8n Forms',
15
+ defaultVersion: 2.3,
16
+ };
17
+ const nodeVersions = {
18
+ 1: new FormTriggerV1_node_1.FormTriggerV1(baseDescription),
19
+ 2: new FormTriggerV2_node_1.FormTriggerV2(baseDescription),
20
+ 2.1: new FormTriggerV2_node_1.FormTriggerV2(baseDescription),
21
+ 2.2: new FormTriggerV2_node_1.FormTriggerV2(baseDescription),
22
+ 2.3: new FormTriggerV2_node_1.FormTriggerV2(baseDescription),
23
+ };
24
+ super(nodeVersions, baseDescription);
25
+ }
26
+ }
27
+ exports.FormTrigger = FormTrigger;
28
+ //# sourceMappingURL=FormTrigger.node.js.map