n8n-nodes-bgos
v1.16.0
Published
n8n community nodes for BGOS (Brand Growth OS) - AI assistant chat platform
Downloads
1,061
Readme
n8n-nodes-bgos
Community nodes for n8n to integrate with the BGOS AI assistant chat platform.
Nodes
BGOS (Action Node)
Perform operations on the BGOS platform:
| Resource | Operations | |---|---| | Message | Send Message, Create, Bulk Create, Edit, Delete, Button Callback, Ask User Input | | Chat | Create, Get, Rename, Delete, Get Messages, Get Unread, Increment Unread, Mark as Read | | Assistant | Create, Get, Update, Delete, Reorder, Get With Chats | | User | Get or Create, Update | | Scheduled Task | Get, Get User Tasks, Delete |
Render Mode — Inline Buttons vs. Modal Pop-Under
Two ways the BGOS app renders buttons that come with a message:
| Mode | Looks Like | When It Makes Sense |
|---|---|---|
| Inline (default on sendMessage) | Telegram-style chips inside a warm off-white card below the message. Skip (top-left), "✍ Custom reply" footer link. Stays clickable forever — user can answer now, tomorrow, or never. | The message is not a direct reply to something the user just typed: cron, scheduler, external webhook, unprompted check-in. Single question, up to 6 labeled choices. |
| Modal (default on askUserInput) | Bottom sheet / pop-under that demands attention. Multi-question carousel, free-text fallback, skip-all. | Active back-and-forth conversation — user just sent a message and you need their answer to continue. Also use for multi-question flows. |
Default to inline unless you know the user is actively in the chat. Modals interrupt. Inline never does.
Decision tree for AI agents
Is this message triggered by a user message they sent in the last ~2 minutes?
├─ YES → modal OK (but inline also works)
└─ NO → inline. Always.
Do you need multi-question carousel, free-text, OR skip-all semantics?
├─ YES → must use modal (askUserInput op with askRenderMode=modal)
└─ NO → prefer inlineAgent-facing contract
- Inline chips ≤ 6 (backend rejects more). Labels ≤ 24 chars render cleanly; longer wraps.
- When the user clicks a chip, your
BGOS Triggerreceivesbutton_clickedwithcallback_data= the option'svalue. - When the user taps Skip,
button_clickedfires withcallback_data: "__skip__"andoption_id: null. - When the user taps Custom reply and submits free text, they get two events: a normal user
messageAND abutton_clickedwithcallback_data: "__custom__"+custom_text: <what they typed>. Correlate bymessage_id. - Respond to button clicks with the Answer a Callback operation so the chip animation completes.
Ask User Input
Pops the BGOS app's polished modal/sheet to ask the user 1–4 multiple-choice questions in a single carousel. Each question accepts: option list (label + value), optional free-text fallback, optional skip. The node POSTs each question to /api/v1/messages with messageType=ask_user_input, sharing one askId so they group into one carousel.
Two response modes:
- Wait for Answers (default): blocks until every question is answered (or the timeout expires) and returns
{ askId, answers: [{ messageId, askOrder, question, picked_option_value?, picked_option_label?, free_text?, skipped? }] }. Requires a User ID for the polling chat-history GET. - Fire and Forget: returns immediately with
{ askId, questionMessageIds }. Subscribe to theAsk Responseevent in a separateBGOS Triggerworkflow to receive each answer as it lands.
Event Messages
Mark a sent message as machine-delivered event traffic — dashboard dispatches, watcher pushes, sweep digests, voice-call transcripts, n8n notifications — and the BGOS app renders it as a quiet collapsed card (source eyebrow + title + one-line peek) instead of a chat bubble, expandable to the full markdown body plus an optional JSON drawer.
On Send a Message, set Message Type → Event and fill:
| Field | Required | Limit | Renders as |
|---|---|---|---|
| Event Title | yes | ≤300 chars | the collapsed card's headline |
| Event Source | no (default n8n) | — | eyebrow label + per-source accent color. Known: dashboard, voice-call, sweep, reply-watcher, n8n |
| Event Peek | no | ≤200 chars | one-line dim summary under the title |
| Event Payload (JSON) | no | — | collapsed PAYLOAD · JSON drawer (object, array, or quoted string) |
The Text field stays the canonical full body: the receiving agent gets it exactly as before, old clients render it as a normal message, and the card shows it as the expanded markdown body. Wire shape on POST /api/v1/send-message:
{ "messageType": "event", "eventMeta": { "source": "n8n", "title": "...", "peek": "...", "payload": { } } }Combine with Sender = User when the receiving agent should wake on the event — the usual case for machine-delivered traffic.
BGOS Trigger (Webhook Node)
Starts workflows when BGOS events occur. Supports 17 event types:
message,edited_message,voice_message,reply_messagenew_chat,chat_renamed,chat_deletednew_assistant,assistant_updated,assistant_deletedvoice_started,voice_endedmessage_deleted,button_clickeduser_created,user_updatedask_response(one event per answered/skipped ask_user_input question)
Credentials
Configure with your BGOS backend URL and optional API key:
- Base URL: Your BGOS backend URL (default:
https://api.brandgrowthos.ai) - API Key: Optional, for future authentication support
Setup
In BGOS Backend
Set the FORWARDER_WEBHOOK_URL environment variable to your n8n webhook URL:
FORWARDER_WEBHOOK_URL=https://your-n8n-instance.com/webhook/bgos-webhookIn n8n
- Install the package:
pnpm install n8n-nodes-bgos(or add it in Settings → Community nodes). - Finding the trigger: Click + (Add node), search for "BGOS Trigger" and pick the one with the cube icon (community node). You can use it as the workflow trigger or add it from the canvas.
- Configure BGOS API credentials (from the node’s credential dropdown) with your backend Base URL.
- Use the BGOS Trigger node to receive events and the BGOS node to perform actions.
Development
pnpm install
pnpm build