n8n-nodes-postaro 0.0.0-stage → 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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Postaro
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 CHANGED
@@ -1,3 +1,44 @@
1
- # Temporary Holding Version
1
+ # n8n-nodes-postaro
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ An [n8n](https://n8n.io) community node for [Postaro](https://postaro.app), the social media scheduler for agencies.
4
+ Schedule posts to Instagram, TikTok, LinkedIn, YouTube, X, Threads, Facebook, Pinterest and Bluesky from any workflow.
5
+
6
+ ## Install
7
+
8
+ In n8n: **Settings → Community Nodes → Install**, then enter `n8n-nodes-postaro`.
9
+
10
+ ## Credentials
11
+
12
+ 1. In Postaro, open **API & agents** and create a key (it starts with `pst_`).
13
+ 2. In n8n, add a **Postaro API** credential and paste the key. Leave **Server** as `https://postaro.app` unless you run Postaro somewhere else.
14
+
15
+ The credential test calls `GET /api/v1/me`.
16
+
17
+ ## Operations
18
+
19
+ | Resource | Operation | Postaro API |
20
+ |---|---|---|
21
+ | Post | Create (at a time, next free posting time, now, draft, or send to the client for approval) | `POST /api/v1/posts` |
22
+ | Post | Get | `GET /api/v1/posts/{id}` |
23
+ | Post | Get Many (filter by status) | `GET /api/v1/posts` |
24
+ | Post | Move (change the time of a post that hasn't gone out) | `PATCH /api/v1/posts/{id}` |
25
+ | Post | Cancel | `DELETE /api/v1/posts/{id}` |
26
+ | Account | Get Many | `GET /api/v1/accounts` |
27
+ | Media | Import From URL (returns a media id for a post's media) | `POST /api/v1/media` |
28
+
29
+ Every operation takes an optional **Workspace** (id or exact name). Without it, the key's first workspace is used.
30
+
31
+ Account ids come from **Account → Get Many**. Posts are checked against each network's rules (length, media) the same way as in the app; a post that breaks a rule is refused with a message that says which rule.
32
+
33
+ Limits: 60 requests a minute per key.
34
+
35
+ ## Development
36
+
37
+ ```bash
38
+ npm install
39
+ npm test # builds, then checks the package wiring and that every operation calls a real v1 route
40
+ ```
41
+
42
+ ## License
43
+
44
+ MIT
@@ -0,0 +1,10 @@
1
+ import type { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from "n8n-workflow";
2
+ export declare class PostaroApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ icon: "file:../nodes/Postaro/postaro.svg";
6
+ documentationUrl: string;
7
+ properties: INodeProperties[];
8
+ authenticate: IAuthenticateGeneric;
9
+ test: ICredentialTestRequest;
10
+ }
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PostaroApi = void 0;
4
+ class PostaroApi {
5
+ constructor() {
6
+ this.name = "postaroApi";
7
+ this.displayName = "Postaro API";
8
+ this.icon = "file:../nodes/Postaro/postaro.svg";
9
+ this.documentationUrl = "https://postaro.app";
10
+ this.properties = [
11
+ {
12
+ displayName: "API Key",
13
+ name: "apiKey",
14
+ type: "string",
15
+ typeOptions: { password: true },
16
+ default: "",
17
+ placeholder: "pst_…",
18
+ description: "Create a key in Postaro under API & agents",
19
+ },
20
+ {
21
+ displayName: "Server",
22
+ name: "baseUrl",
23
+ type: "string",
24
+ default: "https://postaro.app",
25
+ description: "Change only if you were given another address",
26
+ },
27
+ ];
28
+ this.authenticate = {
29
+ type: "generic",
30
+ properties: {
31
+ headers: {
32
+ Authorization: "=Bearer {{$credentials.apiKey}}",
33
+ },
34
+ },
35
+ };
36
+ this.test = {
37
+ request: {
38
+ baseURL: "={{$credentials.baseUrl}}",
39
+ url: "/api/v1/me",
40
+ method: "GET",
41
+ },
42
+ };
43
+ }
44
+ }
45
+ exports.PostaroApi = PostaroApi;
@@ -0,0 +1,4 @@
1
+ import type { INodeType, INodeTypeDescription } from "n8n-workflow";
2
+ export declare class Postaro implements INodeType {
3
+ description: INodeTypeDescription;
4
+ }
@@ -0,0 +1,268 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Postaro = void 0;
4
+ const workspace = {
5
+ displayName: "Workspace",
6
+ name: "workspace",
7
+ type: "string",
8
+ default: "",
9
+ description: "Workspace (client or brand) name or ID. Empty = the API key's first workspace.",
10
+ };
11
+ const postOperations = [
12
+ {
13
+ displayName: "Operation",
14
+ name: "operation",
15
+ type: "options",
16
+ noDataExpression: true,
17
+ displayOptions: { show: { resource: ["post"] } },
18
+ default: "create",
19
+ options: [
20
+ {
21
+ name: "Create",
22
+ value: "create",
23
+ action: "Create a post",
24
+ description: "Schedule, publish now, queue, or save a draft",
25
+ routing: { request: { method: "POST", url: "/api/v1/posts" } },
26
+ },
27
+ {
28
+ name: "Get",
29
+ value: "get",
30
+ action: "Get a post",
31
+ description: "A post with each account's result: live link, or the reason it failed",
32
+ routing: { request: { method: "GET", url: "=/api/v1/posts/{{$parameter.postId}}", qs: { workspace: "={{$parameter.workspace || undefined}}" } } },
33
+ },
34
+ {
35
+ name: "Get Many",
36
+ value: "getMany",
37
+ action: "Get many posts",
38
+ routing: {
39
+ request: { method: "GET", url: "/api/v1/posts", qs: { workspace: "={{$parameter.workspace || undefined}}", status: "={{$parameter.status || undefined}}", limit: "={{$parameter.limit}}" } },
40
+ output: { postReceive: [{ type: "rootProperty", properties: { property: "posts" } }] },
41
+ },
42
+ },
43
+ {
44
+ name: "Move",
45
+ value: "move",
46
+ action: "Move a post",
47
+ description: "Change the time of a post that hasn't started going out",
48
+ routing: { request: { method: "PATCH", url: "=/api/v1/posts/{{$parameter.postId}}", body: { scheduledAt: "={{$parameter.scheduledAt}}", workspace: "={{$parameter.workspace || undefined}}" } } },
49
+ },
50
+ {
51
+ name: "Cancel",
52
+ value: "cancel",
53
+ action: "Cancel a post",
54
+ description: "Cancel what hasn't gone out yet",
55
+ routing: { request: { method: "DELETE", url: "=/api/v1/posts/{{$parameter.postId}}", qs: { workspace: "={{$parameter.workspace || undefined}}" } } },
56
+ },
57
+ ],
58
+ },
59
+ ];
60
+ const postFields = [
61
+ // create sends it in the body; the other operations put it in their URL or body above
62
+ { ...workspace, displayOptions: { show: { resource: ["post"], operation: ["create"] } }, routing: { send: { type: "body", property: "workspace", value: "={{$value || undefined}}" } } },
63
+ { ...workspace, displayOptions: { show: { resource: ["post"], operation: ["get", "getMany", "move", "cancel"] } } },
64
+ {
65
+ displayName: "Post ID",
66
+ name: "postId",
67
+ type: "string",
68
+ required: true,
69
+ default: "",
70
+ displayOptions: { show: { resource: ["post"], operation: ["get", "move", "cancel"] } },
71
+ },
72
+ {
73
+ displayName: "Text",
74
+ name: "text",
75
+ type: "string",
76
+ typeOptions: { rows: 4 },
77
+ default: "",
78
+ displayOptions: { show: { resource: ["post"], operation: ["create"] } },
79
+ routing: { send: { type: "body", property: "text" } },
80
+ },
81
+ {
82
+ displayName: "Account IDs",
83
+ name: "accounts",
84
+ type: "string",
85
+ required: true,
86
+ default: "",
87
+ placeholder: "id1, id2",
88
+ description: "Comma-separated account IDs (Account → Get Many)",
89
+ displayOptions: { show: { resource: ["post"], operation: ["create"] } },
90
+ routing: { send: { type: "body", property: "accounts", value: "={{$value.split(',').map(s => s.trim()).filter(Boolean)}}" } },
91
+ },
92
+ {
93
+ displayName: "When",
94
+ name: "when",
95
+ type: "options",
96
+ default: "schedule",
97
+ displayOptions: { show: { resource: ["post"], operation: ["create"] } },
98
+ options: [
99
+ { name: "At a Time", value: "schedule" },
100
+ { name: "Next Free Posting Time (Queue)", value: "queue" },
101
+ { name: "Now", value: "now" },
102
+ { name: "Draft", value: "draft" },
103
+ { name: "Send to Client for Approval", value: "approval" },
104
+ ],
105
+ routing: { send: { type: "body", property: "when" } },
106
+ },
107
+ {
108
+ displayName: "Scheduled At",
109
+ name: "scheduledAt",
110
+ type: "dateTime",
111
+ default: "",
112
+ description: "When it goes out (with a time zone). Needed for At a Time and Approval.",
113
+ displayOptions: { show: { resource: ["post"], operation: ["create"], when: ["schedule", "approval"] } },
114
+ routing: { send: { type: "body", property: "scheduledAt" } },
115
+ },
116
+ {
117
+ displayName: "Scheduled At",
118
+ name: "scheduledAt",
119
+ type: "dateTime",
120
+ required: true,
121
+ default: "",
122
+ displayOptions: { show: { resource: ["post"], operation: ["move"] } },
123
+ },
124
+ {
125
+ displayName: "Options",
126
+ name: "options",
127
+ type: "collection",
128
+ placeholder: "Add option",
129
+ default: {},
130
+ displayOptions: { show: { resource: ["post"], operation: ["create"] } },
131
+ options: [
132
+ {
133
+ displayName: "Media IDs",
134
+ name: "mediaIds",
135
+ type: "string",
136
+ default: "",
137
+ description: "Comma-separated media IDs from Media → Import From URL, in order",
138
+ routing: { send: { type: "body", property: "mediaIds", value: "={{$value ? $value.split(',').map(s => s.trim()).filter(Boolean) : undefined}}" } },
139
+ },
140
+ {
141
+ displayName: "Thread / First Comment",
142
+ name: "followups",
143
+ type: "string",
144
+ typeOptions: { rows: 3 },
145
+ default: "",
146
+ description: "One per line. The rest of the thread on Bluesky and Threads; comments on Instagram, Facebook and YouTube.",
147
+ routing: { send: { type: "body", property: "followups", value: "={{$value ? $value.split('\\n').map(s => s.trim()).filter(Boolean) : undefined}}" } },
148
+ },
149
+ ],
150
+ },
151
+ {
152
+ displayName: "Status",
153
+ name: "status",
154
+ type: "options",
155
+ default: "",
156
+ displayOptions: { show: { resource: ["post"], operation: ["getMany"] } },
157
+ options: [
158
+ { name: "Any", value: "" },
159
+ { name: "Scheduled", value: "scheduled" },
160
+ { name: "Published", value: "published" },
161
+ { name: "Partly Published", value: "partial" },
162
+ { name: "Failed", value: "failed" },
163
+ { name: "Draft", value: "draft" },
164
+ ],
165
+ },
166
+ {
167
+ displayName: "Limit",
168
+ name: "limit",
169
+ type: "number",
170
+ typeOptions: { minValue: 1, maxValue: 100 },
171
+ default: 50,
172
+ description: "Max number of results to return",
173
+ displayOptions: { show: { resource: ["post"], operation: ["getMany"] } },
174
+ },
175
+ ];
176
+ const accountOperations = [
177
+ {
178
+ displayName: "Operation",
179
+ name: "operation",
180
+ type: "options",
181
+ noDataExpression: true,
182
+ displayOptions: { show: { resource: ["account"] } },
183
+ default: "getMany",
184
+ options: [
185
+ {
186
+ name: "Get Many",
187
+ value: "getMany",
188
+ action: "Get many accounts",
189
+ description: "Connected accounts; canPost=false means it must be reconnected in Postaro",
190
+ routing: {
191
+ request: { method: "GET", url: "/api/v1/accounts", qs: { workspace: "={{$parameter.workspace || undefined}}" } },
192
+ output: { postReceive: [{ type: "rootProperty", properties: { property: "accounts" } }] },
193
+ },
194
+ },
195
+ ],
196
+ },
197
+ { ...workspace, displayOptions: { show: { resource: ["account"] } } },
198
+ ];
199
+ const mediaOperations = [
200
+ {
201
+ displayName: "Operation",
202
+ name: "operation",
203
+ type: "options",
204
+ noDataExpression: true,
205
+ displayOptions: { show: { resource: ["media"] } },
206
+ default: "importUrl",
207
+ options: [
208
+ {
209
+ name: "Import From URL",
210
+ value: "importUrl",
211
+ action: "Import an image from a URL",
212
+ description: "Copies a public image into Postaro and returns its media ID",
213
+ routing: { request: { method: "POST", url: "/api/v1/media" } },
214
+ },
215
+ ],
216
+ },
217
+ {
218
+ displayName: "Image URL",
219
+ name: "url",
220
+ type: "string",
221
+ required: true,
222
+ default: "",
223
+ displayOptions: { show: { resource: ["media"] } },
224
+ routing: { send: { type: "body", property: "url" } },
225
+ },
226
+ { ...workspace, displayOptions: { show: { resource: ["media"] } }, routing: { send: { type: "body", property: "workspace", value: "={{$value || undefined}}" } } },
227
+ ];
228
+ class Postaro {
229
+ constructor() {
230
+ this.description = {
231
+ displayName: "Postaro",
232
+ name: "postaro",
233
+ icon: "file:postaro.svg",
234
+ group: ["output"],
235
+ version: 1,
236
+ subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
237
+ description: "Schedule posts to Instagram, TikTok, LinkedIn, YouTube, X, Threads, Facebook, Pinterest and Bluesky",
238
+ defaults: { name: "Postaro" },
239
+ usableAsTool: true,
240
+ inputs: ["main"],
241
+ outputs: ["main"],
242
+ credentials: [{ name: "postaroApi", required: true }],
243
+ requestDefaults: {
244
+ baseURL: "={{$credentials.baseUrl}}",
245
+ headers: { Accept: "application/json", "Content-Type": "application/json" },
246
+ },
247
+ properties: [
248
+ {
249
+ displayName: "Resource",
250
+ name: "resource",
251
+ type: "options",
252
+ noDataExpression: true,
253
+ default: "post",
254
+ options: [
255
+ { name: "Post", value: "post" },
256
+ { name: "Account", value: "account" },
257
+ { name: "Media", value: "media" },
258
+ ],
259
+ },
260
+ ...postOperations,
261
+ ...postFields,
262
+ ...accountOperations,
263
+ ...mediaOperations,
264
+ ],
265
+ };
266
+ }
267
+ }
268
+ exports.Postaro = Postaro;
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M3.7 2 L5.8999999999999995 2 A1.7 1.7 0 0 0 9.299999999999999 2 L11.5 2 A1.7 1.7 0 0 0 14.899999999999999 2 L17.1 2 A1.7 1.7 0 0 0 20.5 2 L22.7 2 A1.7 1.7 0 0 0 26.099999999999998 2 L28.3 2 A1.7 1.7 0 0 0 30 3.7 L30 5.8999999999999995 A1.7 1.7 0 0 0 30 9.299999999999999 L30 11.5 A1.7 1.7 0 0 0 30 14.899999999999999 L30 17.1 A1.7 1.7 0 0 0 30 20.5 L30 22.7 A1.7 1.7 0 0 0 30 26.099999999999998 L30 28.3 A1.7 1.7 0 0 0 28.3 30 L26.099999999999998 30 A1.7 1.7 0 0 0 22.7 30 L20.5 30 A1.7 1.7 0 0 0 17.1 30 L14.899999999999999 30 A1.7 1.7 0 0 0 11.5 30 L9.299999999999999 30 A1.7 1.7 0 0 0 5.8999999999999995 30 L3.7 30 A1.7 1.7 0 0 0 2 28.3 L2 26.099999999999998 A1.7 1.7 0 0 0 2 22.7 L2 20.5 A1.7 1.7 0 0 0 2 17.1 L2 14.899999999999999 A1.7 1.7 0 0 0 2 11.5 L2 9.299999999999999 A1.7 1.7 0 0 0 2 5.8999999999999995 L2 3.7 A1.7 1.7 0 0 0 3.7 2 Z" fill="#cf3f17"/><path d="M10.2 8.2h6.6a5.6 5.6 0 0 1 0 11.2h-3v4.4h-3.6zm3.6 3.2v4.8h2.9a2.4 2.4 0 0 0 0-4.8z" fill="#fff" fill-rule="evenodd"/></svg>
package/package.json CHANGED
@@ -1,6 +1,42 @@
1
1
  {
2
2
  "name": "n8n-nodes-postaro",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "n8n node for Postaro: schedule posts to Instagram, TikTok, LinkedIn, YouTube, X, Threads, Facebook, Pinterest and Bluesky.",
5
+ "license": "MIT",
6
+ "homepage": "https://postaro.app",
7
+ "keywords": [
8
+ "n8n-community-node-package",
9
+ "postaro",
10
+ "social media",
11
+ "scheduler"
12
+ ],
13
+ "scripts": {
14
+ "build": "tsc && node scripts/copy-icons.mjs",
15
+ "test": "npm run build && node --test test/node.test.mjs",
16
+ "prepublishOnly": "npm run build"
17
+ },
18
+ "files": [
19
+ "dist",
20
+ "LICENSE"
21
+ ],
22
+ "n8n": {
23
+ "n8nNodesApiVersion": 1,
24
+ "strict": true,
25
+ "credentials": [
26
+ "dist/credentials/PostaroApi.credentials.js"
27
+ ],
28
+ "nodes": [
29
+ "dist/nodes/Postaro/Postaro.node.js"
30
+ ]
31
+ },
32
+ "devDependencies": {
33
+ "n8n-workflow": "2.16.0",
34
+ "typescript": "5.9.3"
35
+ },
36
+ "peerDependencies": {
37
+ "n8n-workflow": "*"
38
+ },
39
+ "bugs": {
40
+ "email": "hello@postaro.app"
41
+ }
42
+ }