n8n-nodes-obo 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/README.md CHANGED
@@ -1,3 +1,93 @@
1
- # Temporary Holding Version
1
+ # n8n-nodes-obo
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
+ n8n nodes for Obo, RoboticGen's WhatsApp platform. They do everything the 2Chat n8n node does, plus Obo's groups, inbox, polls, status posts and bulk sends:
4
+
5
+ - **Obo** sends messages and manages groups, numbers and the inbox.
6
+ - **Obo Trigger** starts a workflow when something happens on WhatsApp.
7
+
8
+ ## Set up
9
+
10
+ 1. In Obo, open **Developer** and create an API key.
11
+ - Tick the scopes the workflows need:
12
+ - **Messages** to send.
13
+ - **Sessions** to read numbers and groups. Sessions write is needed to change groups, block numbers or check many numbers at once.
14
+ - **Webhooks** for the Obo Trigger.
15
+ - To limit the key to one WhatsApp number, pick that number.
16
+ 2. In n8n, add an **Obo API** credential.
17
+ - **API Key:** the `wsk_…` key from step 1.
18
+ - **Obo URL:** `https://obo-whatsapp.roboticgen.co`.
19
+ - **Test** calls `GET /api/v1/me`.
20
+
21
+ ## Obo node
22
+
23
+ | Resource | Operations |
24
+ |---|---|
25
+ | Message | **Send** to a person or a group: text, image, video, GIF, audio, voice note, document, sticker, location, contact card, poll, buttons or list. Text can quote a message; an image can be view-once. Also **React**, **Edit**, **Delete**, **Mark as Read** and **Show Typing**. |
26
+ | Group | Get Many, Get, Create, Add/Remove Participants, Promote/Demote Admins, Get/Revoke Invite Link, Join With Invite, Leave, Update Name/Description/Picture/Settings. |
27
+ | Phone Number | Check (on WhatsApp? business?), Check Many (up to 100), Get Profile Picture, Get About, Block, Unblock. |
28
+ | WhatsApp Number | Get Many, Get: the numbers connected to Obo and their status. |
29
+ | Conversation (Inbox) | Get Many, Get Messages, Reply, Add Note, Update (status, priority, assignee, tags), Search Contacts. |
30
+ | Status | Post a text status, seen by the numbers you list (at most 5 a day). |
31
+ | Bulk Send | Send one text to up to 50 numbers with a pause between each; Get Job. |
32
+
33
+ - **Numbers:** any format works (`+94 77 123 4567`, `0094771234567`, `94771234567`). The node keeps only the digits.
34
+ - **Groups:** pick a group from the list; it loads that number's groups.
35
+ - **Errors:** each failed item stops the run unless **Continue On Fail** is on.
36
+ - **AI agents:** the node can be used as a tool.
37
+
38
+ ## Obo Trigger
39
+
40
+ - **Events:**
41
+ - Message Received
42
+ - Message Sent (by Obo or the API)
43
+ - Message Sent From the Phone
44
+ - Poll Vote
45
+ - Call Updated
46
+ - Chat Tags Changed
47
+ - Number Connected / Disconnected / Failed / Needs QR Scan
48
+ - All Events, which also brings delivery and read ticks
49
+ - **Filters:** limit the trigger to some WhatsApp numbers, and to people only, groups only, or one group.
50
+ - **Turning it on and off:** when the workflow is turned on, the trigger subscribes itself in Obo (the subscription shows under Webhooks, named `n8n: <workflow name>`). When it is turned off, it unsubscribes.
51
+ - **Signatures:** every delivery is checked against the webhook's signing secret, and anything unsigned, wrongly signed or more than 10 minutes old is refused with 401.
52
+ - **Output** for message events: `event`, `whatsappNumber`, `messageId`, `phone` (who wrote, digits only), `text`, `isGroup` and `groupId`, plus the full `data` from Obo.
53
+ - **Media:** the base64 file of incoming media is left out unless **Include Media Data** is on.
54
+
55
+ ## Coming from 2Chat
56
+
57
+ | 2Chat node | Obo node |
58
+ |---|---|
59
+ | Message → Send Message (to number) | Message → Send, Send To: Person |
60
+ | Message → Send to Group | Message → Send, Send To: Group |
61
+ | Message → URL (media) | Message → Send, Message Type: Image / Video / Document… with File URL |
62
+ | Message → Pin Location | Message → Send, Message Type: Location |
63
+ | Phone Number → Check | Phone Number → Check |
64
+ | 2Chat Trigger: WhatsApp Message Received | Obo Trigger: Message Received |
65
+ | 2Chat Trigger: Group Message Received | Obo Trigger: Message Received, Chats: One Group |
66
+ | 2Chat Trigger: Message Sent | Obo Trigger: Message Sent / Message Sent From the Phone |
67
+ | WABA interactive (buttons, list) | Message → Send, Message Type: Buttons or List |
68
+
69
+ Not in this version: WABA template sends, and 2Chat's phone-call triggers for virtual numbers. WhatsApp calls on Obo come through **Call Updated**.
70
+
71
+ ## The API behind it
72
+
73
+ The node calls Obo's public API, `https://<obo>/api/v1/…`, with `Authorization: Bearer wsk_…`:
74
+
75
+ - `GET /api/v1/me` returns the key's workspace, number limit and scopes.
76
+ - `/api/v1/wa/<path>` reaches the WhatsApp engine (sessions, messages, groups, contacts).
77
+ - `/api/v1/webhooks` lists and manages webhooks.
78
+ - `GET /api/v1/media/<messageId>` downloads a message's file.
79
+ - The inbox operations use the existing `POST /api/mcp` tools.
80
+
81
+ Every call is checked against the key's scopes and number limit.
82
+
83
+ The engine allows 30 message calls a minute per number. Over that, Obo answers 429 with `Retry-After`, and n8n's **Retry On Fail** handles it.
84
+
85
+ ## Develop
86
+
87
+ ```sh
88
+ npm install --workspaces=false
89
+ npm test # builds, then runs test/nodes.test.cjs against a fake n8n context
90
+ npm pack # n8n-nodes-obo-<version>.tgz
91
+ ```
92
+
93
+ To install on a self-hosted n8n without npm, copy the tarball to the server and run `npm install /path/n8n-nodes-obo-<version>.tgz` inside `~/.n8n/nodes`, then restart n8n.
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OboApi = void 0;
4
+ class OboApi {
5
+ name = 'oboApi';
6
+ displayName = 'Obo API';
7
+ icon = 'file:obo.svg';
8
+ documentationUrl = 'https://github.com/DevRoboticGen/obo-whatsapp/tree/main/packages/n8n-nodes-obo';
9
+ properties = [
10
+ {
11
+ displayName: 'API Key',
12
+ name: 'apiKey',
13
+ type: 'string',
14
+ typeOptions: { password: true },
15
+ default: '',
16
+ placeholder: 'wsk_…',
17
+ description: 'A workspace API key from Obo → Developer. Give it the scopes the workflow needs (messages, sessions, webhooks).',
18
+ },
19
+ {
20
+ displayName: 'Obo URL',
21
+ name: 'baseUrl',
22
+ type: 'string',
23
+ default: 'https://obo-whatsapp.roboticgen.co',
24
+ description: 'The address of your Obo dashboard',
25
+ },
26
+ ];
27
+ authenticate = {
28
+ type: 'generic',
29
+ properties: {
30
+ headers: { Authorization: '=Bearer {{$credentials.apiKey}}' },
31
+ },
32
+ };
33
+ test = {
34
+ request: {
35
+ baseURL: '={{$credentials.baseUrl.replace(/\\/+$/, "")}}',
36
+ url: '/api/v1/me',
37
+ method: 'GET',
38
+ },
39
+ };
40
+ }
41
+ exports.OboApi = OboApi;
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect width="64" height="64" rx="14" fill="#25D366"/><path d="M32 13c-10.5 0-19 8-19 17.9 0 3.6 1.1 7 3.1 9.8L14 51l10.7-2.9c2.2 1 4.7 1.6 7.3 1.6 10.5 0 19-8 19-17.9S42.5 13 32 13z" fill="#fff"/><circle cx="32" cy="31" r="7.5" fill="none" stroke="#25D366" stroke-width="4.5"/></svg>