# Import R2 videos into Cloudflare Stream

Send newly uploaded videos from a private R2 bucket to Stream for encoding using a temporary download URL.

[Use template](https://dashboard.fasthook.io/workflow/new?templateKey=cloudflare-r2-videos-to-stream&templateName=Import+R2+videos+into+Cloudflare+Stream)

**Required accounts**

- Cloudflare R2
- Cloudflare Stream

## Import R2 videos into Cloudflare Stream

### 1. Trigger · PutObject

**Cloudflare R2**. R2 reports PutObject on the selected bucket.

### 2. Action · Sign the source video URL

**Cloudflare R2**. Create an expiring URL for one object.

### 3. Action · Import the video

**Cloudflare Stream**. Uploads a video to Stream from a provided URL.

## Set up your workflow

1. **Monitor the video upload bucket** Forward R2 upload notifications to FastHook and select the bucket that holds the source videos. Choose R2 credentials that can sign a temporary download for the object.
2. **Connect the Stream destination** In the import action, select a Stream account with write access and available storage minutes. Keep the signed URL mapped to the video source and the R2 key mapped to the video name.
3. **Follow one video through encoding** Upload a small supported video. Check that the import returns a Stream video ID, then find it in Stream and wait until playback is ready. The separate ready-video Slack template can notify your team.

## Related integrations

- [Cloudflare R2 integrations](https://www.fasthook.io/apps/cloudflare-r2/integrations)
- [Cloudflare Stream integrations](https://www.fasthook.io/apps/cloudflare-stream/integrations)
