n8n-nodes-simplepost 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 +21 -0
- package/README.md +122 -2
- package/dist/credentials/SimplePostApi.credentials.d.ts +10 -0
- package/dist/credentials/SimplePostApi.credentials.js +51 -0
- package/dist/credentials/SimplePostApi.credentials.js.map +1 -0
- package/dist/nodes/SimplePost/SimplePost.node.d.ts +10 -0
- package/dist/nodes/SimplePost/SimplePost.node.js +560 -0
- package/dist/nodes/SimplePost/SimplePost.node.js.map +1 -0
- package/dist/nodes/SimplePost/SimplePost.node.json +29 -0
- package/dist/nodes/SimplePost/SimplePostTrigger.node.d.ts +12 -0
- package/dist/nodes/SimplePost/SimplePostTrigger.node.js +147 -0
- package/dist/nodes/SimplePost/SimplePostTrigger.node.js.map +1 -0
- package/dist/nodes/SimplePost/SimplePostTrigger.node.json +19 -0
- package/dist/nodes/SimplePost/shared.d.ts +11 -0
- package/dist/nodes/SimplePost/shared.js +103 -0
- package/dist/nodes/SimplePost/shared.js.map +1 -0
- package/dist/nodes/SimplePost/simplePost.dark.svg +4 -0
- package/dist/nodes/SimplePost/simplePost.svg +4 -0
- package/dist/package.json +62 -0
- package/package.json +61 -5
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Vladimir Haltakov
|
|
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,123 @@
|
|
|
1
|
-
#
|
|
1
|
+
# SimplePost for n8n
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Publish, schedule, or save social media posts as drafts from n8n with [SimplePost](https://simplepost.social). The node posts to every social account connected to your SimplePost workspace, including X, LinkedIn, Instagram, Facebook, Threads, TikTok, YouTube, Pinterest, Bluesky, Telegram, and DEV/Forem.
|
|
4
|
+
|
|
5
|
+
The package contains two nodes:
|
|
6
|
+
|
|
7
|
+
| Node | Resource | Operations |
|
|
8
|
+
| ---------------------- | ----------- | ----------------------------------------------------------------------- |
|
|
9
|
+
| **SimplePost** | Post | Create (publish now, schedule, or save as draft), Get, Get Many, Delete |
|
|
10
|
+
| | Account | Get Many |
|
|
11
|
+
| | Media | Upload (from n8n binary data) |
|
|
12
|
+
| **SimplePost Trigger** | Post events | Post Published, Post Failed |
|
|
13
|
+
|
|
14
|
+
The SimplePost node can also be used as a tool by n8n AI agents.
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
**n8n Cloud and self-hosted, after verification:** open the nodes panel, search for **SimplePost**, and select **Install** under **More from the community**. Only instance owners and admins can install community nodes.
|
|
19
|
+
|
|
20
|
+
**Self-hosted, from npm:** go to **Settings > Community Nodes > Install**, enter `n8n-nodes-simplepost`, and confirm. See the [n8n community node installation guide](https://docs.n8n.io/integrations/community-nodes/installation-and-management/gui-installation/).
|
|
21
|
+
|
|
22
|
+
## Credentials
|
|
23
|
+
|
|
24
|
+
1. Connect the social accounts you want to use in the SimplePost app.
|
|
25
|
+
2. Open **API Keys** in SimplePost and create a key. API access is included in plans with the API feature. Copy the key immediately; it's only shown once.
|
|
26
|
+
3. In n8n, create a **SimplePost API** credential and paste the key.
|
|
27
|
+
4. Keep the default **Base URL** (`https://app.simplepost.social`), or enter the URL of your self-hosted Scheduler app.
|
|
28
|
+
5. Save. n8n tests the credential by listing your connected accounts.
|
|
29
|
+
|
|
30
|
+
## Create a post
|
|
31
|
+
|
|
32
|
+
Add the **SimplePost** node, choose **Post > Create**, pick one or more connected accounts, enter the message, and choose a posting mode:
|
|
33
|
+
|
|
34
|
+
- **Publish Now** publishes immediately. If any account rejects the post, the node fails the item with the reason. With **Continue On Fail**, the output contains the error and the full SimplePost response.
|
|
35
|
+
- **Schedule** publishes at a future date and time. Dates without an offset use the workflow timezone.
|
|
36
|
+
- **Save as Draft** keeps the post in SimplePost for review.
|
|
37
|
+
|
|
38
|
+
### Media
|
|
39
|
+
|
|
40
|
+
Add media items with public image or video URLs. SimplePost imports external files into its own storage and validates them against each platform before publishing.
|
|
41
|
+
|
|
42
|
+
To post a file produced earlier in the workflow (for example, an AI-generated image or a file from Google Drive), use **Media > Upload** first. It uploads the binary field and returns `url`, `type`, and `filename`, which you can map into the Create operation's media fields with expressions such as `{{ $json.url }}`.
|
|
43
|
+
|
|
44
|
+
### Additional fields
|
|
45
|
+
|
|
46
|
+
| Field | Purpose |
|
|
47
|
+
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
48
|
+
| Account Options (JSON) | Platform settings keyed by account ID, such as YouTube `title` and `privacyStatus`, Pinterest `boardId`, or TikTok `privacyLevel` |
|
|
49
|
+
| Account Overrides (JSON) | A different `message`, `media`, or `thread` for specific accounts |
|
|
50
|
+
| Thread (JSON) | Up to 24 additional segments after the main message |
|
|
51
|
+
| Image Fit | Crop or blur-pad images a platform would reject. Requires image fitting on your SimplePost account |
|
|
52
|
+
| Repost / Repost Delay | Repost automatically after publishing |
|
|
53
|
+
| Quote Post ID | Quote a published SimplePost post |
|
|
54
|
+
| Idempotency Key | Retrying with the same key returns the original post instead of publishing again |
|
|
55
|
+
|
|
56
|
+
JSON fields accept typed JSON or an expression that returns an object or array. Account option example:
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"ACCOUNT_ID": {
|
|
61
|
+
"title": "Launch video",
|
|
62
|
+
"privacyStatus": "public",
|
|
63
|
+
"tags": ["automation", "n8n"]
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Account override example:
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"ACCOUNT_ID": { "message": "A LinkedIn-specific version of the post" }
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Thread example:
|
|
77
|
+
|
|
78
|
+
```json
|
|
79
|
+
[{ "message": "Part two" }, { "message": "Part three" }]
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
The node automatically uses a per-item idempotency key for retries within the same execution. To deduplicate across workflow executions, supply a stable ID from the source item, such as an RSS GUID. Thread and account-override media in JSON use full media objects, such as the output of **Media > Upload**.
|
|
83
|
+
|
|
84
|
+
## Trigger
|
|
85
|
+
|
|
86
|
+
The **SimplePost Trigger** starts a workflow when a post is published or fails, whether it was published from n8n, the SimplePost app, the API, or a schedule. When you activate the workflow, n8n registers a SimplePost webhook and removes it when you deactivate the workflow.
|
|
87
|
+
|
|
88
|
+
Each delivery is verified with its `X-SimplePost-Signature` HMAC and timestamp; unsigned, forged, or stale requests are rejected. The output contains `event`, `createdAt`, and `post` (ID, status, message, publish time, error message, and per-account results).
|
|
89
|
+
|
|
90
|
+
SimplePost only delivers webhooks to public URLs and allows up to 10 webhooks per account. To test a local n8n instance, expose it through a tunnel and set `WEBHOOK_URL`.
|
|
91
|
+
|
|
92
|
+
## Example workflows
|
|
93
|
+
|
|
94
|
+
- **RSS to social:** RSS Feed Trigger → SimplePost (Post > Create, Schedule) with the item title and link.
|
|
95
|
+
- **AI image post:** OpenAI (generate image) → SimplePost (Media > Upload) → SimplePost (Post > Create, Publish Now) with `{{ $json.url }}` as the media URL.
|
|
96
|
+
- **Failure alerts:** SimplePost Trigger (Post Failed) → Slack message with `{{ $json.post.errorMessage }}`.
|
|
97
|
+
|
|
98
|
+
## Compatibility
|
|
99
|
+
|
|
100
|
+
Built and tested with n8n Node CLI 0.57.3 and n8n Workflow 2.48.2. The node uses the SimplePost Scheduler API (`/api/v1`) and requires a SimplePost API key; self-hosted Scheduler apps must run a version that includes the posts, upload presign, and webhooks endpoints.
|
|
101
|
+
|
|
102
|
+
## Development
|
|
103
|
+
|
|
104
|
+
This package is standalone and uses npm, separate from the monorepo's Yarn workspaces.
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
cd integrations/n8n
|
|
108
|
+
npm ci
|
|
109
|
+
npm run lint
|
|
110
|
+
npm test # builds, then runs the node:test suite
|
|
111
|
+
npm run dev # starts n8n with the node loaded at http://localhost:5678
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
See [PUBLISHING.md](PUBLISHING.md) for the release and n8n verification process.
|
|
115
|
+
|
|
116
|
+
## Resources
|
|
117
|
+
|
|
118
|
+
- [SimplePost API documentation](https://docs.simplepost.social/api-reference)
|
|
119
|
+
- [n8n community nodes documentation](https://docs.n8n.io/integrations/community-nodes/)
|
|
120
|
+
|
|
121
|
+
## License
|
|
122
|
+
|
|
123
|
+
[MIT](LICENSE)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IAuthenticateGeneric, Icon, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class SimplePostApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
icon: Icon;
|
|
6
|
+
documentationUrl: string;
|
|
7
|
+
properties: INodeProperties[];
|
|
8
|
+
authenticate: IAuthenticateGeneric;
|
|
9
|
+
test: ICredentialTestRequest;
|
|
10
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SimplePostApi = void 0;
|
|
4
|
+
class SimplePostApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'simplePostApi';
|
|
7
|
+
this.displayName = 'SimplePost API';
|
|
8
|
+
this.icon = {
|
|
9
|
+
light: 'file:../nodes/SimplePost/simplePost.svg',
|
|
10
|
+
dark: 'file:../nodes/SimplePost/simplePost.dark.svg',
|
|
11
|
+
};
|
|
12
|
+
this.documentationUrl = 'https://github.com/simple-post/core/tree/main/integrations/n8n#credentials';
|
|
13
|
+
this.properties = [
|
|
14
|
+
{
|
|
15
|
+
displayName: 'API Key',
|
|
16
|
+
name: 'apiKey',
|
|
17
|
+
type: 'string',
|
|
18
|
+
typeOptions: { password: true },
|
|
19
|
+
default: '',
|
|
20
|
+
required: true,
|
|
21
|
+
placeholder: 'e.g. sp_api_...',
|
|
22
|
+
description: 'Create an API key on the API Keys page of the SimplePost app',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
displayName: 'Base URL',
|
|
26
|
+
name: 'baseUrl',
|
|
27
|
+
type: 'string',
|
|
28
|
+
default: 'https://app.simplepost.social',
|
|
29
|
+
required: true,
|
|
30
|
+
description: 'Keep the default for hosted SimplePost, or enter the URL of your self-hosted Scheduler app',
|
|
31
|
+
},
|
|
32
|
+
];
|
|
33
|
+
this.authenticate = {
|
|
34
|
+
type: 'generic',
|
|
35
|
+
properties: {
|
|
36
|
+
headers: {
|
|
37
|
+
Authorization: '=Bearer {{$credentials.apiKey}}',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
this.test = {
|
|
42
|
+
request: {
|
|
43
|
+
baseURL: '={{$credentials.baseUrl.replace(/\\/+$/, "")}}',
|
|
44
|
+
url: '/api/v1/accounts',
|
|
45
|
+
method: 'GET',
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.SimplePostApi = SimplePostApi;
|
|
51
|
+
//# sourceMappingURL=SimplePostApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SimplePostApi.credentials.js","sourceRoot":"","sources":["../../credentials/SimplePostApi.credentials.ts"],"names":[],"mappings":";;;AAQA,MAAa,aAAa;IAA1B;QACC,SAAI,GAAG,eAAe,CAAC;QAEvB,gBAAW,GAAG,gBAAgB,CAAC;QAE/B,SAAI,GAAS;YACZ,KAAK,EAAE,yCAAyC;YAChD,IAAI,EAAE,8CAA8C;SACpD,CAAC;QAEF,qBAAgB,GAAG,4EAA4E,CAAC;QAEhG,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,iBAAiB;gBAC9B,WAAW,EAAE,8DAA8D;aAC3E;YACD;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,+BAA+B;gBACxC,QAAQ,EAAE,IAAI;gBACd,WAAW,EACV,4FAA4F;aAC7F;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,aAAa,EAAE,iCAAiC;iBAChD;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,gDAAgD;gBACzD,GAAG,EAAE,kBAAkB;gBACvB,MAAM,EAAE,KAAK;aACb;SACD,CAAC;IACH,CAAC;CAAA;AAlDD,sCAkDC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IExecuteFunctions, ILoadOptionsFunctions, INodeExecutionData, INodePropertyOptions, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
export declare class SimplePost implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
methods: {
|
|
5
|
+
loadOptions: {
|
|
6
|
+
getAccounts(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
10
|
+
}
|