Skip to content

Event Sinks

Event sinks are the entry points that trigger flow executions. They define how external events (HTTP requests, scheduled tasks, bot messages) invoke your workflows.

Flow-Like supports multiple sink types, each with different characteristics:

Sink TypeTrigger MechanismLocal SupportRemote Support
HTTPREST API calls✅ Polling✅ Webhook
TelegramBot messages✅ Long Polling✅ Webhook
DiscordBot interactions✅ Gateway✅ Interactions Webhook
CronScheduled time✅ Local scheduler✅ Server scheduler
WebhookGeneric webhooks✅ Webhook

Flow-Like can run workflows in two modes:

When running the desktop application:

  • HTTP: The app exposes a local server (default port 9657) that accepts requests
  • Telegram: Uses long polling to fetch messages from Telegram’s API
  • Discord: Connects via Discord Gateway (WebSocket) to receive events
  • Cron: Uses local system scheduler to trigger at specified times

Advantages:

  • No server infrastructure needed
  • Direct access to local resources (files, applications)
  • Lower latency for local operations
  • Privacy - data stays on your machine

Limitations:

  • Computer must be running
  • Not accessible from the internet (without tunneling)
  • Limited scalability

When deployed to a backend server:

  • HTTP: Server exposes public endpoints that accept webhooks
  • Telegram: Telegram sends webhooks directly to your server
  • Discord: Discord sends interaction webhooks to your server
  • Cron: Server-side scheduler triggers executions

Advantages:

  • Always available (24/7)
  • Publicly accessible
  • Scalable infrastructure
  • Handles high volume

Limitations:

  • Requires server infrastructure
  • Additional hosting costs
  • Network latency for operations

The hub’s supported_sinks configuration determines which sinks are available:

{
"supported_sinks": {
"http": true,
"telegram": true,
"discord": true,
"cron": true,
"webhook": true
}
}

When a sink type is disabled in the hub configuration, the corresponding event types will only be available for local execution.

┌─────────────────────────────────────────────────────────────────┐
│ External Trigger │
│ (HTTP Request / Telegram Message / Discord Interaction / Cron) │
└────────────────────────────────┬────────────────────────────────┘
┌────────────▼────────────┐
│ Sink Endpoint │
│ /sink/trigger/{type}/ │
└────────────┬────────────┘
┌────────────▼────────────┐
│ Authentication & │
│ Verification │
│ (Tokens, Signatures) │
└────────────┬────────────┘
┌────────────▼────────────┐
│ Event Lookup & │
│ Sink Resolution │
└────────────┬────────────┘
┌────────────▼────────────┐
│ Dispatcher │
│ (async/streaming) │
└────────────┬────────────┘
┌────────────▼────────────┐
│ Flow Execution │
└─────────────────────────┘

Each sink type has its own security mechanisms:

  • HTTP: Optional Bearer token authentication
  • Telegram: Secret token header verification + IP allowlist
  • Discord: Ed25519 signature verification
  • Cron: Internal scheduling (no external access)
  • Webhook: Configurable authentication

See the individual sink documentation for detailed security configuration.