Automations, Triggers & Desktop Companion
Connect Twitch, Kick, Ko-fi, Streamlabs, Fourthwall, Throne, and Pulsoid events to automated Twitch actions, Discord alerts, and local OBS / VTube Studio controls.
Step 1: Create a Cloud Automation Rule
- Go to Dashboard → Automations.
- Give your rule a clear name (e.g.,
Raid → Marker + Discord Alert). - Pick a Trigger (e.g.,
Twitch: Incoming Raid) and an Action (e.g.,Twitch: Create Stream Marker). - Enter the Action Value. You can use template variables:
{user},{amount},{message},{title},{game}. - Click Save Automation Rule, then click Test to verify it fires immediately.
Example: Trigger =
twitch_raid | Action = twitch_announcement | Value = Welcome {user} and their {amount} raiders! Check out !so {user}Step 2: Connect External Webhooks (Ko-fi, Streamlabs, Fourthwall, etc.)
- In Dashboard → Automations, select your platform from the Incoming Webhook URL dropdown.
- Click Copy URL. It includes your unique channel token automatically:
https://www.canna-friend.com/api/webhooks/automation/<your_channel>/<source>?token=<your_token> - Paste that URL into your provider's webhook settings (Ko-fi API/Webhooks, Fourthwall Webhooks, Streamlabs, etc.).
- Create an automation rule using the matching
webhook_*trigger (for example,webhook_kofi→twitch_announcement).
Step 3: Phase 2 Desktop Companion (OBS Studio & VTube Studio)
Because OBS Studio and VTube Studio run locally on your PC, CannaFriend uses a lightweight Desktop Companion script that connects securely over WebSocket (wss://www.canna-friend.com:5001) and executes local actions in real time.
- In Dashboard → Automations, click Download Windows App (.exe) to download
CannaFriend-Companion-Setup.exe(no Node.js required; Mac/Linux users can click Mac/Linux (.js)). - Double-click
CannaFriend-Companion-Setup.exe. It automatically opens a local setup wizard in your browser (http://127.0.0.1:44551) and auto-detects OBS Studio. - Review the transparent checkboxes (each explains what it does & why): enable OBS WebSocket (port
4455), restart OBS if running, optional VTube Studio bridge, and optional Windows Startup. - Enter your Twitch channel name and click Apply Selected & Connect (use Test OBS Connection to verify).
- Create a rule with Action = Companion WS: Trigger OBS / Local App, select OBS Studio → Switch Scene, and enter your exact OBS scene name (e.g.,
BRBorGameplay).
Supports OBS (
SwitchScene, SaveReplayBuffer, StartRecording, StopRecording), VTube Studio (ws://127.0.0.1:8001 hotkeys), and local HTTP forwarding (LOCAL_HTTP_URL=http://127.0.0.1:7474 for Streamer.bot / Mix It Up).Supported Triggers (15)
| Trigger ID | Platform | When It Fires |
|---|---|---|
twitch_follow | Twitch | Fires when someone follows your Twitch channel. |
twitch_sub | Twitch | Fires on new subscriptions or resubs. |
twitch_giftsub | Twitch | Fires when a viewer gifts subs. |
twitch_raid | Twitch | Fires on incoming Twitch raids ({user}, {amount} viewers). |
twitch_cheer | Twitch | Fires on Bits cheers ({user}, {amount} bits, {message}). |
twitch_redemption | Twitch | Fires on Channel Point redemptions ({user}, {title}). |
kick_follow | Kick | Fires when someone follows your Kick channel. |
kick_sub | Kick | Fires on Kick subscriptions. |
kick_kicks | Kick | Fires when someone sends Kicks. |
webhook_kofi | Webhook | Ko-fi donations, memberships, and shop orders. |
webhook_streamlabs | Webhook | Streamlabs tips and merch alerts. |
webhook_streamelements | Webhook | StreamElements tips. |
webhook_fourthwall | Webhook | Fourthwall orders, donations, and giveaways. |
webhook_throne | Webhook | Throne wishlist gifts. |
webhook_pulsoid | Webhook | Pulsoid / HypeRate heart-rate BPM events. |
Supported Actions (11)
| Action ID | What It Does |
|---|---|
twitch_announcement | Sends a colored Twitch chat announcement using Helix API. |
twitch_slow_mode | Turns on chat slow mode (configurable seconds). |
twitch_sub_mode | Toggles Subscriber-Only chat mode. |
twitch_emote_mode | Toggles Emote-Only chat mode. |
twitch_follower_mode | Toggles Follower-Only chat mode (configurable minutes). |
twitch_commercial | Runs an ad break (30s–180s). |
twitch_marker | Drops a Twitch VOD stream marker with custom label. |
twitch_shield_lock | Activates Twitch Shield Mode automatically. |
discord_webhook | Posts a formatted message to any Discord channel webhook. |
http_webhook | Sends a JSON POST payload to any external HTTP endpoint. |
ws_companion_action | Sends a real-time command to your PC via the Desktop Companion (OBS, VTube Studio, Streamer.bot). |
