@worktables/n8n-nodes-worktables 8.0.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/LICENSE.md +19 -0
- package/README.md +46 -0
- package/dist/credentials/WorktablesAPI.credentials.d.ts +7 -0
- package/dist/credentials/WorktablesAPI.credentials.js +22 -0
- package/dist/credentials/WorktablesAPI.credentials.js.map +1 -0
- package/dist/nodes/Worktables/MondayWebhook.node.d.ts +5 -0
- package/dist/nodes/Worktables/MondayWebhook.node.js +53 -0
- package/dist/nodes/Worktables/MondayWebhook.node.js.map +1 -0
- package/dist/nodes/Worktables/MondayWebhook.node.json +27 -0
- package/dist/nodes/Worktables/Worktables.node.d.ts +29 -0
- package/dist/nodes/Worktables/Worktables.node.js +3135 -0
- package/dist/nodes/Worktables/Worktables.node.js.map +1 -0
- package/dist/nodes/Worktables/Worktables.node.json +20 -0
- package/dist/nodes/Worktables/worktables_icon.svg +1 -0
- package/dist/package.json +54 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/index.js +0 -0
- package/package.json +55 -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,46 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
# n8n-nodes-starter
|
|
4
|
+
|
|
5
|
+
This repo contains example nodes to help you get started building your own custom integrations for [n8n](n8n.io). It includes the node linter and other dependencies.
|
|
6
|
+
|
|
7
|
+
To make your custom node available to the community, you must create it as an npm package, and [submit it to the npm registry](https://docs.npmjs.com/packages-and-modules/contributing-packages-to-the-registry).
|
|
8
|
+
|
|
9
|
+
## Prerequisites
|
|
10
|
+
|
|
11
|
+
You need the following installed on your development machine:
|
|
12
|
+
|
|
13
|
+
* [git](https://git-scm.com/downloads)
|
|
14
|
+
* Node.js and pnpm. Minimum version Node 18. You can find instructions on how to install both using nvm (Node Version Manager) for Linux, Mac, and WSL [here](https://github.com/nvm-sh/nvm). For Windows users, refer to Microsoft's guide to [Install NodeJS on Windows](https://docs.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-windows).
|
|
15
|
+
* Install n8n with:
|
|
16
|
+
```
|
|
17
|
+
pnpm install n8n -g
|
|
18
|
+
```
|
|
19
|
+
* Recommended: follow n8n's guide to [set up your development environment](https://docs.n8n.io/integrations/creating-nodes/build/node-development-environment/).
|
|
20
|
+
|
|
21
|
+
## Using this starter
|
|
22
|
+
|
|
23
|
+
These are the basic steps for working with the starter. For detailed guidance on creating and publishing nodes, refer to the [documentation](https://docs.n8n.io/integrations/creating-nodes/).
|
|
24
|
+
|
|
25
|
+
1. [Generate a new repository](https://github.com/n8n-io/n8n-nodes-starter/generate) from this template repository.
|
|
26
|
+
2. Clone your new repo:
|
|
27
|
+
```
|
|
28
|
+
git clone https://github.com/<your organization>/<your-repo-name>.git
|
|
29
|
+
```
|
|
30
|
+
3. Run `pnpm i` to install dependencies.
|
|
31
|
+
4. Open the project in your editor.
|
|
32
|
+
5. Browse the examples in `/nodes` and `/credentials`. Modify the examples, or replace them with your own nodes.
|
|
33
|
+
6. Update the `package.json` to match your details.
|
|
34
|
+
7. Run `pnpm lint` to check for errors or `pnpm lintfix` to automatically fix errors when possible.
|
|
35
|
+
8. Test your node locally. Refer to [Run your node locally](https://docs.n8n.io/integrations/creating-nodes/test/run-node-locally/) for guidance.
|
|
36
|
+
9. Replace this README with documentation for your node. Use the [README_TEMPLATE](README_TEMPLATE.md) to get started.
|
|
37
|
+
10. Update the LICENSE file to use your details.
|
|
38
|
+
11. [Publish](https://docs.npmjs.com/packages-and-modules/contributing-packages-to-the-registry) your package to npm.
|
|
39
|
+
|
|
40
|
+
## More information
|
|
41
|
+
|
|
42
|
+
Refer to our [documentation on creating nodes](https://docs.n8n.io/integrations/creating-nodes/) for detailed information on building your own nodes.
|
|
43
|
+
|
|
44
|
+
## License
|
|
45
|
+
|
|
46
|
+
[MIT](https://github.com/n8n-io/n8n-nodes-starter/blob/master/LICENSE.md)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WorktablesAPI = void 0;
|
|
4
|
+
class WorktablesAPI {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'WorktablesApi';
|
|
7
|
+
this.displayName = 'Worktables API';
|
|
8
|
+
this.documentationUrl = 'https://docs.your-api.com';
|
|
9
|
+
this.properties = [
|
|
10
|
+
{
|
|
11
|
+
displayName: 'API Key',
|
|
12
|
+
name: 'apiKey',
|
|
13
|
+
type: 'credentials',
|
|
14
|
+
default: '',
|
|
15
|
+
required: true,
|
|
16
|
+
description: 'The API key to access Worktables',
|
|
17
|
+
},
|
|
18
|
+
];
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.WorktablesAPI = WorktablesAPI;
|
|
22
|
+
//# sourceMappingURL=WorktablesAPI.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorktablesAPI.credentials.js","sourceRoot":"","sources":["../../credentials/WorktablesAPI.credentials.ts"],"names":[],"mappings":";;;AAEA,MAAa,aAAa;IAA1B;QACC,SAAI,GAAG,eAAe,CAAC;QACvB,gBAAW,GAAG,gBAAgB,CAAC;QAC/B,qBAAgB,GAAG,2BAA2B,CAAC;QAE/C,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,aAAa;gBACnB,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,kCAAkC;aAC/C;SACD,CAAC;IACH,CAAC;CAAA;AAfD,sCAeC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IWebhookFunctions, IWebhookResponseData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
export declare class MondayWebhook implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
webhook(this: IWebhookFunctions): Promise<IWebhookResponseData>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MondayWebhook = void 0;
|
|
4
|
+
class MondayWebhook {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.description = {
|
|
7
|
+
displayName: 'Worktables Webhook',
|
|
8
|
+
name: 'mondayWebhook',
|
|
9
|
+
icon: 'file:worktables_icon.svg',
|
|
10
|
+
group: ['trigger'],
|
|
11
|
+
version: 1,
|
|
12
|
+
description: 'Triggers workflows when an event occurs in Monday.com',
|
|
13
|
+
defaults: {
|
|
14
|
+
name: 'Monday Webhook',
|
|
15
|
+
},
|
|
16
|
+
inputs: ["main"],
|
|
17
|
+
outputs: ["main"],
|
|
18
|
+
credentials: [],
|
|
19
|
+
webhooks: [
|
|
20
|
+
{
|
|
21
|
+
name: 'default',
|
|
22
|
+
httpMethod: 'POST',
|
|
23
|
+
responseMode: 'onReceived',
|
|
24
|
+
path: '={{ $parameter["webhookPath"] || "monday-webhook" }}',
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
properties: [
|
|
28
|
+
{
|
|
29
|
+
displayName: 'Webhook Path',
|
|
30
|
+
name: 'webhookPath',
|
|
31
|
+
type: 'string',
|
|
32
|
+
default: 'monday-webhook',
|
|
33
|
+
description: 'Define a custom path for the webhook URL',
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
async webhook() {
|
|
39
|
+
const req = this.getRequestObject();
|
|
40
|
+
const res = this.getResponseObject();
|
|
41
|
+
const body = req.body;
|
|
42
|
+
console.log('Webhook received', body);
|
|
43
|
+
if (body.challenge) {
|
|
44
|
+
res.status(200).json({ challenge: body.challenge });
|
|
45
|
+
return {};
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
workflowData: [this.helpers.returnJsonArray([body])],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.MondayWebhook = MondayWebhook;
|
|
53
|
+
//# sourceMappingURL=MondayWebhook.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MondayWebhook.node.js","sourceRoot":"","sources":["../../../nodes/Worktables/MondayWebhook.node.ts"],"names":[],"mappings":";;;AAWA,MAAa,aAAa;IAA1B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,oBAAoB;YACjC,IAAI,EAAE,eAAe;YACrB,IAAI,EAAE,0BAA0B;YAChC,KAAK,EAAE,CAAC,SAAS,CAAC;YAClB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,uDAAuD;YACpE,QAAQ,EAAE;gBACT,IAAI,EAAE,gBAAgB;aACtB;YACD,MAAM,EAAE,QAAyB;YACjC,OAAO,EAAE,QAAyB;YAClC,WAAW,EAAE,EAAE;YACf,QAAQ,EAAE;gBACT;oBACC,IAAI,EAAE,SAAS;oBACf,UAAU,EAAE,MAAM;oBAClB,YAAY,EAAE,YAAY;oBAC1B,IAAI,EAAE,sDAAsD;iBAC5D;aACD;YACD,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,cAAc;oBAC3B,IAAI,EAAE,aAAa;oBACnB,IAAI,EAAE,QAAQ;oBACd,OAAO,EAAE,gBAAgB;oBACzB,WAAW,EAAE,0CAA0C;iBACvD;aACD;SACD,CAAC;IAqBH,CAAC;IAnBA,KAAK,CAAC,OAAO;QACZ,MAAM,GAAG,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACpC,MAAM,GAAG,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAErC,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;QAEtB,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC;QAGtC,IAAI,IAAI,CAAC,SAAS,EAAE;YACnB,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;YACpD,OAAO,EAAE,CAAC;SACV;QAGD,OAAO;YACN,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;SACpD,CAAC;IACH,CAAC;CACD;AApDD,sCAoDC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "MondayWebhook",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"description": "Triggers workflows when an event occurs in Monday.com",
|
|
5
|
+
"type": "trigger",
|
|
6
|
+
"class": "MondayWebhook",
|
|
7
|
+
"defaults": {
|
|
8
|
+
"name": "Monday Webhook"
|
|
9
|
+
},
|
|
10
|
+
"inputs": [],
|
|
11
|
+
"outputs": [
|
|
12
|
+
{
|
|
13
|
+
"name": "main",
|
|
14
|
+
"type": "output"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"credentials": [],
|
|
18
|
+
"webhooks": [
|
|
19
|
+
{
|
|
20
|
+
"name": "default",
|
|
21
|
+
"httpMethod": "POST",
|
|
22
|
+
"responseMode": "onReceived",
|
|
23
|
+
"path": "monday-webhook"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"properties": []
|
|
27
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { INodeType, INodeTypeDescription, ILoadOptionsFunctions, INodePropertyOptions, IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
|
|
2
|
+
export declare class Worktables implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
methods: {
|
|
5
|
+
loadOptions: {
|
|
6
|
+
getWorkspaces(): Promise<{
|
|
7
|
+
name: string;
|
|
8
|
+
value: string;
|
|
9
|
+
}[]>;
|
|
10
|
+
getBoards(): Promise<{
|
|
11
|
+
name: string;
|
|
12
|
+
value: string;
|
|
13
|
+
}[]>;
|
|
14
|
+
getGroupsFromBoard(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
15
|
+
getItemsFromBoard(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
16
|
+
getSubitemFromItem(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
17
|
+
getColumnsFromBoard(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
18
|
+
getSubscribersFromBoard(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
19
|
+
getSubitems(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
20
|
+
getColumnsItems(this: ILoadOptionsFunctions): Promise<any>;
|
|
21
|
+
getFolders(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
22
|
+
getUsers(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
23
|
+
getTeams(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
24
|
+
getFileColumns(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
25
|
+
getUpdates(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][] | null>;
|
|
29
|
+
}
|