n8n-nodes-qlik-cloud 1.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/.eslintrc.cjs ADDED
@@ -0,0 +1,18 @@
1
+ module.exports = {
2
+ parser: '@typescript-eslint/parser',
3
+ extends: [
4
+ 'eslint:recommended',
5
+ 'plugin:@typescript-eslint/recommended',
6
+ ],
7
+ env: {
8
+ node: true,
9
+ es2020: true,
10
+ },
11
+ parserOptions: {
12
+ ecmaVersion: 2020,
13
+ sourceType: 'module',
14
+ },
15
+ rules: {
16
+ '@typescript-eslint/no-explicit-any': 'warn',
17
+ },
18
+ };
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 n8n-nodes-qlik-cloud contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,122 @@
1
+ # n8n-nodes-qlik-cloud
2
+
3
+ This package contains an n8n community node for integrating with **Qlik Cloud** REST APIs.
4
+
5
+ ## Features
6
+
7
+ Complete integration with Qlik Cloud REST APIs covering:
8
+
9
+ ### Apps Management
10
+ - **Get All Apps** - Retrieve all apps with filtering and pagination
11
+ - **Get App** - Retrieve a specific app by ID
12
+ - **Create App** - Create a new app
13
+ - **Update App** - Update app properties
14
+ - **Delete App** - Delete an app
15
+ - **Copy App** - Create a copy of an app
16
+ - **Export App** - Export app data
17
+ - **Publish App** - Publish app to a space
18
+ - **Get Privileges** - Retrieve app access privileges
19
+
20
+ ### Assistants
21
+ - **Get All Assistants** - List all available assistants
22
+ - **Get Assistant** - Retrieve a specific assistant by ID
23
+ - **Create Assistant** - Create a new assistant
24
+ - **Search** - Perform semantic search in assistant sources
25
+ - **Delete Assistant** - Delete an assistant
26
+
27
+ ### Audits
28
+ - **Get All Audits** - List recent audit events with filtering
29
+ - **Get Audit** - Retrieve a specific audit event by ID
30
+ - **Get Sources** - List possible audit event sources
31
+ - **Get Types** - List possible audit event types
32
+ - **Get Settings** - Retrieve audit server configuration
33
+
34
+ ### Items
35
+ - **Get All Items** - List items accessible to the user
36
+ - **Get Item** - Retrieve a specific item by ID
37
+ - **Update Item** - Update item properties
38
+ - **Delete Item** - Delete an item
39
+ - **Collections** - List collections (tags) for an item
40
+ - **Published Items** - List published copies of an item
41
+ - **Settings** - Get or update items service settings
42
+
43
+ ## Authentication
44
+
45
+ This node supports **Bearer Token Authentication**:
46
+
47
+ 1. **Get your Qlik Cloud tenant URL**
48
+ - Format: `https://{tenant}.{region}.qlikcloud.com`
49
+ - Example: `https://mycompany.us.qlikcloud.com`
50
+
51
+ 2. **Generate an API Key**
52
+ - Access your Qlik Cloud console
53
+ - Navigate to API Keys section
54
+ - Create a new API key with appropriate scopes
55
+ - Copy the generated token
56
+
57
+ 3. **Configure credentials in n8n**
58
+ - Create a new "Qlik Cloud API" credential
59
+ - Paste your tenant URL
60
+ - Paste your API key as the access token
61
+
62
+ ## Installation
63
+
64
+ To install this node in your n8n instance:
65
+
66
+ ```bash
67
+ npm install n8n-nodes-qlik-cloud
68
+ ```
69
+
70
+ ## Configuration
71
+
72
+ ### Node Configuration
73
+
74
+ 1. Add the **Qlik Cloud** node to your workflow
75
+ 2. Select the **Resource** (Apps, Assistants, Audits, or Items)
76
+ 3. Select the **Operation** you want to perform
77
+ 4. Configure any required parameters
78
+ 5. Set up your Qlik Cloud API credentials
79
+
80
+ ### Example: List All Apps
81
+
82
+ 1. Add a **Qlik Cloud** node
83
+ 2. Select Resource: **Apps**
84
+ 3. Select Operation: **Get All**
85
+ 4. Configure return settings (return all or limit)
86
+ 5. Set Qlik Cloud credentials
87
+ 6. Execute the workflow
88
+
89
+ ## API Documentation
90
+
91
+ For detailed API documentation, visit:
92
+ - [Qlik Cloud REST APIs](https://qlik.dev/apis/rest/)
93
+ - [Apps API](https://qlik.dev/apis/rest/apps)
94
+ - [Items API](https://qlik.dev/apis/rest/items)
95
+ - [Audits API](https://qlik.dev/apis/rest/audits)
96
+ - [Assistants API](https://qlik.dev/apis/rest/assistants)
97
+
98
+ ## Limitations
99
+
100
+ - **Rate Limiting**: The Qlik Cloud API has rate limits per tier. Check documentation for your plan.
101
+ - **Permissions**: Many operations require specific permissions in Qlik Cloud
102
+ - **Binary Operations**: File upload/download operations return data references; handle file transfers separately
103
+ - **Pagination**: Use `returnAll` option to retrieve all results or `limit` for pagination
104
+
105
+ ## Support
106
+
107
+ For issues or feature requests:
108
+ - GitHub Issues: [n8n-nodes-qlik-cloud](https://github.com/yourusername/n8n-nodes-qlik-cloud/issues)
109
+ - n8n Community: [n8n Community Forum](https://community.n8n.io)
110
+
111
+ ## License
112
+
113
+ MIT
114
+
115
+ ## Contributing
116
+
117
+ Contributions are welcome! Please fork this repository and submit pull requests.
118
+
119
+ ## Changelog
120
+
121
+ ### Version 1.0.0
122
+ - Initial release with support for Apps, Items, Audits, and Assistants APIs
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "n8n-nodes-qlik-cloud",
3
+ "version": "1.0.0",
4
+ "description": "n8n node for Qlik Cloud REST APIs integration",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "scripts": {
8
+ "build": "tsc",
9
+ "dev": "tsc --watch",
10
+ "lint": "eslint src/",
11
+ "test": "jest"
12
+ },
13
+ "n8n": {
14
+ "nodes": [
15
+ "dist/nodes/QlikCloud/QlikCloud.node.js"
16
+ ],
17
+ "credentials": [
18
+ "dist/credentials/QlikCloudApi.credentials.js",
19
+ "dist/credentials/QlikCloudOAuth2Api.credentials.js"
20
+ ]
21
+ },
22
+ "keywords": [
23
+ "n8n",
24
+ "qlik",
25
+ "qlik-cloud",
26
+ "api",
27
+ "automation"
28
+ ],
29
+ "author": "Your Name",
30
+ "license": "MIT",
31
+ "devDependencies": {
32
+ "@types/node": "^18.0.0",
33
+ "@typescript-eslint/eslint-plugin": "^5.0.0",
34
+ "@typescript-eslint/parser": "^5.0.0",
35
+ "eslint": "^8.0.0",
36
+ "jest": "^29.0.0",
37
+ "typescript": "^5.0.0"
38
+ },
39
+ "dependencies": {
40
+ "n8n-core": "*",
41
+ "n8n-workflow": "*",
42
+ "axios": "^1.4.0"
43
+ }
44
+ }
@@ -0,0 +1,33 @@
1
+ import type {
2
+ ICredentialType,
3
+ INodeProperties,
4
+ } from 'n8n-workflow';
5
+
6
+ export class QlikCloudApi implements ICredentialType {
7
+ name = 'qlikCloudApi';
8
+ displayName = 'Qlik Cloud API';
9
+ documentationUrl = 'https://qlik.dev/apis/rest/';
10
+
11
+ properties: INodeProperties[] = [
12
+ {
13
+ displayName: 'Tenant URL',
14
+ name: 'baseUrl',
15
+ type: 'string',
16
+ default: '',
17
+ required: true,
18
+ placeholder: 'https://{tenant}.{region}.qlikcloud.com',
19
+ description: 'The base URL of your Qlik Cloud tenant',
20
+ },
21
+ {
22
+ displayName: 'API Key (Access Token)',
23
+ name: 'accessToken',
24
+ type: 'string',
25
+ typeOptions: {
26
+ password: true,
27
+ },
28
+ default: '',
29
+ required: true,
30
+ description: 'Bearer token for API authentication. Generate from Qlik Cloud console',
31
+ },
32
+ ];
33
+ }
@@ -0,0 +1,80 @@
1
+ import type {
2
+ ICredentialType,
3
+ INodeProperties,
4
+ } from 'n8n-workflow';
5
+
6
+ const scopes = [
7
+ 'https://analysis.windows.net/powerbi/api/.default',
8
+ ];
9
+
10
+ export class QlikCloudOAuth2Api implements ICredentialType {
11
+ name = 'qlikCloudOAuth2Api';
12
+ displayName = 'Qlik Cloud OAuth2 API';
13
+ documentationUrl = 'https://qlik.dev/authenticate/';
14
+ extends = ['oAuth2Api'];
15
+
16
+ properties: INodeProperties[] = [
17
+ {
18
+ displayName: 'Tenant URL',
19
+ name: 'baseUrl',
20
+ type: 'string',
21
+ default: '',
22
+ required: true,
23
+ placeholder: 'https://{tenant}.{region}.qlikcloud.com',
24
+ description: 'The base URL of your Qlik Cloud tenant',
25
+ },
26
+ {
27
+ displayName: 'Authorization URL',
28
+ name: 'authUrl',
29
+ type: 'hidden',
30
+ default: '',
31
+ required: true,
32
+ },
33
+ {
34
+ displayName: 'Access Token URL',
35
+ name: 'accessTokenUrl',
36
+ type: 'hidden',
37
+ default: '',
38
+ required: true,
39
+ },
40
+ {
41
+ displayName: 'Scope',
42
+ name: 'scope',
43
+ type: 'hidden',
44
+ default: scopes.join(' '),
45
+ description: 'OAuth2 scopes required for Qlik Cloud API access',
46
+ },
47
+ {
48
+ displayName: 'Authentication',
49
+ name: 'authentication',
50
+ type: 'hidden',
51
+ default: 'body',
52
+ },
53
+ ];
54
+
55
+ async preAuthentication(this: any, credentials: any) {
56
+ const baseUrl = credentials.baseUrl as string;
57
+
58
+ // Extract tenant and region from base URL
59
+ // Expected format: https://tenant.region.qlikcloud.com
60
+ const urlParts = new URL(baseUrl);
61
+ const hostname = urlParts.hostname;
62
+ const parts = hostname.split('.');
63
+
64
+ if (parts.length < 3) {
65
+ throw new Error('Invalid Qlik Cloud tenant URL format');
66
+ }
67
+
68
+ const tenant = parts[0];
69
+ const region = parts[1];
70
+
71
+ // Construct OAuth endpoints
72
+ const authEndpoint = `https://auth.${region}.qlikcloud.com/oauth/authorize`;
73
+ const tokenEndpoint = `https://auth.${region}.qlikcloud.com/oauth/token`;
74
+
75
+ credentials.authUrl = authEndpoint;
76
+ credentials.accessTokenUrl = tokenEndpoint;
77
+
78
+ return credentials;
79
+ }
80
+ }
package/src/index.ts ADDED
@@ -0,0 +1 @@
1
+ export { QlikCloud } from './QlikCloud.node';