n8n-nodes-tareno 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/README.md ADDED
@@ -0,0 +1,100 @@
1
+ # n8n-nodes-tareno
2
+
3
+ This is an n8n community node for [Tareno](https://tareno.co) - a Social Media Management Platform.
4
+
5
+ Automate your social media posting across Instagram, Facebook, YouTube, TikTok, Twitter/X, Threads, and Pinterest.
6
+
7
+ ## Features
8
+
9
+ - **Publish Posts** - Post immediately to any connected platform
10
+ - **Schedule Posts** - Schedule posts for later
11
+ - **Get Accounts** - List all your connected social media accounts
12
+ - **Usage Statistics** - Monitor your API usage
13
+
14
+ ## Prerequisites
15
+
16
+ 1. A Tareno account at [tareno.co](https://tareno.co)
17
+ 2. Connected social media accounts in Tareno
18
+ 3. An API key (create one in Settings → API)
19
+
20
+ ## Installation
21
+
22
+ ### Community Nodes (Recommended)
23
+
24
+ 1. Go to **Settings → Community Nodes**
25
+ 2. Select **Install**
26
+ 3. Enter `n8n-nodes-tareno`
27
+ 4. Click **Install**
28
+
29
+ ### Manual Installation
30
+
31
+ ```bash
32
+ cd ~/.n8n/custom
33
+ npm install n8n-nodes-tareno
34
+ ```
35
+
36
+ ## Credentials
37
+
38
+ 1. In n8n, go to **Credentials**
39
+ 2. Click **Add Credential**
40
+ 3. Search for **Tareno API**
41
+ 4. Enter your API Key from Tareno Settings → API
42
+
43
+ ## Operations
44
+
45
+ ### Post
46
+
47
+ #### Publish
48
+ Publish a post immediately to a social media platform.
49
+
50
+ | Parameter | Description |
51
+ |-----------|-------------|
52
+ | Platform | Instagram, Facebook, YouTube, TikTok, Twitter, Threads, or Pinterest |
53
+ | Account ID | Your connected account ID (use "Get Accounts" to find this) |
54
+ | Text/Caption | The post content |
55
+ | Media URLs | Comma-separated URLs of images/videos |
56
+
57
+ #### Schedule
58
+ Schedule a post for later.
59
+
60
+ Same parameters as Publish, plus:
61
+ | Parameter | Description |
62
+ |-----------|-------------|
63
+ | Schedule Time | When to publish (ISO 8601 format) |
64
+
65
+ ### Account
66
+
67
+ #### Get All
68
+ Returns all your connected social media accounts with their IDs.
69
+
70
+ ### Usage
71
+
72
+ #### Get Statistics
73
+ Returns your API usage statistics including:
74
+ - Current month usage
75
+ - Monthly limit
76
+ - Success rate
77
+ - Breakdown by platform
78
+
79
+ ## Example Workflow
80
+
81
+ ```
82
+ [Trigger] → [Tareno: Get Accounts] → [Set: Pick Account] → [Tareno: Publish Post]
83
+ ```
84
+
85
+ ## Rate Limits
86
+
87
+ API limits depend on your Tareno plan:
88
+ - Free: 50 calls/month
89
+ - Starter: 500 calls/month
90
+ - Pro: 2,000 calls/month
91
+ - Business: 10,000 calls/month
92
+
93
+ ## Support
94
+
95
+ - Documentation: [tareno.co/docs/api](https://tareno.co/docs/api)
96
+ - Email: support@tareno.co
97
+
98
+ ## License
99
+
100
+ MIT
@@ -0,0 +1,9 @@
1
+ import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class TarenoApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ properties: INodeProperties[];
7
+ authenticate: IAuthenticateGeneric;
8
+ test: ICredentialTestRequest;
9
+ }
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TarenoApi = void 0;
4
+ class TarenoApi {
5
+ constructor() {
6
+ this.name = 'tarenoApi';
7
+ this.displayName = 'Tareno API';
8
+ this.documentationUrl = 'https://tareno.co/docs/api';
9
+ this.properties = [
10
+ {
11
+ displayName: 'API Key',
12
+ name: 'apiKey',
13
+ type: 'string',
14
+ typeOptions: {
15
+ password: true,
16
+ },
17
+ default: '',
18
+ required: true,
19
+ description: 'Your Tareno API Key. Get one from Settings → API in your Tareno dashboard.',
20
+ },
21
+ {
22
+ displayName: 'Base URL',
23
+ name: 'baseUrl',
24
+ type: 'string',
25
+ default: 'https://tareno.co',
26
+ description: 'The base URL of the Tareno API',
27
+ },
28
+ ];
29
+ this.authenticate = {
30
+ type: 'generic',
31
+ properties: {
32
+ headers: {
33
+ 'X-Tareno-API-Key': '={{$credentials.apiKey}}',
34
+ },
35
+ },
36
+ };
37
+ this.test = {
38
+ request: {
39
+ baseURL: '={{$credentials.baseUrl}}',
40
+ url: '/api/external/usage',
41
+ method: 'GET',
42
+ },
43
+ };
44
+ }
45
+ }
46
+ exports.TarenoApi = TarenoApi;
@@ -0,0 +1,5 @@
1
+ import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class Tareno implements INodeType {
3
+ description: INodeTypeDescription;
4
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
+ }
@@ -0,0 +1,356 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Tareno = void 0;
4
+ class Tareno {
5
+ constructor() {
6
+ this.description = {
7
+ displayName: 'Tareno',
8
+ name: 'tareno',
9
+ icon: 'file:tareno.svg',
10
+ group: ['transform'],
11
+ version: 1,
12
+ subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
13
+ description: 'Publish and manage social media posts via Tareno',
14
+ defaults: {
15
+ name: 'Tareno',
16
+ },
17
+ inputs: ['main'],
18
+ outputs: ['main'],
19
+ credentials: [
20
+ {
21
+ name: 'tarenoApi',
22
+ required: true,
23
+ },
24
+ ],
25
+ properties: [
26
+ // Resource Selection
27
+ {
28
+ displayName: 'Resource',
29
+ name: 'resource',
30
+ type: 'options',
31
+ noDataExpression: true,
32
+ options: [
33
+ {
34
+ name: 'Post',
35
+ value: 'post',
36
+ description: 'Create and manage social media posts',
37
+ },
38
+ {
39
+ name: 'Account',
40
+ value: 'account',
41
+ description: 'Get connected social media accounts',
42
+ },
43
+ {
44
+ name: 'Usage',
45
+ value: 'usage',
46
+ description: 'Get API usage statistics',
47
+ },
48
+ ],
49
+ default: 'post',
50
+ },
51
+ // ========================
52
+ // POST OPERATIONS
53
+ // ========================
54
+ {
55
+ displayName: 'Operation',
56
+ name: 'operation',
57
+ type: 'options',
58
+ noDataExpression: true,
59
+ displayOptions: {
60
+ show: {
61
+ resource: ['post'],
62
+ },
63
+ },
64
+ options: [
65
+ {
66
+ name: 'Publish',
67
+ value: 'publish',
68
+ description: 'Publish a post immediately',
69
+ action: 'Publish a post',
70
+ },
71
+ {
72
+ name: 'Schedule',
73
+ value: 'schedule',
74
+ description: 'Schedule a post for later',
75
+ action: 'Schedule a post',
76
+ },
77
+ ],
78
+ default: 'publish',
79
+ },
80
+ // Platform Selection
81
+ {
82
+ displayName: 'Platform',
83
+ name: 'platform',
84
+ type: 'options',
85
+ required: true,
86
+ displayOptions: {
87
+ show: {
88
+ resource: ['post'],
89
+ },
90
+ },
91
+ options: [
92
+ { name: 'Instagram', value: 'instagram' },
93
+ { name: 'Facebook', value: 'facebook' },
94
+ { name: 'YouTube', value: 'youtube' },
95
+ { name: 'TikTok', value: 'tiktok' },
96
+ { name: 'Twitter/X', value: 'twitter' },
97
+ { name: 'Threads', value: 'threads' },
98
+ { name: 'Pinterest', value: 'pinterest' },
99
+ ],
100
+ default: 'instagram',
101
+ description: 'The platform to post to',
102
+ },
103
+ // Account ID
104
+ {
105
+ displayName: 'Account ID',
106
+ name: 'accountId',
107
+ type: 'string',
108
+ required: true,
109
+ displayOptions: {
110
+ show: {
111
+ resource: ['post'],
112
+ },
113
+ },
114
+ default: '',
115
+ description: 'The ID of your connected social account. Use "Get Accounts" to find this.',
116
+ },
117
+ // Post Text
118
+ {
119
+ displayName: 'Text/Caption',
120
+ name: 'text',
121
+ type: 'string',
122
+ typeOptions: {
123
+ rows: 4,
124
+ },
125
+ displayOptions: {
126
+ show: {
127
+ resource: ['post'],
128
+ },
129
+ },
130
+ default: '',
131
+ description: 'The text content of your post',
132
+ },
133
+ // Media URLs
134
+ {
135
+ displayName: 'Media URLs',
136
+ name: 'mediaUrls',
137
+ type: 'string',
138
+ typeOptions: {
139
+ rows: 2,
140
+ },
141
+ displayOptions: {
142
+ show: {
143
+ resource: ['post'],
144
+ },
145
+ },
146
+ default: '',
147
+ description: 'Comma-separated list of media URLs (images/videos)',
148
+ },
149
+ // Schedule Time (only for schedule operation)
150
+ {
151
+ displayName: 'Schedule Time',
152
+ name: 'scheduledAt',
153
+ type: 'dateTime',
154
+ required: true,
155
+ displayOptions: {
156
+ show: {
157
+ resource: ['post'],
158
+ operation: ['schedule'],
159
+ },
160
+ },
161
+ default: '',
162
+ description: 'When to publish the post (ISO 8601 format)',
163
+ },
164
+ // Additional Options
165
+ {
166
+ displayName: 'Additional Options',
167
+ name: 'additionalOptions',
168
+ type: 'collection',
169
+ placeholder: 'Add Option',
170
+ displayOptions: {
171
+ show: {
172
+ resource: ['post'],
173
+ },
174
+ },
175
+ default: {},
176
+ options: [
177
+ {
178
+ displayName: 'YouTube Title',
179
+ name: 'youtubeTitle',
180
+ type: 'string',
181
+ default: '',
182
+ description: 'Title for YouTube videos',
183
+ },
184
+ {
185
+ displayName: 'YouTube Description',
186
+ name: 'youtubeDescription',
187
+ type: 'string',
188
+ typeOptions: { rows: 3 },
189
+ default: '',
190
+ description: 'Description for YouTube videos',
191
+ },
192
+ {
193
+ displayName: 'Pinterest Board',
194
+ name: 'pinterestBoard',
195
+ type: 'string',
196
+ default: '',
197
+ description: 'Pinterest board name or ID',
198
+ },
199
+ {
200
+ displayName: 'Pinterest Link',
201
+ name: 'pinterestLink',
202
+ type: 'string',
203
+ default: '',
204
+ description: 'URL to link the pin to',
205
+ },
206
+ ],
207
+ },
208
+ // ========================
209
+ // ACCOUNT OPERATIONS
210
+ // ========================
211
+ {
212
+ displayName: 'Operation',
213
+ name: 'operation',
214
+ type: 'options',
215
+ noDataExpression: true,
216
+ displayOptions: {
217
+ show: {
218
+ resource: ['account'],
219
+ },
220
+ },
221
+ options: [
222
+ {
223
+ name: 'Get All',
224
+ value: 'getAll',
225
+ description: 'Get all connected accounts',
226
+ action: 'Get all accounts',
227
+ },
228
+ ],
229
+ default: 'getAll',
230
+ },
231
+ // ========================
232
+ // USAGE OPERATIONS
233
+ // ========================
234
+ {
235
+ displayName: 'Operation',
236
+ name: 'operation',
237
+ type: 'options',
238
+ noDataExpression: true,
239
+ displayOptions: {
240
+ show: {
241
+ resource: ['usage'],
242
+ },
243
+ },
244
+ options: [
245
+ {
246
+ name: 'Get Statistics',
247
+ value: 'getStats',
248
+ description: 'Get API usage statistics',
249
+ action: 'Get usage statistics',
250
+ },
251
+ ],
252
+ default: 'getStats',
253
+ },
254
+ ],
255
+ };
256
+ }
257
+ async execute() {
258
+ const items = this.getInputData();
259
+ const returnData = [];
260
+ const credentials = await this.getCredentials('tarenoApi');
261
+ const baseUrl = credentials.baseUrl || 'https://tareno.co';
262
+ for (let i = 0; i < items.length; i++) {
263
+ try {
264
+ const resource = this.getNodeParameter('resource', i);
265
+ const operation = this.getNodeParameter('operation', i);
266
+ let responseData;
267
+ // ========================
268
+ // POST RESOURCE
269
+ // ========================
270
+ if (resource === 'post') {
271
+ const platform = this.getNodeParameter('platform', i);
272
+ const accountId = this.getNodeParameter('accountId', i);
273
+ const text = this.getNodeParameter('text', i);
274
+ const mediaUrlsRaw = this.getNodeParameter('mediaUrls', i);
275
+ const additionalOptions = this.getNodeParameter('additionalOptions', i);
276
+ const mediaUrls = mediaUrlsRaw
277
+ ? mediaUrlsRaw.split(',').map(url => url.trim()).filter(Boolean)
278
+ : [];
279
+ const body = {
280
+ platform,
281
+ accountId,
282
+ text,
283
+ mediaUrls,
284
+ };
285
+ // Add schedule time if scheduling
286
+ if (operation === 'schedule') {
287
+ const scheduledAt = this.getNodeParameter('scheduledAt', i);
288
+ body.scheduledAt = scheduledAt;
289
+ }
290
+ // Add metadata for platform-specific options
291
+ if (Object.keys(additionalOptions).length > 0) {
292
+ body.metadata = additionalOptions;
293
+ }
294
+ responseData = await this.helpers.httpRequest({
295
+ method: 'POST',
296
+ url: `${baseUrl}/api/external/publish`,
297
+ headers: {
298
+ 'Content-Type': 'application/json',
299
+ 'X-Tareno-API-Key': credentials.apiKey,
300
+ },
301
+ body,
302
+ json: true,
303
+ });
304
+ }
305
+ // ========================
306
+ // ACCOUNT RESOURCE
307
+ // ========================
308
+ if (resource === 'account' && operation === 'getAll') {
309
+ responseData = await this.helpers.httpRequest({
310
+ method: 'GET',
311
+ url: `${baseUrl}/api/external/accounts`,
312
+ headers: {
313
+ 'X-Tareno-API-Key': credentials.apiKey,
314
+ },
315
+ json: true,
316
+ });
317
+ }
318
+ // ========================
319
+ // USAGE RESOURCE
320
+ // ========================
321
+ if (resource === 'usage' && operation === 'getStats') {
322
+ responseData = await this.helpers.httpRequest({
323
+ method: 'GET',
324
+ url: `${baseUrl}/api/external/usage`,
325
+ headers: {
326
+ 'X-Tareno-API-Key': credentials.apiKey,
327
+ },
328
+ json: true,
329
+ });
330
+ }
331
+ // Add result to output
332
+ if (responseData) {
333
+ if (Array.isArray(responseData)) {
334
+ returnData.push(...responseData.map(item => ({ json: item })));
335
+ }
336
+ else {
337
+ returnData.push({ json: responseData });
338
+ }
339
+ }
340
+ }
341
+ catch (error) {
342
+ if (this.continueOnFail()) {
343
+ returnData.push({
344
+ json: {
345
+ error: error.message,
346
+ },
347
+ });
348
+ continue;
349
+ }
350
+ throw error;
351
+ }
352
+ }
353
+ return [returnData];
354
+ }
355
+ }
356
+ exports.Tareno = Tareno;
@@ -0,0 +1,6 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="none">
2
+ <rect width="100" height="100" rx="20" fill="#10B981"/>
3
+ <path d="M30 35h40v5H30zM30 47h35v5H30zM30 59h40v5H30z" fill="white"/>
4
+ <circle cx="70" cy="70" r="15" fill="white"/>
5
+ <path d="M65 70l5 5 8-10" stroke="#10B981" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
6
+ </svg>
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "n8n-nodes-tareno",
3
+ "version": "1.0.0",
4
+ "description": "N8N community nodes for Tareno - Social Media Management Platform",
5
+ "license": "MIT",
6
+ "homepage": "https://tareno.co",
7
+ "author": {
8
+ "name": "Tareno",
9
+ "email": "support@tareno.co"
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/TarenoAI/n8n-nodes-tareno.git"
14
+ },
15
+ "keywords": [
16
+ "n8n-community-node-package",
17
+ "n8n",
18
+ "social media",
19
+ "tareno",
20
+ "automation",
21
+ "instagram",
22
+ "facebook",
23
+ "youtube",
24
+ "tiktok",
25
+ "twitter",
26
+ "pinterest",
27
+ "threads"
28
+ ],
29
+ "main": "dist/nodes/Tareno/Tareno.node.js",
30
+ "scripts": {
31
+ "build": "tsc && npm run copy-icons",
32
+ "copy-icons": "cp nodes/Tareno/*.svg dist/nodes/Tareno/ 2>/dev/null || true",
33
+ "dev": "tsc --watch",
34
+ "prepublishOnly": "npm run build"
35
+ },
36
+ "files": [
37
+ "dist"
38
+ ],
39
+ "n8n": {
40
+ "n8nNodesApiVersion": 1,
41
+ "credentials": [
42
+ "dist/credentials/TarenoApi.credentials.js"
43
+ ],
44
+ "nodes": [
45
+ "dist/nodes/Tareno/Tareno.node.js"
46
+ ]
47
+ },
48
+ "devDependencies": {
49
+ "@types/node": "^18.0.0",
50
+ "typescript": "^5.0.0"
51
+ },
52
+ "dependencies": {
53
+ "n8n-workflow": "^1.0.0"
54
+ }
55
+ }