Skip to content

Feature: Add Twitch EventSub sources to automation flows #36

Description

@alsi-lawr

Summary

Expose supported Twitch EventSub notifications as typed automation event sources, with subscription lifecycle, scope readiness, host isolation and duplicate-delivery handling.

Split from

This ticket splits the EventSub-trigger capability out of the “Necessary parity features” section in #1.

User outcome

A channel can start automations from Twitch activity such as going live, raids, subscriptions, cheers, follows and Hype Trains without writing code.

Scope

  • Register typed flow sources for stream online/offline, follow, subscription, subscription gift, cheer, incoming raid, Hype Train begin/progress/end and supported chat notifications.
  • Add source-specific configuration such as minimum cheer amount or raid viewer count.
  • Map each EventSub payload to a bounded, documented automation context.
  • Create/remove required EventSub subscriptions as host connections and enabled flows change.
  • Show required OAuth scopes and current subscription readiness in the editor.
  • Deduplicate EventSub delivery using Twitch message ID and retain the deduplication record for a bounded period.
  • Handle subscription revocation and reconnect by disabling or warning affected flows rather than silently dropping events.
  • Allow source definitions to be added incrementally without changing persisted flow contracts.

Design and constraints

  • Twitch delivers EventSub notifications at least once; duplicate handling is mandatory.
  • Only include fields required for automation and never expose access tokens or raw HTTP headers.
  • Every subscription and event must resolve to exactly one BlokeBot host.
  • Missing scopes or ineligible channel state must be actionable in the dashboard.
  • The event receiver must acknowledge Twitch independently of downstream flow success.

Non-goals

  • Supporting every EventSub type in the first implementation.
  • Webhook transport if the existing runtime uses EventSub WebSocket.
  • Allowing events to target other hosts.

Acceptance criteria

  • The initial source set can be selected and configured in a flow.
  • Required EventSub subscriptions are established and recovered with the host runtime.
  • Duplicate Twitch message IDs do not start duplicate flow runs.
  • Missing scopes and revoked subscriptions surface actionable readiness state.
  • A failed flow does not prevent EventSub acknowledgement or other flows from running.
  • Payload mapping, deduplication, subscription recovery and host isolation have automated tests.

Dependencies

  • Define a typed automation event and action catalog
  • Execute automation flows with conditions, delays and failure handling

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions