n8n-nodes-sofia-post 0.1.2 → 0.1.3

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.
Files changed (2) hide show
  1. package/README.md +76 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Publish, schedule and follow your social media posts with [Sofia](https://www.sofia-post.com) from any n8n workflow.
4
4
 
5
- [Installation](#installation) · [Credentials](#credentials) · [Operations](#operations) · [Compatibility](#compatibility) · [Resources](#resources)
5
+ [Installation](#installation) · [Credentials](#credentials) · [Operations](#operations) · [Example](#example) · [Compatibility](#compatibility) · [Resources](#resources)
6
6
 
7
7
  ## Installation
8
8
 
@@ -33,6 +33,81 @@ The output of a post carries its `id`, `status`, `platforms`, the first `permali
33
33
 
34
34
  The trigger polls Sofia. It starts with the posts that appear after the workflow is activated: posts published before are not replayed. **Fetch Test Event** shows the latest post so you can map its fields. Choose an establishment to watch only that one.
35
35
 
36
+ ## Example
37
+
38
+ A workflow that schedules a post on Instagram and Facebook, then reads its state.
39
+
40
+ ### 1. Create the post
41
+
42
+ Add a **Sofia** node, choose **Post › Create**, and fill it in:
43
+
44
+ | Field | Value |
45
+ | ------------------------------- | ------------------------------------------------------------ |
46
+ | Establishment Name or ID | `Bistrot Lumiere` |
47
+ | Account Names or IDs | `Instagram — @bistrot_lumiere`, `Facebook — Bistrot Lumiere` |
48
+ | Text | `Fresh pasta is back on the menu this Friday.` |
49
+ | Additional Fields › Media URLs | `https://example.com/pasta.jpg` |
50
+ | Additional Fields › Schedule At | `2026-11-13T11:30:00` |
51
+
52
+ **Establishment** and **Accounts** are dropdowns filled from Sofia; **Accounts** lists the networks connected to the chosen establishment. Leave **Schedule At** empty to publish now, or turn **Draft** on to save the post without publishing it.
53
+
54
+ The node returns one item:
55
+
56
+ ```json
57
+ {
58
+ "id": "pst_01HZX4T9M2",
59
+ "status": "scheduled",
60
+ "establishmentId": "est_01HZX4R7K8",
61
+ "createdAt": "2026-11-10T09:12:44.000Z",
62
+ "scheduledAt": "2026-11-13T10:30:00.000Z",
63
+ "platforms": "instagram, facebook",
64
+ "targets": [
65
+ { "platform": "instagram", "accountId": "acc_01HZX4S1A1", "state": "scheduled" },
66
+ { "platform": "facebook", "accountId": "acc_01HZX4S1B2", "state": "scheduled" }
67
+ ]
68
+ }
69
+ ```
70
+
71
+ `scheduledAt` is the instant Sofia will publish at: here 11:30 in a workflow whose time zone is Europe/Paris.
72
+
73
+ ### 2. Read the post
74
+
75
+ Add a second **Sofia** node, choose **Post › Get**, and set **Post ID** to `{{ $json.id }}`. Once the post is out, the item carries the link and what each network answered:
76
+
77
+ ```json
78
+ {
79
+ "id": "pst_01HZX4T9M2",
80
+ "status": "partial",
81
+ "establishmentId": "est_01HZX4R7K8",
82
+ "createdAt": "2026-11-10T09:12:44.000Z",
83
+ "scheduledAt": "2026-11-13T10:30:00.000Z",
84
+ "platforms": "instagram, facebook",
85
+ "permalink": "https://www.instagram.com/p/DCxyz123/",
86
+ "errors": "facebook: the page is no longer connected",
87
+ "targets": [
88
+ {
89
+ "platform": "instagram",
90
+ "accountId": "acc_01HZX4S1A1",
91
+ "state": "published",
92
+ "publishedAt": "2026-11-13T10:30:05.000Z",
93
+ "permalink": "https://www.instagram.com/p/DCxyz123/"
94
+ },
95
+ {
96
+ "platform": "facebook",
97
+ "accountId": "acc_01HZX4S1B2",
98
+ "state": "failed",
99
+ "error": "the page is no longer connected"
100
+ }
101
+ ]
102
+ }
103
+ ```
104
+
105
+ `partial` means the post went live on one network and was refused by another; a post that every network accepted is `published`.
106
+
107
+ ### 3. React to a result
108
+
109
+ Start another workflow with a **Sofia Trigger** node on **Post Failed**, and connect it to a Slack or email node with a message such as `{{ $json.platforms }}: {{ $json.errors }}`. The trigger emits the same item as **Post › Get**, once per post.
110
+
36
111
  ## Compatibility
37
112
 
38
113
  Built and tested against `n8n-workflow` 2.x, with n8n nodes API version 1.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-sofia-post",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Sofia for n8n: publish, schedule and follow your social media posts from any workflow.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://www.sofia-post.com/developers",