n8n-nodes-base 1.20.0 → 1.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/build.tsbuildinfo +1 -1
- package/dist/known/nodes.json +24 -0
- package/dist/nodes/Airtable/v2/methods/listSearch.js +1 -1
- package/dist/nodes/Airtable/v2/methods/listSearch.js.map +1 -1
- package/dist/nodes/Airtable/v2/methods/loadOptions.js +2 -2
- package/dist/nodes/Airtable/v2/methods/loadOptions.js.map +1 -1
- package/dist/nodes/Airtable/v2/methods/resourceMapping.js +1 -1
- package/dist/nodes/Airtable/v2/methods/resourceMapping.js.map +1 -1
- package/dist/nodes/Code/Code.node.json +1 -1
- package/dist/nodes/CompareDatasets/CompareDatasets.node.json +1 -1
- package/dist/nodes/CompareDatasets/GenericFunctions.js +6 -5
- package/dist/nodes/CompareDatasets/GenericFunctions.js.map +1 -1
- package/dist/nodes/Crypto/Crypto.node.json +1 -1
- package/dist/nodes/DateTime/DateTime.node.json +1 -1
- package/dist/nodes/DateTime/V2/DateTimeV2.node.js +1 -0
- package/dist/nodes/DateTime/V2/DateTimeV2.node.js.map +1 -1
- package/dist/nodes/EmailReadImap/EmailReadImap.node.json +1 -1
- package/dist/nodes/EmailSend/EmailSend.node.json +0 -3
- package/dist/nodes/ErrorTrigger/ErrorTrigger.node.json +1 -1
- package/dist/nodes/ExecuteWorkflow/ExecuteWorkflow.node.json +1 -1
- package/dist/nodes/Facebook/FacebookTrigger.node.js +1 -1
- package/dist/nodes/Facebook/FacebookTrigger.node.js.map +1 -1
- package/dist/nodes/FacebookLeadAds/FacebookLeadAdsTrigger.node.js +1 -1
- package/dist/nodes/FacebookLeadAds/FacebookLeadAdsTrigger.node.js.map +1 -1
- package/dist/nodes/FileMaker/FileMaker.node.js +2 -0
- package/dist/nodes/FileMaker/FileMaker.node.js.map +1 -1
- package/dist/nodes/Filter/Filter.node.js +1 -1
- package/dist/nodes/Filter/Filter.node.js.map +1 -1
- package/dist/nodes/Filter/Filter.node.json +1 -1
- package/dist/nodes/Form/FormTrigger.node.d.ts +3 -4
- package/dist/nodes/Form/FormTrigger.node.js +9 -247
- package/dist/nodes/Form/FormTrigger.node.js.map +1 -1
- package/dist/nodes/Form/FormTrigger.node.json +1 -1
- package/dist/nodes/Form/common.descriptions.d.ts +18 -0
- package/dist/nodes/Form/common.descriptions.js +237 -0
- package/dist/nodes/Form/common.descriptions.js.map +1 -0
- package/dist/nodes/Form/interfaces.d.ts +2 -0
- package/dist/nodes/Form/utils.d.ts +11 -1
- package/dist/nodes/Form/utils.js +70 -2
- package/dist/nodes/Form/utils.js.map +1 -1
- package/dist/nodes/Form/v1/FormTriggerV1.node.d.ts +14 -0
- package/dist/nodes/Form/v1/FormTriggerV1.node.js +82 -0
- package/dist/nodes/Form/v1/FormTriggerV1.node.js.map +1 -0
- package/dist/nodes/Form/v2/FormTriggerV2.node.d.ts +14 -0
- package/dist/nodes/Form/v2/FormTriggerV2.node.js +84 -0
- package/dist/nodes/Form/v2/FormTriggerV2.node.js.map +1 -0
- package/dist/nodes/Github/GithubTrigger.node.js +2 -2
- package/dist/nodes/Github/GithubTrigger.node.js.map +1 -1
- package/dist/nodes/Google/Ads/CampaignDescription.js +2 -2
- package/dist/nodes/Google/Ads/GoogleAds.node.js +1 -1
- package/dist/nodes/Google/BigQuery/v2/actions/database/insert.operation.js +1 -1
- package/dist/nodes/Google/BigQuery/v2/actions/database/insert.operation.js.map +1 -1
- package/dist/nodes/Google/Sheet/v2/actions/sheet/append.operation.js +1 -1
- package/dist/nodes/Google/Sheet/v2/actions/sheet/append.operation.js.map +1 -1
- package/dist/nodes/Google/Sheet/v2/helpers/GoogleSheet.js +1 -1
- package/dist/nodes/Google/Sheet/v2/helpers/GoogleSheet.js.map +1 -1
- package/dist/nodes/Google/Sheet/v2/helpers/GoogleSheets.utils.js +1 -1
- package/dist/nodes/Google/Sheet/v2/helpers/GoogleSheets.utils.js.map +1 -1
- package/dist/nodes/Google/Sheet/v2/methods/listSearch.js +4 -1
- package/dist/nodes/Google/Sheet/v2/methods/listSearch.js.map +1 -1
- package/dist/nodes/Google/Sheet/v2/methods/resourceMapping.js +4 -1
- package/dist/nodes/Google/Sheet/v2/methods/resourceMapping.js.map +1 -1
- package/dist/nodes/Html/Html.node.json +1 -1
- package/dist/nodes/If/If.node.d.ts +3 -4
- package/dist/nodes/If/If.node.js +10 -406
- package/dist/nodes/If/If.node.js.map +1 -1
- package/dist/nodes/If/V1/IfV1.node.d.ts +6 -0
- package/dist/nodes/If/V1/IfV1.node.js +414 -0
- package/dist/nodes/If/V1/IfV1.node.js.map +1 -0
- package/dist/nodes/If/V2/IfV2.node.d.ts +6 -0
- package/dist/nodes/If/V2/IfV2.node.js +101 -0
- package/dist/nodes/If/V2/IfV2.node.js.map +1 -0
- package/dist/nodes/If/test/v2/IfV2.date-time.json +163 -0
- package/dist/nodes/If/test/v2/IfV2.number.json +165 -0
- package/dist/nodes/If/test/v2/IfV2.other.json +182 -0
- package/dist/nodes/If/test/v2/IfV2.string.json +178 -0
- package/dist/nodes/ItemLists/ItemLists.node.js +1 -0
- package/dist/nodes/ItemLists/ItemLists.node.js.map +1 -1
- package/dist/nodes/Kafka/Kafka.node.js +3 -1
- package/dist/nodes/Kafka/Kafka.node.js.map +1 -1
- package/dist/nodes/LocalFileTrigger/LocalFileTrigger.node.js +24 -1
- package/dist/nodes/LocalFileTrigger/LocalFileTrigger.node.js.map +1 -1
- package/dist/nodes/Markdown/Markdown.node.json +1 -1
- package/dist/nodes/Merge/Merge.node.json +1 -1
- package/dist/nodes/Merge/v2/MergeV2.node.js +1 -1
- package/dist/nodes/Merge/v2/MergeV2.node.js.map +1 -1
- package/dist/nodes/MySql/v2/actions/database/insert.operation.js +1 -1
- package/dist/nodes/MySql/v2/actions/database/update.operation.js +1 -1
- package/dist/nodes/MySql/v2/actions/database/upsert.operation.js +1 -1
- package/dist/nodes/N8n/N8n.node.json +1 -1
- package/dist/nodes/NocoDB/OperationDescription.js +1 -1
- package/dist/nodes/NocoDB/OperationDescription.js.map +1 -1
- package/dist/nodes/OpenAi/OpenAi.node.js +6 -0
- package/dist/nodes/OpenAi/OpenAi.node.js.map +1 -1
- package/dist/nodes/Postgres/PostgresTrigger.node.js +1 -1
- package/dist/nodes/Postgres/v2/actions/database/insert.operation.js +1 -1
- package/dist/nodes/Postgres/v2/actions/database/update.operation.js +1 -1
- package/dist/nodes/Postgres/v2/actions/database/upsert.operation.js +1 -1
- package/dist/nodes/Postgres/v2/helpers/utils.d.ts +2 -2
- package/dist/nodes/Postgres/v2/methods/resourceMapping.js +1 -1
- package/dist/nodes/Postgres/v2/methods/resourceMapping.js.map +1 -1
- package/dist/nodes/RenameKeys/RenameKeys.node.js +1 -1
- package/dist/nodes/RenameKeys/RenameKeys.node.js.map +1 -1
- package/dist/nodes/RespondToWebhook/RespondToWebhook.node.js +26 -2
- package/dist/nodes/RespondToWebhook/RespondToWebhook.node.js.map +1 -1
- package/dist/nodes/RespondToWebhook/RespondToWebhook.node.json +1 -1
- package/dist/nodes/RssFeedRead/RssFeedRead.node.json +0 -3
- package/dist/nodes/Schedule/ScheduleTrigger.node.json +1 -4
- package/dist/nodes/Set/v2/SetV2.node.js +1 -1
- package/dist/nodes/Slack/V2/GenericFunctions.js +2 -2
- package/dist/nodes/Slack/V2/GenericFunctions.js.map +1 -1
- package/dist/nodes/SseTrigger/SseTrigger.node.json +1 -1
- package/dist/nodes/StopAndError/StopAndError.node.json +1 -1
- package/dist/nodes/TheHive/GenericFunctions.js +1 -1
- package/dist/nodes/TheHive/GenericFunctions.js.map +1 -1
- package/dist/nodes/Transform/Aggregate/Aggregate.node.d.ts +5 -0
- package/dist/nodes/Transform/Aggregate/Aggregate.node.js +365 -0
- package/dist/nodes/Transform/Aggregate/Aggregate.node.js.map +1 -0
- package/dist/nodes/Transform/Aggregate/Aggregate.node.json +19 -0
- package/dist/nodes/Transform/Aggregate/aggregate.svg +14 -0
- package/dist/nodes/Transform/Aggregate/test/workflow.aggregate.json +207 -0
- package/dist/nodes/Transform/Aggregate/utils.d.ts +2 -0
- package/dist/nodes/Transform/Aggregate/utils.js +48 -0
- package/dist/nodes/Transform/Aggregate/utils.js.map +1 -0
- package/dist/nodes/Transform/Limit/Limit.node.d.ts +5 -0
- package/dist/nodes/Transform/Limit/Limit.node.js +68 -0
- package/dist/nodes/Transform/Limit/Limit.node.js.map +1 -0
- package/dist/nodes/Transform/Limit/Limit.node.json +19 -0
- package/dist/nodes/Transform/Limit/limit.svg +16 -0
- package/dist/nodes/Transform/Limit/test/workflow.limit.json +97 -0
- package/dist/nodes/Transform/RemoveDuplicates/RemoveDuplicates.node.d.ts +5 -0
- package/dist/nodes/Transform/RemoveDuplicates/RemoveDuplicates.node.js +221 -0
- package/dist/nodes/Transform/RemoveDuplicates/RemoveDuplicates.node.js.map +1 -0
- package/dist/nodes/Transform/RemoveDuplicates/RemoveDuplicates.node.json +29 -0
- package/dist/nodes/Transform/RemoveDuplicates/removeDuplicates.svg +15 -0
- package/dist/nodes/Transform/RemoveDuplicates/test/workflow.removeDuplicates.json +325 -0
- package/dist/nodes/Transform/RemoveDuplicates/utils.d.ts +3 -0
- package/dist/nodes/Transform/RemoveDuplicates/utils.js +37 -0
- package/dist/nodes/Transform/RemoveDuplicates/utils.js.map +1 -0
- package/dist/nodes/Transform/Sort/Sort.node.d.ts +5 -0
- package/dist/nodes/Transform/Sort/Sort.node.js +257 -0
- package/dist/nodes/Transform/Sort/Sort.node.js.map +1 -0
- package/dist/nodes/Transform/Sort/Sort.node.json +19 -0
- package/dist/nodes/Transform/Sort/sort.svg +6 -0
- package/dist/nodes/Transform/Sort/test/workflow.sort.json +213 -0
- package/dist/nodes/Transform/Sort/utils.d.ts +3 -0
- package/dist/nodes/Transform/Sort/utils.js +27 -0
- package/dist/nodes/Transform/Sort/utils.js.map +1 -0
- package/dist/nodes/Transform/SplitOut/SplitOut.node.d.ts +5 -0
- package/dist/nodes/Transform/SplitOut/SplitOut.node.js +223 -0
- package/dist/nodes/Transform/SplitOut/SplitOut.node.js.map +1 -0
- package/dist/nodes/Transform/SplitOut/SplitOut.node.json +19 -0
- package/dist/nodes/Transform/SplitOut/splitOut.svg +14 -0
- package/dist/nodes/Transform/SplitOut/test/workflow.splitOut.json +354 -0
- package/dist/nodes/Transform/SplitOut/test/workflow.splitOutObject.json +386 -0
- package/dist/nodes/Transform/Summarize/Summarize.node.d.ts +5 -0
- package/dist/nodes/Transform/Summarize/Summarize.node.js +311 -0
- package/dist/nodes/Transform/Summarize/Summarize.node.js.map +1 -0
- package/dist/nodes/Transform/Summarize/Summarize.node.json +32 -0
- package/dist/nodes/Transform/Summarize/summarize.svg +10 -0
- package/dist/nodes/Transform/Summarize/test/workflow.summarize.json +296 -0
- package/dist/nodes/Transform/Summarize/utils.d.ts +22 -0
- package/dist/nodes/Transform/Summarize/utils.js +206 -0
- package/dist/nodes/Transform/Summarize/utils.js.map +1 -0
- package/dist/nodes/Transform/utils/utils.d.ts +1 -0
- package/dist/nodes/Transform/utils/utils.js +18 -0
- package/dist/nodes/Transform/utils/utils.js.map +1 -0
- package/dist/nodes/Wait/Wait.node.d.ts +3 -2
- package/dist/nodes/Wait/Wait.node.js +199 -129
- package/dist/nodes/Wait/Wait.node.js.map +1 -1
- package/dist/nodes/Wait/Wait.node.json +1 -1
- package/dist/nodes/Webhook/Webhook.node.js +26 -10
- package/dist/nodes/Webhook/Webhook.node.js.map +1 -1
- package/dist/nodes/Webhook/Webhook.node.json +1 -1
- package/dist/nodes/Webhook/description.js +31 -2
- package/dist/nodes/Webhook/description.js.map +1 -1
- package/dist/types/nodes.json +74 -66
- package/package.json +10 -4
- /package/dist/nodes/If/test/{IF.boolean.json → v1/IF.boolean.json} +0 -0
- /package/dist/nodes/If/test/{IF.date-time.json → v1/IF.date-time.json} +0 -0
- /package/dist/nodes/If/test/{IF.number.json → v1/IF.number.json} +0 -0
- /package/dist/nodes/If/test/{IF.string.json → v1/IF.string.json} +0 -0
|
@@ -2,261 +2,23 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FormTrigger = void 0;
|
|
4
4
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
-
const
|
|
6
|
-
|
|
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 {
|
|
7
8
|
constructor() {
|
|
8
|
-
|
|
9
|
+
const baseDescription = {
|
|
9
10
|
displayName: 'n8n Form Trigger',
|
|
10
11
|
name: 'formTrigger',
|
|
11
12
|
icon: 'file:form.svg',
|
|
12
13
|
group: ['trigger'],
|
|
13
|
-
version: 1,
|
|
14
14
|
description: 'Runs the flow when an n8n generated webform is submitted',
|
|
15
|
-
|
|
16
|
-
name: 'n8n Form Trigger',
|
|
17
|
-
},
|
|
18
|
-
inputs: [],
|
|
19
|
-
outputs: ['main'],
|
|
20
|
-
webhooks: [
|
|
21
|
-
{
|
|
22
|
-
name: 'setup',
|
|
23
|
-
httpMethod: 'GET',
|
|
24
|
-
responseMode: 'onReceived',
|
|
25
|
-
path: n8n_workflow_1.FORM_TRIGGER_PATH_IDENTIFIER,
|
|
26
|
-
ndvHideUrl: true,
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
name: 'default',
|
|
30
|
-
httpMethod: 'POST',
|
|
31
|
-
responseMode: '={{$parameter["responseMode"]}}',
|
|
32
|
-
path: n8n_workflow_1.FORM_TRIGGER_PATH_IDENTIFIER,
|
|
33
|
-
ndvHideMethod: true,
|
|
34
|
-
},
|
|
35
|
-
],
|
|
36
|
-
eventTriggerDescription: 'Waiting for you to submit the form',
|
|
37
|
-
activationMessage: 'You can now make calls to your production Form URL.',
|
|
38
|
-
triggerPanel: {
|
|
39
|
-
header: 'Pull in a test form submission',
|
|
40
|
-
executionsHelp: {
|
|
41
|
-
inactive: "Form Trigger has two modes: test and production. <br /> <br /> <b>Use test mode while you build your workflow</b>. Click the 'Test Step' button, then fill out the test form that opens in a popup tab. The executions will show up in the editor.<br /> <br /> <b>Use production mode to run your workflow automatically</b>. <a data-key=\"activate\">Activate</a> the workflow, then make requests to the production URL. Then every time there's a form submission via the Production Form URL, the workflow will execute. These executions will show up in the executions list, but not in the editor.",
|
|
42
|
-
active: "Form Trigger has two modes: test and production. <br /> <br /> <b>Use test mode while you build your workflow</b>. Click the 'Test Step' button, then fill out the test form that opens in a popup tab. The executions will show up in the editor.<br /> <br /> <b>Use production mode to run your workflow automatically</b>. <a data-key=\"activate\">Activate</a> the workflow, then make requests to the production URL. Then every time there's a form submission via the Production Form URL, the workflow will execute. These executions will show up in the executions list, but not in the editor.",
|
|
43
|
-
},
|
|
44
|
-
activationHint: {
|
|
45
|
-
active: "This node will also trigger automatically on new form submissions (but those executions won't show up here).",
|
|
46
|
-
inactive: '<a data-key="activate">Activate</a> this workflow to have it also run automatically for new form submissions created via the Production URL.',
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
properties: [
|
|
50
|
-
{
|
|
51
|
-
displayName: 'Form Title',
|
|
52
|
-
name: 'formTitle',
|
|
53
|
-
type: 'string',
|
|
54
|
-
default: '',
|
|
55
|
-
placeholder: 'e.g. Contact us',
|
|
56
|
-
required: true,
|
|
57
|
-
description: 'Shown at the top of the form',
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
displayName: 'Form Description',
|
|
61
|
-
name: 'formDescription',
|
|
62
|
-
type: 'string',
|
|
63
|
-
default: '',
|
|
64
|
-
placeholder: "e.g. We'll get back to you soon",
|
|
65
|
-
description: 'Shown underneath the Form Title. Can be used to prompt the user on how to complete the form.',
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
displayName: 'Form Fields',
|
|
69
|
-
name: 'formFields',
|
|
70
|
-
placeholder: 'Add Form Field',
|
|
71
|
-
type: 'fixedCollection',
|
|
72
|
-
default: { values: [{ label: '', fieldType: 'text' }] },
|
|
73
|
-
typeOptions: {
|
|
74
|
-
multipleValues: true,
|
|
75
|
-
sortable: true,
|
|
76
|
-
},
|
|
77
|
-
options: [
|
|
78
|
-
{
|
|
79
|
-
displayName: 'Values',
|
|
80
|
-
name: 'values',
|
|
81
|
-
values: [
|
|
82
|
-
{
|
|
83
|
-
displayName: 'Field Label',
|
|
84
|
-
name: 'fieldLabel',
|
|
85
|
-
type: 'string',
|
|
86
|
-
default: '',
|
|
87
|
-
placeholder: 'e.g. What is your name?',
|
|
88
|
-
description: 'Label appears above the input field',
|
|
89
|
-
required: true,
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
displayName: 'Field Type',
|
|
93
|
-
name: 'fieldType',
|
|
94
|
-
type: 'options',
|
|
95
|
-
default: 'text',
|
|
96
|
-
description: 'The type of field to add to the form',
|
|
97
|
-
options: [
|
|
98
|
-
{
|
|
99
|
-
name: 'Date',
|
|
100
|
-
value: 'date',
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
name: 'Dropdown List',
|
|
104
|
-
value: 'dropdown',
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
name: 'Number',
|
|
108
|
-
value: 'number',
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
name: 'Password',
|
|
112
|
-
value: 'password',
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
name: 'Text',
|
|
116
|
-
value: 'text',
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
name: 'Textarea',
|
|
120
|
-
value: 'textarea',
|
|
121
|
-
},
|
|
122
|
-
],
|
|
123
|
-
required: true,
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
displayName: 'Field Options',
|
|
127
|
-
name: 'fieldOptions',
|
|
128
|
-
placeholder: 'Add Field Option',
|
|
129
|
-
description: 'List of options that can be selected from the dropdown',
|
|
130
|
-
type: 'fixedCollection',
|
|
131
|
-
default: { values: [{ option: '' }] },
|
|
132
|
-
required: true,
|
|
133
|
-
displayOptions: {
|
|
134
|
-
show: {
|
|
135
|
-
fieldType: ['dropdown'],
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
typeOptions: {
|
|
139
|
-
multipleValues: true,
|
|
140
|
-
sortable: true,
|
|
141
|
-
},
|
|
142
|
-
options: [
|
|
143
|
-
{
|
|
144
|
-
displayName: 'Values',
|
|
145
|
-
name: 'values',
|
|
146
|
-
values: [
|
|
147
|
-
{
|
|
148
|
-
displayName: 'Option',
|
|
149
|
-
name: 'option',
|
|
150
|
-
type: 'string',
|
|
151
|
-
default: '',
|
|
152
|
-
},
|
|
153
|
-
],
|
|
154
|
-
},
|
|
155
|
-
],
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
displayName: 'Multiple Choice',
|
|
159
|
-
name: 'multiselect',
|
|
160
|
-
type: 'boolean',
|
|
161
|
-
default: false,
|
|
162
|
-
description: 'Whether to allow the user to select multiple options from the dropdown list',
|
|
163
|
-
displayOptions: {
|
|
164
|
-
show: {
|
|
165
|
-
fieldType: ['dropdown'],
|
|
166
|
-
},
|
|
167
|
-
},
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
displayName: 'Required Field',
|
|
171
|
-
name: 'requiredField',
|
|
172
|
-
type: 'boolean',
|
|
173
|
-
default: false,
|
|
174
|
-
description: 'Whether to require the user to enter a value for this field before submitting the form',
|
|
175
|
-
},
|
|
176
|
-
],
|
|
177
|
-
},
|
|
178
|
-
],
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
displayName: 'Respond When',
|
|
182
|
-
name: 'responseMode',
|
|
183
|
-
type: 'options',
|
|
184
|
-
options: [
|
|
185
|
-
{
|
|
186
|
-
name: 'Form Is Submitted',
|
|
187
|
-
value: 'onReceived',
|
|
188
|
-
description: 'As soon as this node receives the form submission',
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
name: 'Workflow Finishes',
|
|
192
|
-
value: 'lastNode',
|
|
193
|
-
description: 'When the last node of the workflow is executed',
|
|
194
|
-
},
|
|
195
|
-
],
|
|
196
|
-
default: 'onReceived',
|
|
197
|
-
description: 'When to respond to the form submission',
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
displayName: 'Options',
|
|
201
|
-
name: 'options',
|
|
202
|
-
type: 'collection',
|
|
203
|
-
placeholder: 'Add Option',
|
|
204
|
-
default: {},
|
|
205
|
-
options: [
|
|
206
|
-
{
|
|
207
|
-
displayName: 'Form Submitted Text',
|
|
208
|
-
name: 'formSubmittedText',
|
|
209
|
-
description: 'The text displayed to users after they filled the form',
|
|
210
|
-
type: 'string',
|
|
211
|
-
default: 'Your response has been recorded',
|
|
212
|
-
},
|
|
213
|
-
],
|
|
214
|
-
},
|
|
215
|
-
],
|
|
15
|
+
defaultVersion: 2,
|
|
216
16
|
};
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
const webhookName = this.getWebhookName();
|
|
221
|
-
const mode = this.getMode() === 'manual' ? 'test' : 'production';
|
|
222
|
-
const formFields = this.getNodeParameter('formFields.values', []);
|
|
223
|
-
if (webhookName === 'setup') {
|
|
224
|
-
const formTitle = this.getNodeParameter('formTitle', '');
|
|
225
|
-
const formDescription = this.getNodeParameter('formDescription', '');
|
|
226
|
-
const instanceId = this.getInstanceId();
|
|
227
|
-
const { formSubmittedText } = this.getNodeParameter('options', {});
|
|
228
|
-
const data = (0, utils_1.prepareFormData)(formTitle, formDescription, formSubmittedText, formFields, mode === 'test', instanceId);
|
|
229
|
-
const res = this.getResponseObject();
|
|
230
|
-
res.render('form-trigger', data);
|
|
231
|
-
return {
|
|
232
|
-
noWebhookResponse: true,
|
|
233
|
-
};
|
|
234
|
-
}
|
|
235
|
-
const bodyData = (_a = this.getBodyData().data) !== null && _a !== void 0 ? _a : {};
|
|
236
|
-
const returnData = {};
|
|
237
|
-
for (const [index, field] of formFields.entries()) {
|
|
238
|
-
const key = `field-${index}`;
|
|
239
|
-
let value = (_b = bodyData[key]) !== null && _b !== void 0 ? _b : null;
|
|
240
|
-
if (value === null)
|
|
241
|
-
returnData[field.fieldLabel] = null;
|
|
242
|
-
if (field.fieldType === 'number') {
|
|
243
|
-
value = Number(value);
|
|
244
|
-
}
|
|
245
|
-
if (field.fieldType === 'text') {
|
|
246
|
-
value = String(value).trim();
|
|
247
|
-
}
|
|
248
|
-
if (field.multiselect && typeof value === 'string') {
|
|
249
|
-
value = (0, n8n_workflow_1.jsonParse)(value);
|
|
250
|
-
}
|
|
251
|
-
returnData[field.fieldLabel] = value;
|
|
252
|
-
}
|
|
253
|
-
returnData.submittedAt = new Date().toISOString();
|
|
254
|
-
returnData.formMode = mode;
|
|
255
|
-
const webhookResponse = { status: 200 };
|
|
256
|
-
return {
|
|
257
|
-
webhookResponse,
|
|
258
|
-
workflowData: [this.helpers.returnJsonArray(returnData)],
|
|
17
|
+
const nodeVersions = {
|
|
18
|
+
1: new FormTriggerV1_node_1.FormTriggerV1(baseDescription),
|
|
19
|
+
2: new FormTriggerV2_node_1.FormTriggerV2(baseDescription),
|
|
259
20
|
};
|
|
21
|
+
super(nodeVersions, baseDescription);
|
|
260
22
|
}
|
|
261
23
|
}
|
|
262
24
|
exports.FormTrigger = FormTrigger;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormTrigger.node.js","sourceRoot":"","sources":["../../../nodes/Form/FormTrigger.node.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"FormTrigger.node.js","sourceRoot":"","sources":["../../../nodes/Form/FormTrigger.node.ts"],"names":[],"mappings":";;;AACA,+CAAiD;AACjD,gEAAwD;AACxD,gEAAwD;AAExD,MAAa,WAAY,SAAQ,gCAAiB;IACjD;QACC,MAAM,eAAe,GAA6B;YACjD,WAAW,EAAE,kBAAkB;YAC/B,IAAI,EAAE,aAAa;YACnB,IAAI,EAAE,eAAe;YACrB,KAAK,EAAE,CAAC,SAAS,CAAC;YAClB,WAAW,EAAE,0DAA0D;YACvE,cAAc,EAAE,CAAC;SACjB,CAAC;QAEF,MAAM,YAAY,GAAuC;YACxD,CAAC,EAAE,IAAI,kCAAa,CAAC,eAAe,CAAC;YACrC,CAAC,EAAE,IAAI,kCAAa,CAAC,eAAe,CAAC;SACrC,CAAC;QAEF,KAAK,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC;IACtC,CAAC;CACD;AAlBD,kCAkBC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare const webhookPath: INodeProperties;
|
|
3
|
+
export declare const formTitle: INodeProperties;
|
|
4
|
+
export declare const formDescription: INodeProperties;
|
|
5
|
+
export declare const formFields: INodeProperties;
|
|
6
|
+
export declare const formRespondMode: INodeProperties;
|
|
7
|
+
export declare const formTriggerPanel: {
|
|
8
|
+
header: string;
|
|
9
|
+
executionsHelp: {
|
|
10
|
+
inactive: string;
|
|
11
|
+
active: string;
|
|
12
|
+
};
|
|
13
|
+
activationHint: {
|
|
14
|
+
active: string;
|
|
15
|
+
inactive: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export declare const respondWithOptions: INodeProperties;
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.respondWithOptions = exports.formTriggerPanel = exports.formRespondMode = exports.formFields = exports.formDescription = exports.formTitle = exports.webhookPath = void 0;
|
|
4
|
+
exports.webhookPath = {
|
|
5
|
+
displayName: 'Form Path',
|
|
6
|
+
name: 'path',
|
|
7
|
+
type: 'string',
|
|
8
|
+
default: '',
|
|
9
|
+
placeholder: 'webhook',
|
|
10
|
+
required: true,
|
|
11
|
+
description: "The final segment of the form's URL, both for test and production",
|
|
12
|
+
};
|
|
13
|
+
exports.formTitle = {
|
|
14
|
+
displayName: 'Form Title',
|
|
15
|
+
name: 'formTitle',
|
|
16
|
+
type: 'string',
|
|
17
|
+
default: '',
|
|
18
|
+
placeholder: 'e.g. Contact us',
|
|
19
|
+
required: true,
|
|
20
|
+
description: 'Shown at the top of the form',
|
|
21
|
+
};
|
|
22
|
+
exports.formDescription = {
|
|
23
|
+
displayName: 'Form Description',
|
|
24
|
+
name: 'formDescription',
|
|
25
|
+
type: 'string',
|
|
26
|
+
default: '',
|
|
27
|
+
placeholder: "e.g. We'll get back to you soon",
|
|
28
|
+
description: 'Shown underneath the Form Title. Can be used to prompt the user on how to complete the form.',
|
|
29
|
+
};
|
|
30
|
+
exports.formFields = {
|
|
31
|
+
displayName: 'Form Fields',
|
|
32
|
+
name: 'formFields',
|
|
33
|
+
placeholder: 'Add Form Field',
|
|
34
|
+
type: 'fixedCollection',
|
|
35
|
+
default: { values: [{ label: '', fieldType: 'text' }] },
|
|
36
|
+
typeOptions: {
|
|
37
|
+
multipleValues: true,
|
|
38
|
+
sortable: true,
|
|
39
|
+
},
|
|
40
|
+
options: [
|
|
41
|
+
{
|
|
42
|
+
displayName: 'Values',
|
|
43
|
+
name: 'values',
|
|
44
|
+
values: [
|
|
45
|
+
{
|
|
46
|
+
displayName: 'Field Label',
|
|
47
|
+
name: 'fieldLabel',
|
|
48
|
+
type: 'string',
|
|
49
|
+
default: '',
|
|
50
|
+
placeholder: 'e.g. What is your name?',
|
|
51
|
+
description: 'Label appears above the input field',
|
|
52
|
+
required: true,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
displayName: 'Field Type',
|
|
56
|
+
name: 'fieldType',
|
|
57
|
+
type: 'options',
|
|
58
|
+
default: 'text',
|
|
59
|
+
description: 'The type of field to add to the form',
|
|
60
|
+
options: [
|
|
61
|
+
{
|
|
62
|
+
name: 'Date',
|
|
63
|
+
value: 'date',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: 'Dropdown List',
|
|
67
|
+
value: 'dropdown',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'Number',
|
|
71
|
+
value: 'number',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: 'Password',
|
|
75
|
+
value: 'password',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: 'Text',
|
|
79
|
+
value: 'text',
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: 'Textarea',
|
|
83
|
+
value: 'textarea',
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
required: true,
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
displayName: 'Field Options',
|
|
90
|
+
name: 'fieldOptions',
|
|
91
|
+
placeholder: 'Add Field Option',
|
|
92
|
+
description: 'List of options that can be selected from the dropdown',
|
|
93
|
+
type: 'fixedCollection',
|
|
94
|
+
default: { values: [{ option: '' }] },
|
|
95
|
+
required: true,
|
|
96
|
+
displayOptions: {
|
|
97
|
+
show: {
|
|
98
|
+
fieldType: ['dropdown'],
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
typeOptions: {
|
|
102
|
+
multipleValues: true,
|
|
103
|
+
sortable: true,
|
|
104
|
+
},
|
|
105
|
+
options: [
|
|
106
|
+
{
|
|
107
|
+
displayName: 'Values',
|
|
108
|
+
name: 'values',
|
|
109
|
+
values: [
|
|
110
|
+
{
|
|
111
|
+
displayName: 'Option',
|
|
112
|
+
name: 'option',
|
|
113
|
+
type: 'string',
|
|
114
|
+
default: '',
|
|
115
|
+
},
|
|
116
|
+
],
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
displayName: 'Multiple Choice',
|
|
122
|
+
name: 'multiselect',
|
|
123
|
+
type: 'boolean',
|
|
124
|
+
default: false,
|
|
125
|
+
description: 'Whether to allow the user to select multiple options from the dropdown list',
|
|
126
|
+
displayOptions: {
|
|
127
|
+
show: {
|
|
128
|
+
fieldType: ['dropdown'],
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
displayName: 'Required Field',
|
|
134
|
+
name: 'requiredField',
|
|
135
|
+
type: 'boolean',
|
|
136
|
+
default: false,
|
|
137
|
+
description: 'Whether to require the user to enter a value for this field before submitting the form',
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
};
|
|
143
|
+
exports.formRespondMode = {
|
|
144
|
+
displayName: 'Respond When',
|
|
145
|
+
name: 'responseMode',
|
|
146
|
+
type: 'options',
|
|
147
|
+
options: [
|
|
148
|
+
{
|
|
149
|
+
name: 'Form Is Submitted',
|
|
150
|
+
value: 'onReceived',
|
|
151
|
+
description: 'As soon as this node receives the form submission',
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
name: 'Workflow Finishes',
|
|
155
|
+
value: 'lastNode',
|
|
156
|
+
description: 'When the last node of the workflow is executed',
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
name: "Using 'Respond to Webhook' Node",
|
|
160
|
+
value: 'responseNode',
|
|
161
|
+
description: "When the 'Respond to Webhook' node is executed",
|
|
162
|
+
},
|
|
163
|
+
],
|
|
164
|
+
default: 'onReceived',
|
|
165
|
+
description: 'When to respond to the form submission',
|
|
166
|
+
};
|
|
167
|
+
exports.formTriggerPanel = {
|
|
168
|
+
header: 'Pull in a test form submission',
|
|
169
|
+
executionsHelp: {
|
|
170
|
+
inactive: "Form Trigger has two modes: test and production. <br /> <br /> <b>Use test mode while you build your workflow</b>. Click the 'Test Step' button, then fill out the test form that opens in a popup tab. The executions will show up in the editor.<br /> <br /> <b>Use production mode to run your workflow automatically</b>. <a data-key=\"activate\">Activate</a> the workflow, then make requests to the production URL. Then every time there's a form submission via the Production Form URL, the workflow will execute. These executions will show up in the executions list, but not in the editor.",
|
|
171
|
+
active: "Form Trigger has two modes: test and production. <br /> <br /> <b>Use test mode while you build your workflow</b>. Click the 'Test Step' button, then fill out the test form that opens in a popup tab. The executions will show up in the editor.<br /> <br /> <b>Use production mode to run your workflow automatically</b>. <a data-key=\"activate\">Activate</a> the workflow, then make requests to the production URL. Then every time there's a form submission via the Production Form URL, the workflow will execute. These executions will show up in the executions list, but not in the editor.",
|
|
172
|
+
},
|
|
173
|
+
activationHint: {
|
|
174
|
+
active: "This node will also trigger automatically on new form submissions (but those executions won't show up here).",
|
|
175
|
+
inactive: '<a data-key="activate">Activate</a> this workflow to have it also run automatically for new form submissions created via the Production URL.',
|
|
176
|
+
},
|
|
177
|
+
};
|
|
178
|
+
exports.respondWithOptions = {
|
|
179
|
+
displayName: 'Form Response',
|
|
180
|
+
name: 'respondWithOptions',
|
|
181
|
+
type: 'fixedCollection',
|
|
182
|
+
placeholder: 'Add Option',
|
|
183
|
+
default: { values: { respondWith: 'text' } },
|
|
184
|
+
options: [
|
|
185
|
+
{
|
|
186
|
+
displayName: 'Values',
|
|
187
|
+
name: 'values',
|
|
188
|
+
values: [
|
|
189
|
+
{
|
|
190
|
+
displayName: 'Respond With',
|
|
191
|
+
name: 'respondWith',
|
|
192
|
+
type: 'options',
|
|
193
|
+
default: 'text',
|
|
194
|
+
options: [
|
|
195
|
+
{
|
|
196
|
+
name: 'Form Submitted Text',
|
|
197
|
+
value: 'text',
|
|
198
|
+
description: 'Show a response text to the user',
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
name: 'Redirect URL',
|
|
202
|
+
value: 'redirect',
|
|
203
|
+
description: 'Redirect the user to a URL',
|
|
204
|
+
},
|
|
205
|
+
],
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
displayName: 'Text to Show',
|
|
209
|
+
name: 'formSubmittedText',
|
|
210
|
+
description: "The text displayed to users after they fill the form. Leave it empty if don't want to show any additional text.",
|
|
211
|
+
type: 'string',
|
|
212
|
+
default: 'Your response has been recorded',
|
|
213
|
+
displayOptions: {
|
|
214
|
+
show: {
|
|
215
|
+
respondWith: ['text'],
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
displayName: 'URL to Redirect to',
|
|
221
|
+
name: 'redirectUrl',
|
|
222
|
+
description: 'The URL to redirect users to after they fill the form. Must be a valid URL.',
|
|
223
|
+
type: 'string',
|
|
224
|
+
default: '',
|
|
225
|
+
validateType: 'url',
|
|
226
|
+
placeholder: 'e.g. http://www.n8n.io',
|
|
227
|
+
displayOptions: {
|
|
228
|
+
show: {
|
|
229
|
+
respondWith: ['redirect'],
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
],
|
|
234
|
+
},
|
|
235
|
+
],
|
|
236
|
+
};
|
|
237
|
+
//# sourceMappingURL=common.descriptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.descriptions.js","sourceRoot":"","sources":["../../../nodes/Form/common.descriptions.ts"],"names":[],"mappings":";;;AAGa,QAAA,WAAW,GAAoB;IAC3C,WAAW,EAAE,WAAW;IACxB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,EAAE;IACX,WAAW,EAAE,SAAS;IACtB,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,mEAAmE;CAChF,CAAC;AAEW,QAAA,SAAS,GAAoB;IACzC,WAAW,EAAE,YAAY;IACzB,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,EAAE;IACX,WAAW,EAAE,iBAAiB;IAC9B,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,8BAA8B;CAC3C,CAAC;AAEW,QAAA,eAAe,GAAoB;IAC/C,WAAW,EAAE,kBAAkB;IAC/B,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,EAAE;IACX,WAAW,EAAE,iCAAiC;IAC9C,WAAW,EACV,8FAA8F;CAC/F,CAAC;AAEW,QAAA,UAAU,GAAoB;IAC1C,WAAW,EAAE,aAAa;IAC1B,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,gBAAgB;IAC7B,IAAI,EAAE,iBAAiB;IACvB,OA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AE,EAAE;oBACX,YAAY,EAAE,KAAK;oBACnB,WAAW,EAAE,wBAAwB;oBACrC,cAAc,EAAE;wBACf,IAAI,EAAE;4BACL,WAAW,EAAE,CAAC,UAAU,CAAC;yBACzB;qBACD;iBACD;aACD;SACD;KACD;CACD,CAAC"}
|
|
@@ -1,2 +1,12 @@
|
|
|
1
|
+
import { type IDataObject, type IWebhookFunctions } from 'n8n-workflow';
|
|
1
2
|
import type { FormField, FormTriggerData } from './interfaces';
|
|
2
|
-
export declare const prepareFormData: (formTitle: string, formDescription: string, formSubmittedText: string | undefined, formFields: FormField[], testRun: boolean, instanceId?: string) => FormTriggerData;
|
|
3
|
+
export declare const prepareFormData: (formTitle: string, formDescription: string, formSubmittedText: string | undefined, redirectUrl: string | undefined, formFields: FormField[], testRun: boolean, instanceId?: string, useResponseData?: boolean) => FormTriggerData;
|
|
4
|
+
export declare function formWebhook(context: IWebhookFunctions): Promise<{
|
|
5
|
+
noWebhookResponse: boolean;
|
|
6
|
+
webhookResponse?: undefined;
|
|
7
|
+
workflowData?: undefined;
|
|
8
|
+
} | {
|
|
9
|
+
webhookResponse: IDataObject;
|
|
10
|
+
workflowData: import("n8n-workflow").INodeExecutionData[][];
|
|
11
|
+
noWebhookResponse?: undefined;
|
|
12
|
+
}>;
|