# Cloudflare Stream Integrations

Import, encode and manage videos in Cloudflare Stream. Start workflows when videos are ready, encoding fails or an encoder changes state.

## Setup notes

- **Connect your Stream account** Enter your Cloudflare account ID and a Stream Read or Stream Write API token. Check storage usage before uploading. Analytics actions require the corresponding analytics permissions.
- **Receive video events** Deploy the account webhook relay, set its FastHook callback and shared secret, and register its /video URL with Stream. Store the signing secret returned by Stream in the relay. Check for an existing account webhook before changing it.
- **Receive encoder events** Configure a Stream Live notification in Cloudflare Notifications. Use the relay’s /live destination and a separate secret. Select the live inputs you want to monitor.

## Workflow templates

- [Find matching Stream demos for new Shopify products](https://www.fasthook.io/templates/shopify-new-products-to-stream-video-search.md): Search the connected Stream video library for the name of each new Shopify product, including drafts.
- [Find Stream videos when a Webflow CMS item is created](https://www.fasthook.io/templates/webflow-cms-items-to-stream-video-inventory.md): Search the connected Stream video library for the name of each new Webflow CMS item, including drafts.
- [Check Stream storage capacity for new Jira incidents](https://www.fasthook.io/templates/jira-new-issues-to-stream-storage.md): Watch a Jira project for video operations incidents.
- [Send ready Stream videos to Slack](https://www.fasthook.io/templates/cloudflare-stream-ready-to-slack.md): Send a review link to the selected Slack channel when Stream confirms the video is ready.
- [Notify Discord when a Stream live input disconnects](https://www.fasthook.io/templates/cloudflare-stream-live-to-discord.md): Notify the selected Discord channel when the encoder disconnects from a Cloudflare Stream live input.
- [Track Stream encoding failures in Trello](https://www.fasthook.io/templates/cloudflare-stream-errors-to-trello.md): Create a card in the selected list with the video ID and processing error reported by Stream.
- [Import R2 videos into Cloudflare Stream](https://www.fasthook.io/templates/cloudflare-r2-videos-to-stream.md): When a video arrives in a selected R2 bucket, create a temporary download URL and submit it to Stream for encoding.

## Triggers

5 Instant

- **Encoder connected to a live input** (Instant) — Start a workflow when an encoder connects to Cloudflare Stream and begins sending a live broadcast.
- **Encoder disconnected from a live input** (Instant) — Start a workflow when Stream loses the encoder connection. Use the input ID and event time to notify the broadcast team.
- **Live input encountered an error** (Instant) — Start a workflow when Stream detects a problem with an incoming broadcast. Use the reported error code to investigate the affected input.
- **Video could not be processed** (Instant) — Start a workflow when Stream cannot finish processing a video. Send the video ID and the reported reason to the person handling the upload.
- **Video is ready to watch** (Instant) — Start a workflow when Stream finishes processing an upload and makes it available for playback. Share the preview link or update the video’s status in another app.

## Actions

- **Add a restreaming destination** — Forward a live broadcast to another RTMP or SRT destination from the same Stream input.
- **Add an audio track from a URL** — Attach a separate audio file to a video so viewers can choose another language or commentary track.
- **Allow broadcasts on a live input** — Reopen a disabled input so an encoder can connect and send live video again.
- **Analyze low-latency playback** — Group WebRTC playback measurements to investigate how viewers receive low-latency streams over WHEP.
- **Browse the video library** — Find videos in your account and use the results to select titles for later workflow steps.
- **Change a restreaming destination’s status** — Turn forwarding on or off for one destination attached to a live input.
- **Check a caption track for one language** — Look up the selected language’s caption track, including its processing status.
- **Check a video’s processing and playback details** — Look up a video by its ID to check its status, metadata and playback information.
- **Check available video storage** — Read the account’s storage allowance, minutes used and video count before importing another video.
- **Check the current live audience** — Get an estimate of how many people are watching a live input right now.
- **Check the video processing webhook** — Look up the account’s current notification destination for on-demand videos.
- **Check video download availability** — See which downloadable versions of a video exist and whether they are ready to retrieve.
- **Create a clip from a video** — Choose start and end times in seconds to turn part of a longer video into a separate clip.
- **Create a live input for an encoder** — Set up a place to send a live broadcast and receive the credentials your encoder needs to connect.
- **Create a signed playback token** — Grant access to a protected video with a token that carries the playback restrictions you select.
- **Create a video signing key** — Generate a private key to sign playback tokens for protected videos. Save the key when Stream returns it.
- **Create a video upload link** — Give a contributor a one-time link to upload a video directly to your Stream account.
- **Create a watermark from an image file** — Upload an image and save it as a reusable watermark profile for videos.
- **Create a watermark from an image URL** — Supply the image URL in a JSON request to create a reusable video watermark profile.
- **Delete a live input** — Permanently remove the input and prevent encoders from starting another broadcast on it.
- **Delete a video from Stream** — Permanently remove the selected video and its copies from the Stream library.
- **Delete a watermark profile** — Remove a saved watermark profile from the account’s selection for future videos.
- **Download captions as WebVTT** — Retrieve the timed caption text for one language so you can reuse or review it.
- **Edit live input settings** — Change settings such as the input name or how Stream records broadcasts.
- **Explore player-reported playback metrics** — Group measurements that video players send through Common Media Client Data to investigate playback quality.
- **Explore Stream analytics columns** — See which fields and data types are available before writing a SQL query about video delivery.
- **Find recordings from a live input** — List the videos associated with a live input so you can locate past broadcasts.
- **Find where a video upload stopped** — Read how many bytes Stream has accepted so you can resume at the correct position.
- **Generate captions for a video** — Ask Stream to generate a caption track for the language you select.
- **Get live input details** — Look up an input’s encoder connection details, recording settings and current connection status.
- **Get the legacy video embed code** — Retrieve an HTML snippet for embedding a Stream player on a page that uses the legacy embed method.
- **Import a video from a URL** — Give Stream a download link, including a signed R2 link, to fetch the source video and prepare it for playback.
- **Inspect a video watermark** — Read the settings of one saved watermark profile before using it on a video.
- **Inspect low-latency broadcast measurements** — Examine sampled measurements from encoders sending WebRTC broadcasts over WHIP.
- **List a video’s caption languages** — See which caption or subtitle tracks are available for a selected video.
- **List additional audio tracks** — Find the language and commentary tracks added separately to a video.
- **List available video watermarks** — Find saved watermark profiles and choose one to apply to a video.
- **List destinations for a live broadcast** — See where a selected live input is configured to forward its stream.
- **List live inputs in the account** — Find existing broadcast inputs and choose one for a recording or restreaming workflow.
- **List video signing keys** — Look up the signing keys in your account by their identifiers and creation dates.
- **Prepare a download in a selected format** — Choose a download type and ask Stream to prepare that version of a video.
- **Prepare the default video download** — Ask Stream to create the default downloadable file for a video that is ready to watch.
- **Query video requests by owner and video** — Use SQL to compare request activity across video owners and individual videos.
- **Query video requests with SQL** — Filter and group Stream request records with SQL to investigate video delivery.
- **Remove a restreaming destination** — Detach one destination from a live input to stop forwarding broadcasts there.
- **Remove a selected download format** — Remove one downloadable version of a video while keeping the video available for streaming.
- **Remove an additional audio track** — Remove a language or commentary track from a video. If it is the default track, select a different default first.
- **Remove captions for one language** — Delete the selected language’s caption track from a video.
- **Remove the default video download** — Remove the default downloadable file while keeping the video in your Stream library.
- **Remove the video processing webhook** — Stop Stream from sending on-demand video processing notifications to the configured destination.
- **Replace encoder credentials** — Issue new credentials for the same live input and revoke the old ones. Update your encoder before broadcasting again.
- **Report billable viewing minutes** — Get a time series of billable minutes watched across the account’s zones.
- **Revoke a video signing key** — Delete a key to invalidate the signed playback links created with it.
- **Send the next part of a video** — Append a file chunk at the expected byte offset in an existing resumable upload.
- **Set the video processing webhook** — Choose where Stream sends notifications when uploaded videos finish processing or encounter an error.
- **Start a resumable video upload** — Open a tus upload session and get the URL to use when sending the video in parts.
- **Stop broadcasts on a live input** — Disconnect the current broadcast and block new ones until you enable the input again.
- **Summarize low-latency broadcast quality** — Group WHIP broadcast measurements to compare encoder performance across the dimensions you select.
- **Summarize minutes watched** — Compare viewing time across the dates and dimensions you select.
- **Update a video’s details** — Change metadata or playback settings for an existing video.
- **Update an additional audio track** — Change an audio track’s label or make it the default choice for viewers.
- **Upload a caption file** — Attach your own timed subtitles to a video for a selected language.
- **Upload a video file to Stream** — Send a file from FastHook directly to Stream for processing and playback.
