@zerodot/convertkit 0.0.0-stage → 1.0.1
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 +661 -0
- package/README.md +75 -2
- package/convertkit.svg +4 -0
- package/dist/index.cjs +693 -0
- package/package.json +53 -3
package/README.md
CHANGED
|
@@ -1,3 +1,76 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @zerodot/convertkit
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<img src="https://raw.githubusercontent.com/zerodot-io/nodes/main/packages/convertkit/convertkit.svg" alt="ConvertKit logo" width="48" height="48">
|
|
4
|
+
|
|
5
|
+
Manage subscribers, tags, forms, custom fields, and broadcasts in Kit (ConvertKit). The node calls the Kit V4 API with an API key. Lists read several pages from Kit and return them as one array.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
In zerodot, go to **System > Nodes** and install **ConvertKit**.
|
|
10
|
+
|
|
11
|
+
Manual: install `@zerodot/convertkit` where the web app and the worker run, and add it to `ZERODOT_NODE_PACKAGES`.
|
|
12
|
+
|
|
13
|
+
## Nodes
|
|
14
|
+
|
|
15
|
+
### ConvertKit (`convertkit.api`)
|
|
16
|
+
|
|
17
|
+
- **Subscriber**: get many, get, create, update
|
|
18
|
+
- **Tag**: get many, create, tag subscriber
|
|
19
|
+
- **Form**: get many, add subscriber
|
|
20
|
+
- **Custom Field**: get many, create
|
|
21
|
+
- **Broadcast**: get many, get, create
|
|
22
|
+
|
|
23
|
+
**Get many.** Each list returns an array of items. Turn on **Return All** to read every item, up to 5000. The node stops at 5000 items in one run. It does not warn when there are more, so check the count when you need all items. When **Return All** is off, **Limit** sets the number of items. It is 50 by default, and it can be 1 to 5000. The node reads pages of up to 1000 items. It stops when Kit reports no next page.
|
|
24
|
+
|
|
25
|
+
**Subscriber filters.** Subscriber Get Many has two filters. **Email Address** returns only the subscriber with that address. **State** is `active`, `inactive`, `bounced`, `complained`, or `cancelled`. For example, set Email Address to `ada@example.com` and State to `active`. The filters are sent as the `email_address` and `status` query values.
|
|
26
|
+
|
|
27
|
+
**Subscriber get and update.** Both need **Subscriber ID**. Update also needs **Email**, which is required by Kit. It sends the email address, the first name, and the custom fields that have a value. It also sends the state when one is set.
|
|
28
|
+
|
|
29
|
+
**Subscriber create.** Needs **Email**. It sends the email address, **First Name**, and **Custom Fields** to Kit.
|
|
30
|
+
|
|
31
|
+
**Custom fields.** **Custom Fields** is an object of values. The name of each entry is the field label or key in Kit.
|
|
32
|
+
|
|
33
|
+
**Tag.** Create needs **Name**. Tag Subscriber needs **Tag ID** and **Email**. It adds the tag to the subscriber. It also sends the first name and the custom fields when they are set.
|
|
34
|
+
|
|
35
|
+
**Form.** Add Subscriber needs **Form ID** and **Email**. It sends the first name and the custom fields when they are set.
|
|
36
|
+
|
|
37
|
+
**Custom Field.** Create needs **Label**, or **Name** when Label is empty. **Key** is optional. Leave it empty to let Kit make the key from the label.
|
|
38
|
+
|
|
39
|
+
**Broadcast.** Get needs **Broadcast ID**. Create takes **Subject**, **Content** (HTML), **Description**, **Email Address** (the sender), **Email Template ID**, **Public** (shown in the web archive), **Published At**, **Send At**, and **Preview Text**. Published At and Send At take an ISO 8601 date and time. An empty Send At saves the broadcast as a draft.
|
|
40
|
+
|
|
41
|
+
**IDs.** Subscriber, tag, form, and broadcast IDs must be 1 to 64 letters, digits, `_`, or `-`. An ID with other characters fails before the request.
|
|
42
|
+
|
|
43
|
+
**Email.** An email address must have one `@` and no spaces. The node does not check it any further.
|
|
44
|
+
|
|
45
|
+
**Output.** Get many returns an array of items. The other operations return the JSON answer of Kit. If Kit sends no body, the output is `{ "success": true }`. The node does not return binary data.
|
|
46
|
+
|
|
47
|
+
## Behavior notes
|
|
48
|
+
|
|
49
|
+
- **Required fields.** Each operation checks its required fields before it calls Kit. A missing field fails the run.
|
|
50
|
+
- **Binary data.** The node has no binary input or output.
|
|
51
|
+
- **API limits.** Kit allows up to 1000 items per page. The node reads at most 5000 items in one run.
|
|
52
|
+
- **Retries.** The node does not retry. When Kit answers with HTTP 429, the run fails. Kit sends the text `Retry later` and no `Retry-After` header.
|
|
53
|
+
- **Errors.** An error names the action, the HTTP status, and Kit's message. It adds a short hint for statuses 401, 403, 404, and 429. The API key never appears in an error.
|
|
54
|
+
- **Redirects.** The node does not follow redirects.
|
|
55
|
+
- **Timeout.** Each request has a timeout of 30 seconds by default. The maximum is 300 seconds.
|
|
56
|
+
|
|
57
|
+
## Credentials
|
|
58
|
+
|
|
59
|
+
### ConvertKit API key (`convertkit.apiKey`)
|
|
60
|
+
|
|
61
|
+
- **API Key** (`apiKey`): Your Kit V4 API key. Secret.
|
|
62
|
+
|
|
63
|
+
The credential has no scope setting. The node sends the key in the `X-Kit-Api-Key` header to `https://api.kit.com`.
|
|
64
|
+
|
|
65
|
+
The credential test calls `GET /v4/account`.
|
|
66
|
+
|
|
67
|
+
Setup:
|
|
68
|
+
|
|
69
|
+
1. In Kit, go to **Settings**, then **Developer**.
|
|
70
|
+
2. Copy the V4 API key.
|
|
71
|
+
3. In zerodot, create a **ConvertKit API key** credential.
|
|
72
|
+
4. Paste the key into **API Key** and save the credential.
|
|
73
|
+
|
|
74
|
+
## License
|
|
75
|
+
|
|
76
|
+
AGPL-3.0-only
|
package/convertkit.svg
ADDED