@cuehq/n8n-nodes-cue 0.1.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 +42 -0
- package/dist/credentials/CueApi.credentials.d.ts +9 -0
- package/dist/credentials/CueApi.credentials.d.ts.map +1 -0
- package/dist/credentials/CueApi.credentials.js +33 -0
- package/dist/nodes/Cue/Cue.node.d.ts +11 -0
- package/dist/nodes/Cue/Cue.node.d.ts.map +1 -0
- package/dist/nodes/Cue/Cue.node.js +461 -0
- package/dist/nodes/Cue/Cue.node.json +18 -0
- package/dist/nodes/Cue/cue.svg +4 -0
- package/package.json +42 -0
package/README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# @cuehq/n8n-nodes-cue
|
|
2
|
+
|
|
3
|
+
This is the official n8n community node for [Cue](https://oncue.so) - the social media scheduling API.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Create Post** - Schedule posts to one or multiple platforms
|
|
8
|
+
- **List Posts** - Get all posts for a profile
|
|
9
|
+
- **Get Post** - Get details of a specific post
|
|
10
|
+
- **Delete Post** - Delete a draft or scheduled post
|
|
11
|
+
- **Publish Post** - Publish a post immediately
|
|
12
|
+
- **List Profiles** - Get available profiles
|
|
13
|
+
- **List Social Accounts** - Get connected social accounts
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
### Community Nodes (Recommended)
|
|
18
|
+
|
|
19
|
+
1. Go to **Settings > Community Nodes**
|
|
20
|
+
2. Select **Install**
|
|
21
|
+
3. Enter `@cuehq/n8n-nodes-cue`
|
|
22
|
+
4. Agree to the risks and select **Install**
|
|
23
|
+
|
|
24
|
+
### Manual Installation
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npm install @cuehq/n8n-nodes-cue
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Credentials
|
|
31
|
+
|
|
32
|
+
You need a Cue API key to use this node:
|
|
33
|
+
|
|
34
|
+
1. Log in to [Cue](https://app.oncue.so)
|
|
35
|
+
2. Go to Settings -> API Keys
|
|
36
|
+
3. Create a new API key
|
|
37
|
+
4. Copy the key and add it to n8n credentials
|
|
38
|
+
|
|
39
|
+
## Resources
|
|
40
|
+
|
|
41
|
+
- [Cue API Documentation](https://docs.oncue.so)
|
|
42
|
+
- [n8n Community Nodes Documentation](https://docs.n8n.io/integrations/community-nodes/)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IAuthenticateGeneric, ICredentialType, INodeProperties } from "n8n-workflow";
|
|
2
|
+
export declare class CueApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
documentationUrl: string;
|
|
6
|
+
properties: INodeProperties[];
|
|
7
|
+
authenticate: IAuthenticateGeneric;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=CueApi.credentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CueApi.credentials.d.ts","sourceRoot":"","sources":["../../src/credentials/CueApi.credentials.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE3F,qBAAa,MAAO,YAAW,eAAe;IAC5C,IAAI,SAAY;IAChB,WAAW,SAAa;IACxB,gBAAgB,SAA+D;IAE/E,UAAU,EAAE,eAAe,EAAE,CAmB3B;IAEF,YAAY,EAAE,oBAAoB,CAOhC;CACH"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export class CueApi {
|
|
2
|
+
name = "cueApi";
|
|
3
|
+
displayName = "Cue API";
|
|
4
|
+
documentationUrl = "https://docs.oncue.so/docs/getting-started/authentication";
|
|
5
|
+
properties = [
|
|
6
|
+
{
|
|
7
|
+
displayName: "API Key",
|
|
8
|
+
name: "apiKey",
|
|
9
|
+
type: "string",
|
|
10
|
+
typeOptions: {
|
|
11
|
+
password: true,
|
|
12
|
+
},
|
|
13
|
+
default: "",
|
|
14
|
+
required: true,
|
|
15
|
+
description: "Your Cue API key (starts with cue_sk_)",
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
displayName: "Base URL",
|
|
19
|
+
name: "baseUrl",
|
|
20
|
+
type: "string",
|
|
21
|
+
default: "https://api.oncue.so",
|
|
22
|
+
description: "The base URL for the Cue API",
|
|
23
|
+
},
|
|
24
|
+
];
|
|
25
|
+
authenticate = {
|
|
26
|
+
type: "generic",
|
|
27
|
+
properties: {
|
|
28
|
+
headers: {
|
|
29
|
+
Authorization: "=Bearer {{$credentials.apiKey}}",
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ILoadOptionsFunctions, INodeListSearchResult, INodeType, INodeTypeDescription } from "n8n-workflow";
|
|
2
|
+
export declare class Cue implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
methods: {
|
|
5
|
+
listSearch: {
|
|
6
|
+
getProfiles(this: ILoadOptionsFunctions): Promise<INodeListSearchResult>;
|
|
7
|
+
getSocialAccounts(this: ILoadOptionsFunctions): Promise<INodeListSearchResult>;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=Cue.node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Cue.node.d.ts","sourceRoot":"","sources":["../../../src/nodes/Cue/Cue.node.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACrB,SAAS,EACT,oBAAoB,EACrB,MAAM,cAAc,CAAC;AAEtB,qBAAa,GAAI,YAAW,SAAS;IACnC,WAAW,EAAE,oBAAoB,CAqb/B;IAEF,OAAO;;8BAEqB,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC;oCAuBhD,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC;;MAyBtF;CACH"}
|
|
@@ -0,0 +1,461 @@
|
|
|
1
|
+
export class Cue {
|
|
2
|
+
description = {
|
|
3
|
+
displayName: "Cue",
|
|
4
|
+
name: "cue",
|
|
5
|
+
icon: "file:cue.svg",
|
|
6
|
+
group: ["transform"],
|
|
7
|
+
version: 1,
|
|
8
|
+
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
|
9
|
+
description: "Schedule and publish social media posts with Cue",
|
|
10
|
+
defaults: {
|
|
11
|
+
name: "Cue",
|
|
12
|
+
},
|
|
13
|
+
inputs: ["main"],
|
|
14
|
+
outputs: ["main"],
|
|
15
|
+
credentials: [
|
|
16
|
+
{
|
|
17
|
+
name: "cueApi",
|
|
18
|
+
required: true,
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
requestDefaults: {
|
|
22
|
+
baseURL: "={{$credentials.baseUrl}}/v1",
|
|
23
|
+
headers: {
|
|
24
|
+
Accept: "application/json",
|
|
25
|
+
"Content-Type": "application/json",
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
properties: [
|
|
29
|
+
// Resource selector
|
|
30
|
+
{
|
|
31
|
+
displayName: "Resource",
|
|
32
|
+
name: "resource",
|
|
33
|
+
type: "options",
|
|
34
|
+
noDataExpression: true,
|
|
35
|
+
options: [
|
|
36
|
+
{
|
|
37
|
+
name: "Post",
|
|
38
|
+
value: "post",
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: "Profile",
|
|
42
|
+
value: "profile",
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "Social Account",
|
|
46
|
+
value: "socialAccount",
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
default: "post",
|
|
50
|
+
},
|
|
51
|
+
// ===== POST OPERATIONS =====
|
|
52
|
+
{
|
|
53
|
+
displayName: "Operation",
|
|
54
|
+
name: "operation",
|
|
55
|
+
type: "options",
|
|
56
|
+
noDataExpression: true,
|
|
57
|
+
displayOptions: {
|
|
58
|
+
show: {
|
|
59
|
+
resource: ["post"],
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
options: [
|
|
63
|
+
{
|
|
64
|
+
name: "Create",
|
|
65
|
+
value: "create",
|
|
66
|
+
action: "Create a post",
|
|
67
|
+
description: "Create and schedule a new post",
|
|
68
|
+
routing: {
|
|
69
|
+
request: {
|
|
70
|
+
method: "POST",
|
|
71
|
+
url: "/posts",
|
|
72
|
+
},
|
|
73
|
+
send: {
|
|
74
|
+
preSend: [
|
|
75
|
+
async function (requestOptions) {
|
|
76
|
+
// Extract profileId - resourceLocator returns { mode, value } object
|
|
77
|
+
const profileIdParam = this.getNodeParameter("profileId");
|
|
78
|
+
const profileId = typeof profileIdParam === "string" ? profileIdParam : profileIdParam.value;
|
|
79
|
+
const platforms = this.getNodeParameter("platforms.platform", []);
|
|
80
|
+
const scheduledAt = this.getNodeParameter("scheduledAt", "");
|
|
81
|
+
const publishNow = this.getNodeParameter("publishNow", false);
|
|
82
|
+
// Build V2 format body
|
|
83
|
+
const platformsObj = {};
|
|
84
|
+
for (const platform of platforms) {
|
|
85
|
+
// Extract socialAccountId - resourceLocator returns { mode, value } object
|
|
86
|
+
const socialAccountId = typeof platform.socialAccountId === "string"
|
|
87
|
+
? platform.socialAccountId
|
|
88
|
+
: platform.socialAccountId.value;
|
|
89
|
+
platformsObj[socialAccountId] = {
|
|
90
|
+
items: [{ content: platform.content }],
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
requestOptions.body = {
|
|
94
|
+
profileId,
|
|
95
|
+
platforms: platformsObj,
|
|
96
|
+
...(scheduledAt && { scheduledAt }),
|
|
97
|
+
...(publishNow && { publishNow }),
|
|
98
|
+
};
|
|
99
|
+
return requestOptions;
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: "Delete",
|
|
107
|
+
value: "delete",
|
|
108
|
+
action: "Delete a post",
|
|
109
|
+
description: "Delete a draft or scheduled post",
|
|
110
|
+
routing: {
|
|
111
|
+
request: {
|
|
112
|
+
method: "DELETE",
|
|
113
|
+
url: '=/posts/{{$parameter["postId"]}}',
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: "Get",
|
|
119
|
+
value: "get",
|
|
120
|
+
action: "Get a post",
|
|
121
|
+
description: "Get details of a specific post",
|
|
122
|
+
routing: {
|
|
123
|
+
request: {
|
|
124
|
+
method: "GET",
|
|
125
|
+
url: '=/posts/{{$parameter["postId"]}}',
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: "Get Many",
|
|
131
|
+
value: "getMany",
|
|
132
|
+
action: "Get many posts",
|
|
133
|
+
description: "Get all posts for a profile",
|
|
134
|
+
routing: {
|
|
135
|
+
request: {
|
|
136
|
+
method: "GET",
|
|
137
|
+
url: "/posts",
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
name: "Publish",
|
|
143
|
+
value: "publish",
|
|
144
|
+
action: "Publish a post",
|
|
145
|
+
description: "Publish a post immediately",
|
|
146
|
+
routing: {
|
|
147
|
+
request: {
|
|
148
|
+
method: "POST",
|
|
149
|
+
url: '=/posts/{{$parameter["postId"]}}/publish',
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
],
|
|
154
|
+
default: "create",
|
|
155
|
+
},
|
|
156
|
+
// ===== PROFILE OPERATIONS =====
|
|
157
|
+
{
|
|
158
|
+
displayName: "Operation",
|
|
159
|
+
name: "operation",
|
|
160
|
+
type: "options",
|
|
161
|
+
noDataExpression: true,
|
|
162
|
+
displayOptions: {
|
|
163
|
+
show: {
|
|
164
|
+
resource: ["profile"],
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
options: [
|
|
168
|
+
{
|
|
169
|
+
name: "Get Many",
|
|
170
|
+
value: "getMany",
|
|
171
|
+
action: "Get many profiles",
|
|
172
|
+
description: "Get all profiles",
|
|
173
|
+
routing: {
|
|
174
|
+
request: {
|
|
175
|
+
method: "GET",
|
|
176
|
+
url: "/profiles",
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
],
|
|
181
|
+
default: "getMany",
|
|
182
|
+
},
|
|
183
|
+
// ===== SOCIAL ACCOUNT OPERATIONS =====
|
|
184
|
+
{
|
|
185
|
+
displayName: "Operation",
|
|
186
|
+
name: "operation",
|
|
187
|
+
type: "options",
|
|
188
|
+
noDataExpression: true,
|
|
189
|
+
displayOptions: {
|
|
190
|
+
show: {
|
|
191
|
+
resource: ["socialAccount"],
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
options: [
|
|
195
|
+
{
|
|
196
|
+
name: "Get Many",
|
|
197
|
+
value: "getMany",
|
|
198
|
+
action: "Get many social accounts",
|
|
199
|
+
description: "Get all connected social accounts",
|
|
200
|
+
routing: {
|
|
201
|
+
request: {
|
|
202
|
+
method: "GET",
|
|
203
|
+
url: "/social-accounts",
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
],
|
|
208
|
+
default: "getMany",
|
|
209
|
+
},
|
|
210
|
+
// ===== POST PARAMETERS =====
|
|
211
|
+
// Post ID (for get, delete, publish)
|
|
212
|
+
{
|
|
213
|
+
displayName: "Post ID",
|
|
214
|
+
name: "postId",
|
|
215
|
+
type: "string",
|
|
216
|
+
required: true,
|
|
217
|
+
default: "",
|
|
218
|
+
displayOptions: {
|
|
219
|
+
show: {
|
|
220
|
+
resource: ["post"],
|
|
221
|
+
operation: ["get", "delete", "publish"],
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
description: "The ID of the post",
|
|
225
|
+
},
|
|
226
|
+
// Profile ID (for create) - with dynamic dropdown
|
|
227
|
+
{
|
|
228
|
+
displayName: "Profile",
|
|
229
|
+
name: "profileId",
|
|
230
|
+
type: "resourceLocator",
|
|
231
|
+
default: { mode: "list", value: "" },
|
|
232
|
+
required: true,
|
|
233
|
+
displayOptions: {
|
|
234
|
+
show: {
|
|
235
|
+
resource: ["post"],
|
|
236
|
+
operation: ["create"],
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
description: "The profile to create the post under",
|
|
240
|
+
modes: [
|
|
241
|
+
{
|
|
242
|
+
displayName: "From List",
|
|
243
|
+
name: "list",
|
|
244
|
+
type: "list",
|
|
245
|
+
typeOptions: {
|
|
246
|
+
searchListMethod: "getProfiles",
|
|
247
|
+
searchable: true,
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
displayName: "By ID",
|
|
252
|
+
name: "id",
|
|
253
|
+
type: "string",
|
|
254
|
+
placeholder: "prf_xxx",
|
|
255
|
+
},
|
|
256
|
+
],
|
|
257
|
+
},
|
|
258
|
+
// Platforms object for V2 format
|
|
259
|
+
{
|
|
260
|
+
displayName: "Platforms",
|
|
261
|
+
name: "platforms",
|
|
262
|
+
type: "fixedCollection",
|
|
263
|
+
typeOptions: {
|
|
264
|
+
multipleValues: true,
|
|
265
|
+
},
|
|
266
|
+
displayOptions: {
|
|
267
|
+
show: {
|
|
268
|
+
resource: ["post"],
|
|
269
|
+
operation: ["create"],
|
|
270
|
+
},
|
|
271
|
+
},
|
|
272
|
+
default: {},
|
|
273
|
+
options: [
|
|
274
|
+
{
|
|
275
|
+
name: "platform",
|
|
276
|
+
displayName: "Platform",
|
|
277
|
+
values: [
|
|
278
|
+
{
|
|
279
|
+
displayName: "Social Account",
|
|
280
|
+
name: "socialAccountId",
|
|
281
|
+
type: "resourceLocator",
|
|
282
|
+
default: { mode: "list", value: "" },
|
|
283
|
+
required: true,
|
|
284
|
+
description: "The social account to post to",
|
|
285
|
+
modes: [
|
|
286
|
+
{
|
|
287
|
+
displayName: "From List",
|
|
288
|
+
name: "list",
|
|
289
|
+
type: "list",
|
|
290
|
+
typeOptions: {
|
|
291
|
+
searchListMethod: "getSocialAccounts",
|
|
292
|
+
searchable: true,
|
|
293
|
+
},
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
displayName: "By ID",
|
|
297
|
+
name: "id",
|
|
298
|
+
type: "string",
|
|
299
|
+
placeholder: "sac_xxx",
|
|
300
|
+
},
|
|
301
|
+
],
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
displayName: "Content",
|
|
305
|
+
name: "content",
|
|
306
|
+
type: "string",
|
|
307
|
+
typeOptions: {
|
|
308
|
+
rows: 4,
|
|
309
|
+
},
|
|
310
|
+
default: "",
|
|
311
|
+
required: true,
|
|
312
|
+
description: "The post content for this platform",
|
|
313
|
+
},
|
|
314
|
+
],
|
|
315
|
+
},
|
|
316
|
+
],
|
|
317
|
+
description: "The platforms to post to with their content",
|
|
318
|
+
},
|
|
319
|
+
// Scheduled At
|
|
320
|
+
{
|
|
321
|
+
displayName: "Scheduled At",
|
|
322
|
+
name: "scheduledAt",
|
|
323
|
+
type: "dateTime",
|
|
324
|
+
default: "",
|
|
325
|
+
displayOptions: {
|
|
326
|
+
show: {
|
|
327
|
+
resource: ["post"],
|
|
328
|
+
operation: ["create"],
|
|
329
|
+
},
|
|
330
|
+
},
|
|
331
|
+
description: "When to publish the post (ISO 8601 format). Leave empty for draft.",
|
|
332
|
+
},
|
|
333
|
+
// Publish Now
|
|
334
|
+
{
|
|
335
|
+
displayName: "Publish Immediately",
|
|
336
|
+
name: "publishNow",
|
|
337
|
+
type: "boolean",
|
|
338
|
+
default: false,
|
|
339
|
+
displayOptions: {
|
|
340
|
+
show: {
|
|
341
|
+
resource: ["post"],
|
|
342
|
+
operation: ["create"],
|
|
343
|
+
},
|
|
344
|
+
},
|
|
345
|
+
description: "Whether to publish the post immediately instead of scheduling",
|
|
346
|
+
},
|
|
347
|
+
// Query parameters for listing posts
|
|
348
|
+
{
|
|
349
|
+
displayName: "Filters",
|
|
350
|
+
name: "filters",
|
|
351
|
+
type: "collection",
|
|
352
|
+
placeholder: "Add Filter",
|
|
353
|
+
default: {},
|
|
354
|
+
displayOptions: {
|
|
355
|
+
show: {
|
|
356
|
+
resource: ["post"],
|
|
357
|
+
operation: ["getMany"],
|
|
358
|
+
},
|
|
359
|
+
},
|
|
360
|
+
options: [
|
|
361
|
+
{
|
|
362
|
+
displayName: "Profile",
|
|
363
|
+
name: "profile_id",
|
|
364
|
+
type: "resourceLocator",
|
|
365
|
+
default: { mode: "list", value: "" },
|
|
366
|
+
description: "Filter posts by profile",
|
|
367
|
+
modes: [
|
|
368
|
+
{
|
|
369
|
+
displayName: "From List",
|
|
370
|
+
name: "list",
|
|
371
|
+
type: "list",
|
|
372
|
+
typeOptions: {
|
|
373
|
+
searchListMethod: "getProfiles",
|
|
374
|
+
searchable: true,
|
|
375
|
+
},
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
displayName: "By ID",
|
|
379
|
+
name: "id",
|
|
380
|
+
type: "string",
|
|
381
|
+
placeholder: "prf_xxx",
|
|
382
|
+
},
|
|
383
|
+
],
|
|
384
|
+
routing: {
|
|
385
|
+
request: {
|
|
386
|
+
qs: {
|
|
387
|
+
// resourceLocator returns { mode, value } object, extract .value
|
|
388
|
+
profile_id: "={{$value.value || $value}}",
|
|
389
|
+
},
|
|
390
|
+
},
|
|
391
|
+
},
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
displayName: "Status",
|
|
395
|
+
name: "status",
|
|
396
|
+
type: "options",
|
|
397
|
+
options: [
|
|
398
|
+
{ name: "Draft", value: "draft" },
|
|
399
|
+
{ name: "Scheduled", value: "scheduled" },
|
|
400
|
+
{ name: "Queued", value: "queued" },
|
|
401
|
+
{ name: "Publishing", value: "publishing" },
|
|
402
|
+
{ name: "Published", value: "published" },
|
|
403
|
+
{ name: "Failed", value: "failed" },
|
|
404
|
+
],
|
|
405
|
+
default: "",
|
|
406
|
+
description: "Filter posts by status",
|
|
407
|
+
routing: {
|
|
408
|
+
request: {
|
|
409
|
+
qs: {
|
|
410
|
+
status: "={{$value}}",
|
|
411
|
+
},
|
|
412
|
+
},
|
|
413
|
+
},
|
|
414
|
+
},
|
|
415
|
+
],
|
|
416
|
+
},
|
|
417
|
+
],
|
|
418
|
+
};
|
|
419
|
+
methods = {
|
|
420
|
+
listSearch: {
|
|
421
|
+
async getProfiles() {
|
|
422
|
+
const credentials = await this.getCredentials("cueApi");
|
|
423
|
+
const baseUrl = credentials.baseUrl || "https://api.oncue.so";
|
|
424
|
+
const response = await this.helpers.httpRequest({
|
|
425
|
+
method: "GET",
|
|
426
|
+
url: `${baseUrl}/v1/profiles`,
|
|
427
|
+
headers: {
|
|
428
|
+
Authorization: `Bearer ${credentials.apiKey}`,
|
|
429
|
+
Accept: "application/json",
|
|
430
|
+
},
|
|
431
|
+
});
|
|
432
|
+
const profiles = response.data || [];
|
|
433
|
+
return {
|
|
434
|
+
results: profiles.map((profile) => ({
|
|
435
|
+
name: profile.name,
|
|
436
|
+
value: profile.id,
|
|
437
|
+
})),
|
|
438
|
+
};
|
|
439
|
+
},
|
|
440
|
+
async getSocialAccounts() {
|
|
441
|
+
const credentials = await this.getCredentials("cueApi");
|
|
442
|
+
const baseUrl = credentials.baseUrl || "https://api.oncue.so";
|
|
443
|
+
const response = await this.helpers.httpRequest({
|
|
444
|
+
method: "GET",
|
|
445
|
+
url: `${baseUrl}/v1/social-accounts`,
|
|
446
|
+
headers: {
|
|
447
|
+
Authorization: `Bearer ${credentials.apiKey}`,
|
|
448
|
+
Accept: "application/json",
|
|
449
|
+
},
|
|
450
|
+
});
|
|
451
|
+
const accounts = response.data || [];
|
|
452
|
+
return {
|
|
453
|
+
results: accounts.map((account) => ({
|
|
454
|
+
name: `${account.platform}: ${account.platformUsername}`,
|
|
455
|
+
value: account.id,
|
|
456
|
+
})),
|
|
457
|
+
};
|
|
458
|
+
},
|
|
459
|
+
},
|
|
460
|
+
};
|
|
461
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node": "@cuehq/n8n-nodes-cue.cue",
|
|
3
|
+
"nodeVersion": "1.0",
|
|
4
|
+
"codexVersion": "1.0",
|
|
5
|
+
"categories": ["Marketing & Content"],
|
|
6
|
+
"resources": {
|
|
7
|
+
"credentialDocumentation": [
|
|
8
|
+
{
|
|
9
|
+
"url": "https://docs.oncue.so/docs/getting-started/authentication"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"primaryDocumentation": [
|
|
13
|
+
{
|
|
14
|
+
"url": "https://docs.oncue.so"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="512" height="512" rx="100" fill="#6469F0"/>
|
|
3
|
+
<path d="M129.18 326.8C119.1 326.8 109.98 325.3 101.82 322.3C93.78 319.3 86.82 314.98 80.94 309.34C75.06 303.58 70.56 296.5 67.44 288.1C64.32 279.7 62.76 270.1 62.76 259.3C62.76 248.5 64.32 238.96 67.44 230.68C70.56 222.28 75.06 215.26 80.94 209.62C86.82 203.86 93.78 199.48 101.82 196.48C109.98 193.48 119.1 191.98 129.18 191.98C140.58 191.98 150.72 193.96 159.6 197.92C168.6 201.88 175.8 207.46 181.2 214.66C186.72 221.74 190.02 230.02 191.1 239.5H158.34C157.38 235.54 155.52 232.06 152.76 229.06C150.12 226.06 146.76 223.72 142.68 222.04C138.72 220.36 134.22 219.52 129.18 219.52C122.46 219.52 116.58 220.96 111.54 223.84C106.62 226.6 102.78 230.92 100.02 236.8C97.26 242.68 95.88 250.18 95.88 259.3C95.88 266.14 96.66 272.14 98.22 277.3C99.9 282.34 102.18 286.48 105.06 289.72C107.94 292.96 111.42 295.36 115.5 296.92C119.58 298.48 124.14 299.26 129.18 299.26C134.1 299.26 138.54 298.42 142.5 296.74C146.58 295.06 150 292.72 152.76 289.72C155.64 286.72 157.5 283.18 158.34 279.1H191.1C190.02 288.58 186.66 296.92 181.02 304.12C175.5 311.32 168.3 316.9 159.42 320.86C150.54 324.82 140.46 326.8 129.18 326.8ZM239.076 326.8C231.516 326.8 225.156 325.36 219.996 322.48C214.836 319.48 210.936 315.16 208.296 309.52C205.776 303.76 204.516 296.86 204.516 288.82V227.8H234.936V280.54C234.936 285.22 235.476 289.18 236.556 292.42C237.756 295.54 239.556 297.94 241.956 299.62C244.356 301.3 247.476 302.14 251.316 302.14C255.276 302.14 258.636 301.18 261.396 299.26C264.156 297.34 266.256 294.88 267.696 291.88C269.136 288.88 269.856 285.64 269.856 282.16V227.8H300.276V325H270.936L269.856 308.08H268.416C266.136 314.2 262.356 318.88 257.076 322.12C251.796 325.24 245.796 326.8 239.076 326.8ZM364.472 326.8C354.152 326.8 345.332 324.76 338.012 320.68C330.812 316.48 325.292 310.66 321.452 303.22C317.612 295.78 315.692 287.08 315.692 277.12C315.692 266.68 317.612 257.62 321.452 249.94C325.412 242.26 330.992 236.38 338.192 232.3C345.392 228.1 353.792 226 363.392 226C374.792 226 384.152 228.52 391.472 233.56C398.792 238.48 404.012 245.26 407.132 253.9C410.372 262.54 411.452 272.38 410.372 283.42H345.572C345.452 287.86 346.172 291.64 347.732 294.76C349.412 297.76 351.632 300.1 354.392 301.78C357.272 303.34 360.632 304.12 364.472 304.12C369.032 304.12 372.632 303.28 375.272 301.6C378.032 299.92 379.892 297.7 380.852 294.94H409.472C408.632 301.42 406.172 307.06 402.092 311.86C398.132 316.54 392.912 320.2 386.432 322.84C379.952 325.48 372.632 326.8 364.472 326.8ZM345.572 267.58L343.052 264.88H383.192L380.492 267.58C380.732 263.38 380.132 259.9 378.692 257.14C377.372 254.38 375.392 252.28 372.752 250.84C370.112 249.4 366.992 248.68 363.392 248.68C359.672 248.68 356.492 249.46 353.852 251.02C351.212 252.46 349.172 254.62 347.732 257.5C346.292 260.38 345.572 263.74 345.572 267.58ZM435.226 326.44C430.666 326.44 426.946 325.12 424.066 322.48C421.306 319.84 419.926 316.36 419.926 312.04C419.926 307.72 421.306 304.3 424.066 301.78C426.946 299.14 430.666 297.82 435.226 297.82C439.666 297.82 443.266 299.14 446.026 301.78C448.906 304.3 450.346 307.72 450.346 312.04C450.346 316.36 448.906 319.84 446.026 322.48C443.266 325.12 439.666 326.44 435.226 326.44Z" fill="white"/>
|
|
4
|
+
</svg>
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cuehq/n8n-nodes-cue",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "n8n community node for Cue - Social media scheduling API",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"n8n-community-node-package",
|
|
7
|
+
"n8n",
|
|
8
|
+
"social-media",
|
|
9
|
+
"scheduling",
|
|
10
|
+
"cue"
|
|
11
|
+
],
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"homepage": "https://oncue.so",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/cueso/cue"
|
|
17
|
+
},
|
|
18
|
+
"main": "dist/nodes/Cue/Cue.node.js",
|
|
19
|
+
"type": "module",
|
|
20
|
+
"files": [
|
|
21
|
+
"dist"
|
|
22
|
+
],
|
|
23
|
+
"n8n": {
|
|
24
|
+
"n8nNodesApiVersion": 1,
|
|
25
|
+
"credentials": [
|
|
26
|
+
"dist/credentials/CueApi.credentials.js"
|
|
27
|
+
],
|
|
28
|
+
"nodes": [
|
|
29
|
+
"dist/nodes/Cue/Cue.node.js"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"n8n-workflow": "^1.0.0",
|
|
34
|
+
"shx": "0.4.0",
|
|
35
|
+
"typescript": "^5.7.2"
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "tsc && pnpm copy-assets",
|
|
39
|
+
"copy-assets": "shx cp src/nodes/Cue/cue.svg dist/nodes/Cue/ && shx cp src/nodes/Cue/Cue.node.json dist/nodes/Cue/",
|
|
40
|
+
"typecheck": "tsc --noEmit"
|
|
41
|
+
}
|
|
42
|
+
}
|