n8n-nodes-linq 3.1.2 → 4.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 +2 -2
- package/README.md +114 -127
- package/dist/credentials/LinqApi.credentials.js +31 -23
- package/dist/nodes/Linq/Linq.node.d.ts +1 -2
- package/dist/nodes/Linq/Linq.node.js +1088 -1029
- package/dist/nodes/LinqTrigger/LinqTrigger.node.js +100 -74
- package/package.json +62 -57
package/LICENSE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2026 Everyday Workflows
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,150 +1,148 @@
|
|
|
1
1
|
# n8n-nodes-linq
|
|
2
2
|
|
|
3
|
-
Linq Partner API
|
|
3
|
+
Community node for the Linq Partner API v3 in n8n. Use this node to manage chats, messages, attachments, phone numbers, webhooks, and contacts from your workflows.
|
|
4
4
|
|
|
5
|
-
-
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
|
|
5
|
+
**Ownership:** The Linq Partner API is owned and operated by Linq (https://linqapp.com/). This repository is community-maintained by Everyday Workflows.
|
|
6
|
+
|
|
7
|
+
**Disclaimer:** This is a community-built integration. It is not affiliated with, endorsed by, or supported by Linq App Inc.
|
|
8
|
+
|
|
9
|
+
**Acceptable use:** Users are responsible for complying with Linq’s Acceptable Use Policy and Apple’s Business Chat guidelines. Automated messaging should only be used for transactional or opted‑in communications.
|
|
10
|
+
|
|
11
|
+
## Quick links
|
|
12
|
+
|
|
13
|
+
- Usage guide: [docs/usage.md](docs/usage.md)
|
|
14
|
+
- API reference (v3): [docs/api-reference.md](docs/api-reference.md)
|
|
15
|
+
- OpenAPI spec: [V3.yaml](V3.yaml)
|
|
16
|
+
- Contributing: [CONTRIBUTING.md](CONTRIBUTING.md)
|
|
17
|
+
- License: [LICENSE.md](LICENSE.md)
|
|
18
|
+
|
|
19
|
+
## Requirements
|
|
20
|
+
|
|
21
|
+
- Node.js >= 20.15
|
|
22
|
+
- n8n compatible with `n8n-workflow` ^1.120.7
|
|
9
23
|
|
|
10
24
|
## Installation (in n8n)
|
|
11
25
|
|
|
12
26
|
- Using the n8n UI:
|
|
13
|
-
1
|
|
14
|
-
2
|
|
15
|
-
3
|
|
27
|
+
1. Settings → Community Nodes → Install
|
|
28
|
+
2. Enter: `n8n-nodes-linq`
|
|
29
|
+
3. Restart n8n if prompted
|
|
16
30
|
|
|
17
31
|
- Headless / environment variable:
|
|
18
32
|
- Add `n8n-nodes-linq` to `N8N_COMMUNITY_PACKAGES` (or install with npm in your instance) and restart n8n.
|
|
19
33
|
|
|
20
34
|
## Credentials
|
|
21
35
|
|
|
22
|
-
Create a new credential of type
|
|
36
|
+
Create a new credential of type **Linq API**:
|
|
23
37
|
|
|
24
|
-
-
|
|
25
|
-
-
|
|
38
|
+
- **API Token**: Linq Partner API token used as `Authorization: Bearer <token>`
|
|
39
|
+
- **Webhook Signing Secret**: Required for Linq Trigger signature verification
|
|
40
|
+
- This is returned **only once** when a webhook subscription is created. Store it securely.
|
|
26
41
|
|
|
27
|
-
Where it
|
|
28
|
-
|
|
42
|
+
Where it’s defined:
|
|
43
|
+
|
|
44
|
+
- [LinqApi.credentials.ts](credentials/LinqApi.credentials.ts:1)
|
|
29
45
|
|
|
30
46
|
## Node usage
|
|
31
47
|
|
|
32
|
-
Add the
|
|
48
|
+
Add the **Linq** node to your workflow. Operations map to Linq Partner API v3 endpoints.
|
|
33
49
|
|
|
34
|
-
- Node implementation:
|
|
35
|
-
|
|
36
|
-
- Icon is configured at the node-level: `icon: 'file:linq.svg'`
|
|
37
|
-
- SVG file: [linq.svg](nodes/Linq/linq.svg:1)
|
|
50
|
+
- Node implementation: [Linq.node.ts](nodes/Linq/Linq.node.ts:1)
|
|
51
|
+
- Icon: [linq.svg](nodes/Linq/linq.svg:1)
|
|
38
52
|
|
|
39
53
|
### Supported resources and operations
|
|
40
54
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
-
|
|
55
|
+
**Chat**
|
|
56
|
+
|
|
57
|
+
- Get Many → `GET /v3/chats` (requires `from`, supports cursor/limit)
|
|
58
|
+
- Get One → `GET /v3/chats/{chatId}`
|
|
59
|
+
- Find → `GET /v3/chats` (with `from` + `phone_numbers[]`)
|
|
60
|
+
- Create → `POST /v3/chats`
|
|
61
|
+
- Share Contact → `POST /v3/chats/{chatId}/share_contact_card`
|
|
62
|
+
|
|
63
|
+
**Chat Message**
|
|
64
|
+
|
|
65
|
+
- Get Many → `GET /v3/chats/{chatId}/messages`
|
|
66
|
+
- Get One → `GET /v3/messages/{messageId}`
|
|
67
|
+
- Create → `POST /v3/chats/{chatId}/messages`
|
|
68
|
+
- Delete → `DELETE /v3/messages/{messageId}`
|
|
69
|
+
- React → `POST /v3/messages/{messageId}/reactions`
|
|
70
|
+
|
|
71
|
+
**Phone Number**
|
|
72
|
+
|
|
73
|
+
- Get Many → `GET /v3/phonenumbers`
|
|
74
|
+
- Update → `PUT /v3/phonenumbers/{phoneNumberId}`
|
|
75
|
+
|
|
76
|
+
**Webhook Subscription**
|
|
77
|
+
|
|
78
|
+
- Get Many → `GET /v3/webhook-subscriptions`
|
|
79
|
+
- Get One → `GET /v3/webhook-subscriptions/{subscriptionId}`
|
|
80
|
+
- Create → `POST /v3/webhook-subscriptions`
|
|
81
|
+
- Update → `PUT /v3/webhook-subscriptions/{subscriptionId}`
|
|
82
|
+
- Delete → `DELETE /v3/webhook-subscriptions/{subscriptionId}`
|
|
83
|
+
|
|
84
|
+
**Contact (extension)**
|
|
85
|
+
|
|
86
|
+
- Create → `POST /v3/contacts`
|
|
87
|
+
- Get One → `GET /v3/contacts/{contactId}`
|
|
88
|
+
- Update → `PUT /v3/contacts/{contactId}`
|
|
89
|
+
- Delete → `DELETE /v3/contacts/{contactId}`
|
|
90
|
+
|
|
91
|
+
**Chat Message (extension)**
|
|
92
|
+
|
|
93
|
+
- Edit → `POST /v3/messages/{messageId}/edit`
|
|
94
|
+
- Get Reaction → `GET /v3/chat_message_reactions/{reactionId}`
|
|
95
|
+
|
|
96
|
+
> **Note:** The “extension” endpoints above are currently implemented in the node but are not present in `V3.yaml`. They will be aligned once the spec is updated.
|
|
97
|
+
|
|
98
|
+
## Linq Trigger Node
|
|
99
|
+
|
|
100
|
+
Add the **Linq Trigger** node to start workflows when Linq events occur. The trigger automatically registers a webhook with Linq when the workflow is activated.
|
|
101
|
+
|
|
102
|
+
**Supported Events**
|
|
103
|
+
|
|
104
|
+
- `message.sent`
|
|
105
|
+
- `message.received`
|
|
106
|
+
- `message.read`
|
|
107
|
+
- `call.completed`
|
|
108
|
+
- `contact.created`
|
|
109
|
+
- `contact.updated`
|
|
110
|
+
- `contact.deleted`
|
|
111
|
+
|
|
112
|
+
**Security**
|
|
113
|
+
|
|
114
|
+
- The trigger verifies Linq webhooks using HMAC-SHA256
|
|
115
|
+
- Uses `X-Webhook-Timestamp` + raw request body for the signature payload: `{timestamp}.{payload}`
|
|
116
|
+
- Requires the **Webhook Signing Secret** from credentials
|
|
117
|
+
|
|
118
|
+
## Examples
|
|
119
|
+
|
|
120
|
+
### Send a group message
|
|
121
|
+
|
|
122
|
+
- Resource: Chat → Create
|
|
109
123
|
- Fields:
|
|
110
124
|
- Send From (required): `+13175551234`
|
|
111
125
|
- Display Name (optional): `Project A`
|
|
112
126
|
- Phone Numbers: `+13341234567, +13347654321`
|
|
113
127
|
- Message Text: `Hello from n8n!`
|
|
114
128
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
-
|
|
118
|
-
- Fields:
|
|
119
|
-
- First Name: `John`
|
|
120
|
-
- Last Name: `Doe`
|
|
121
|
-
- Email: `john@example.com`
|
|
122
|
-
- Phone Number: `+15551234567`
|
|
123
|
-
3) Manage webhook subscriptions
|
|
124
|
-
- Resource: Webhook Subscription
|
|
125
|
-
- Operation: Create
|
|
129
|
+
### Create a webhook subscription
|
|
130
|
+
|
|
131
|
+
- Resource: Webhook Subscription → Create
|
|
126
132
|
- Fields:
|
|
127
133
|
- Webhook URL: `https://example.com/webhooks/linq`
|
|
128
134
|
- Events: `message.sent, message.received, contact.created`
|
|
129
|
-
- Version: `2`
|
|
130
135
|
- Active: `true`
|
|
131
136
|
|
|
132
|
-
4) Update phone number forwarding
|
|
133
|
-
- Resource: Phone Number
|
|
134
|
-
- Operation: Update
|
|
135
|
-
- Fields:
|
|
136
|
-
- Phone Number ID: `<id>`
|
|
137
|
-
- Forward To (optional): `+15551230000`
|
|
138
|
-
- Label (optional): `Support Line`
|
|
139
|
-
|
|
140
137
|
## Development
|
|
141
138
|
|
|
142
139
|
Requirements:
|
|
143
|
-
|
|
144
|
-
-
|
|
145
|
-
-
|
|
140
|
+
|
|
141
|
+
- Node.js >= 20
|
|
142
|
+
- npm or pnpm (npm commands below)
|
|
146
143
|
|
|
147
144
|
Install and build:
|
|
145
|
+
|
|
148
146
|
```bash
|
|
149
147
|
cd n8n-nodes-linq
|
|
150
148
|
npm install
|
|
@@ -152,7 +150,8 @@ npm run build
|
|
|
152
150
|
npm run lint
|
|
153
151
|
```
|
|
154
152
|
|
|
155
|
-
Local link for testing in
|
|
153
|
+
Local link for testing in n8n:
|
|
154
|
+
|
|
156
155
|
```bash
|
|
157
156
|
# in this folder
|
|
158
157
|
npm link
|
|
@@ -162,33 +161,21 @@ npm link n8n-nodes-linq
|
|
|
162
161
|
```
|
|
163
162
|
|
|
164
163
|
Project files of interest:
|
|
164
|
+
|
|
165
165
|
- Node: [Linq.node.ts](nodes/Linq/Linq.node.ts:1)
|
|
166
|
+
- Trigger: [LinqTrigger.node.ts](nodes/LinqTrigger/LinqTrigger.node.ts:1)
|
|
166
167
|
- Credentials: [LinqApi.credentials.ts](credentials/LinqApi.credentials.ts:1)
|
|
167
|
-
- Gulp (
|
|
168
|
+
- Gulp (icons): [gulpfile.js](gulpfile.js:1)
|
|
168
169
|
- TypeScript config: [tsconfig.json](tsconfig.json:1)
|
|
169
170
|
- Index shim: [index.js](index.js:1)
|
|
170
171
|
|
|
171
172
|
## Publishing to npm
|
|
172
173
|
|
|
173
|
-
1) Ensure metadata is correct in [package.json](package.json:1)
|
|
174
|
-
- name: `n8n-nodes-linq`
|
|
175
|
-
- version: increment for each release, e.g. `0.1.0`
|
|
176
|
-
- author: `"alexautomates"`
|
|
177
|
-
- keywords include: `n8n-community-node-package`
|
|
178
|
-
- `files: ["dist"]` to publish only built files
|
|
179
|
-
- `n8n` block lists built nodes and credentials in `dist/`
|
|
180
|
-
|
|
181
|
-
2) Build and publish:
|
|
182
174
|
```bash
|
|
183
175
|
npm run build
|
|
184
176
|
npm publish --access public
|
|
185
177
|
```
|
|
186
178
|
|
|
187
|
-
3) Users can install from the n8n UI (Community Nodes) by typing `n8n-nodes-linq`.
|
|
188
|
-
|
|
189
|
-
## Icon / Branding
|
|
190
|
-
|
|
191
|
-
- Icon file is included at: [nodes/Linq/linq.svg](nodes/Linq/linq.svg:1)
|
|
192
|
-
- Node description references it as `icon: 'file:linq.svg'`, so it renders in the n8n UI.
|
|
193
|
-
|
|
194
179
|
## License
|
|
180
|
+
|
|
181
|
+
MIT — see [LICENSE.md](LICENSE.md).
|
|
@@ -2,30 +2,38 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LinqApi = void 0;
|
|
4
4
|
class LinqApi {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
password: true,
|
|
18
|
-
},
|
|
5
|
+
name = 'linqApi';
|
|
6
|
+
displayName = 'Linq API';
|
|
7
|
+
documentationUrl = 'https://apidocs.linqapp.com/reference/';
|
|
8
|
+
properties = [
|
|
9
|
+
{
|
|
10
|
+
displayName: 'API Token',
|
|
11
|
+
name: 'integrationToken',
|
|
12
|
+
type: 'string',
|
|
13
|
+
default: '',
|
|
14
|
+
description: 'Your Linq Partner API token (Bearer)',
|
|
15
|
+
typeOptions: {
|
|
16
|
+
password: true,
|
|
19
17
|
},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
displayName: 'Webhook Signing Secret',
|
|
21
|
+
name: 'webhookSigningSecret',
|
|
22
|
+
type: 'string',
|
|
23
|
+
default: '',
|
|
24
|
+
description: 'Signing secret returned when creating a webhook subscription (required for Linq Trigger)',
|
|
25
|
+
typeOptions: {
|
|
26
|
+
password: true,
|
|
27
27
|
},
|
|
28
|
-
}
|
|
29
|
-
|
|
28
|
+
},
|
|
29
|
+
];
|
|
30
|
+
authenticate = {
|
|
31
|
+
type: 'generic',
|
|
32
|
+
properties: {
|
|
33
|
+
headers: {
|
|
34
|
+
Authorization: 'Bearer {{$credentials.integrationToken}}',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
};
|
|
30
38
|
}
|
|
31
39
|
exports.LinqApi = LinqApi;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
-
import { INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
1
|
+
import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
3
2
|
export declare class Linq implements INodeType {
|
|
4
3
|
description: INodeTypeDescription;
|
|
5
4
|
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|