@zerodot/hootsuite 0.0.0-stage → 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 CHANGED
@@ -1,3 +1,72 @@
1
- # Temporary Holding Version
1
+ # @zerodot/hootsuite
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
+ Schedule and manage social media posts, upload media, and read profiles, teams, and members in Hootsuite. Use it to automate your social publishing.
4
+
5
+ ## Install
6
+
7
+ In zerodot, go to **System > Nodes** and install **Hootsuite**.
8
+
9
+ Manual: install `@zerodot/hootsuite` where the web app and the worker run, and add it to `ZERODOT_NODE_PACKAGES`.
10
+
11
+ ## Nodes
12
+
13
+ ### Hootsuite (`hootsuite.api`)
14
+
15
+ The node uses the Hootsuite REST API (`https://platform.hootsuite.com/v1`) and the SCIM 2.0 API (`/scim/v2`).
16
+
17
+ - **Me**: get the signed-in member, organizations, social profiles, ad accounts
18
+ - **Message**: schedule, get, get many, delete, approve, reject, get review history
19
+ - **Comment**: get, approve, reject
20
+ - **Media**: create upload URL, upload, get status
21
+ - **Social Profile**: get, get many, get teams
22
+ - **Member**: get, create, get organizations
23
+ - **Organization**: get members, remove member, get member permissions, teams, social profiles, and social profile permissions
24
+ - **Team**: get, get many, create, add member, get members, get member permissions, get social profiles
25
+ - **SCIM User**: create, get, get many, replace, update
26
+ - **SCIM Group**: create, get, get many, replace, update
27
+ - **SCIM Resource Type**: get many
28
+
29
+ ### Schedule a message
30
+
31
+ Put the IDs of the social profiles in **Social Profile IDs**, with commas between. Set **Send Time** in ISO 8601 format, for example `2030-01-01T10:00:00Z`. If you leave it empty, Hootsuite sends the message now. A video must be at least 15 minutes in the future.
32
+
33
+ Hootsuite makes one message for each social profile. If some profiles fail, the output is `{ data, errors }`. If all profiles fail, the node stops with an error.
34
+
35
+ For Pinterest, use **Extended Info**. For targeting and privacy, use **Targeting** and **Privacy** (JSON).
36
+
37
+ ### Upload media
38
+
39
+ The **Upload** operation reads binary data from the input (property `data`, or the name in **Binary Property**). It does the steps of the Hootsuite upload flow:
40
+
41
+ 1. `POST /v1/media` with the size and the MIME type. Hootsuite gives an upload URL.
42
+ 2. `PUT` the bytes to the upload URL. The node does not send your token to this URL.
43
+ 3. `GET /v1/media/{mediaId}` until the state is `READY`.
44
+
45
+ The output is `{ id, state }`. Use the `id` in **Media IDs** of a message. To skip the status checks, turn off **Wait Until Ready**.
46
+
47
+ To attach a file to a message in one step, set **Binary Property** on **Schedule**. The node uploads the file, waits until it is ready, and adds it to the message.
48
+
49
+ Use **Create Upload URL** if you want to do the `PUT` yourself.
50
+
51
+ ### Lists
52
+
53
+ **Message > Get Many** needs **Start Time** and **End Time**. The range can be 4 weeks at most. The node follows the cursor of Hootsuite. The SCIM lists use `startIndex` and `count`. A list has **Return All** and **Limit**. The most it returns is 5000 items.
54
+
55
+ ## Credentials
56
+
57
+ - **Hootsuite OAuth2** (`hootsuite.oauth2`): `clientId`, `clientSecret`, and `scope` (default `offline`). The client secret and the tokens are secret.
58
+
59
+ You need a Hootsuite developer app to get the client ID and the client secret. Access to the API is for Hootsuite partners. Ask Hootsuite for access at https://developer.hootsuite.com/.
60
+
61
+ 1. Make an app in the Hootsuite developer portal.
62
+ 2. Add the redirect URL of your zerodot instance to the app.
63
+ 3. Copy the client ID and the client secret into the credential in zerodot.
64
+ 4. Connect the account. The credential uses the endpoints `https://platform.hootsuite.com/oauth2/auth` and `https://platform.hootsuite.com/oauth2/token`. The token request uses HTTP Basic authentication.
65
+
66
+ The scope `offline` gives a refresh token. Add `analytics:read` only if your app has access to analytics.
67
+
68
+ The credential does not support the `member_app` and `organization_app` grant types.
69
+
70
+ ## License
71
+
72
+ AGPL-3.0-only