File tree

3 files changed

+13
-31
lines changed

3 files changed

+13
-31
lines changed
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,6 @@ export class LowcoderApi implements ICredentialType {
3030
type: 'string',
3131
default: '',
3232
},
33-
{
34-
displayName: 'API Token',
35-
name: 'apiToken',
36-
type: 'string',
37-
default: '',
38-
},
3933
{
4034
displayName: 'Username',
4135
name: 'username',
@@ -68,9 +62,6 @@ export class LowcoderApi implements ICredentialType {
6862
source: "EMAIL",
6963
authId: "EMAIL"
7064
},
71-
headers: {
72-
LOWCODER_CE_SELFHOST_TOKEN: credentials.apiToken
73-
},
7465
returnFullResponse: true
7566
} as IHttpRequestOptions;
7667
try {
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export const appFields: INodeProperties[] = [
55
// app:create
66
// ----------------------------------
77
{
8-
displayName: 'App',
8+
displayName: 'Select App or Module',
99
name: 'appId',
1010
type: 'resourceLocator',
1111
default: { mode: 'list', value: '' },
@@ -41,7 +41,7 @@ export const appFields: INodeProperties[] = [
4141
];
4242

4343
export const httpMethodsProperty: INodeProperties = {
44-
displayName: 'HTTP Method',
44+
displayName: 'Webhook HTTP Method',
4545
name: 'httpMethod',
4646
type: 'options',
4747
options: [
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export class Lowcoder implements INodeType {
3232
icon: 'file:lowcoder.png',
3333
group: ['transform'],
3434
version: 1,
35-
subtitle: '={{$parameter["resource"] }}:{{ $parameter["appId"]',
35+
subtitle: '=app:{{ $parameter["appId"]',
3636
description: 'Consume Lowcoder API',
3737
defaults: {
3838
name: 'Lowcoder',
@@ -61,23 +61,15 @@ export class Lowcoder implements INodeType {
6161
},
6262
],
6363
properties: [
64-
{
65-
displayName: 'Resource',
66-
name: 'resource',
67-
type: 'options',
68-
noDataExpression: true,
69-
options: [
70-
{
71-
name: 'App',
72-
value: 'app',
73-
}
74-
],
75-
default: 'app',
76-
},
7764
...appFields,
7865
{
79-
displayName:
80-
'The webhook URL will be generated at run time. It can be referenced with the <strong>$execution.resumeUrl</strong> variable. Send it somewhere before getting to this node. <a href="https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.wait/?utm_source=n8n_app&utm_medium=node_settings_modal-credential_link&utm_campaign=n8n-nodes-base.wait" target="_blank">More info</a>',
66+
displayName: 'Resume the workflow by calling this Webhook: http(s)://{n8n-url}/webhook-waiting/{Workflow-Execution-ID}/{Lowcoder-App-ID}',
67+
name: 'webhookNotice',
68+
type: 'notice',
69+
default: '',
70+
},
71+
{
72+
displayName: 'The Workflow-Execution-ID is available via the n8n Rest API',
8173
name: 'webhookNotice',
8274
type: 'notice',
8375
default: '',
@@ -104,7 +96,7 @@ export class Lowcoder implements INodeType {
10496
withContainerSize: false
10597
},
10698
);
107-
99+
console.log(searchResults);
108100
return {
109101
results: searchResults.data.map((b: LowcoderAppType) => ({
110102
name: `${b.name} (${b.applicationType == 2 ? "Module" : "App"})`,
@@ -134,15 +126,14 @@ export class Lowcoder implements INodeType {
134126
resp.end(error.message);
135127
return { noWebhookResponse: true };
136128
}
137-
// const { data } = req.body;
138-
129+
const body = typeof req.body != 'undefined' ? req.body : {};
139130
const returnItem: INodeExecutionData = {
140131
binary: {},
141132
json: {
142133
headers: req.headers,
143134
params: req.params,
144135
query: req.query,
145-
// body: data,
136+
body: body,
146137
},
147138
};
148139
return { workflowData: [[returnItem]] };

0 commit comments

Comments
 (0)