<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/building-an-event-driven-video-processing-workflow-with-next-js-trpc-and-inngest-ls8w4ryjt" -->

---
title: Building an Event Driven Video Processing Workflow with...
description: A real-world case study describes building a self-service video publishing workflow for Kent C. Dodds's EpicWeb.dev site, combining Next.js, tRPC, and Inngest...
canonical: https://daily.dev/posts/building-an-event-driven-video-processing-workflow-with-next-js-trpc-and-inngest-ls8w4ryjt
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Building an Event Driven Video Processing Workflow with Next.js, tRPC, and Inngest | daily.dev
og:description: A real-world case study describes building a self-service video publishing workflow for Kent C. Dodds's EpicWeb.dev site, combining Next.js, tRPC, and Inngest...
og:url: https://daily.dev/posts/building-an-event-driven-video-processing-workflow-with-next-js-trpc-and-inngest-ls8w4ryjt
og:image: https://api.daily.dev/og/posts/lS8w4rYJt.png
og:image:alt: Building an Event Driven Video Processing Workflow with Next.js, tRPC, and Inngest
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Building an Event Driven Video Processing Workflow with Next.js, tRPC, and Inngest

**[Inngest Blog](https://daily.dev/sources/inngest)** · 15 min read · 0 upvotes · 0 comments

## Summary

A real-world case study describes building a self-service video publishing workflow for Kent C. Dodds's EpicWeb.dev site, combining Next.js, tRPC, and Inngest to orchestrate a complex asynchronous pipeline. The stack includes Cloudinary for original media upload, Sanity as headless CMS, Mux for video transcoding and delivery, Deepgram (Whisper) for transcription, and OpenAI's gpt-3.5-turbo-16k/gpt-4 for generating metadata suggestions like titles and descriptions. Inngest coordinates durable, resumable steps, waits for external events (like transcript completion from a Cloudflare Worker), and runs sub-workflows to handle timing issues, such as attaching subtitles to a Mux asset only once processing is ready. Each step updates status in Sanity so the creator sees real-time progress, and the whole system emphasizes debuggability, single-responsibility steps, and resilience over ad-hoc manual processing.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.inngest.com/blog/nextjs-trpc-inngest>

## Questions this post answers

### How can I build a durable workflow that waits for an external transcription service before continuing, using Inngest?

Use step.waitForEvent with a match key and timeout, such as waiting on data.videoResourceId with a 1-hour timeout for a tip/video.transcript.created event. A separate Cloudflare Worker calling Deepgram sends that event back to Inngest once transcription finishes, letting the main workflow resume without blocking or polling.

_daily.dev surfaces practical patterns like this for developers wiring async transcription pipelines._

### How do you handle a race condition where a video transcript finishes processing before the video transcoding is done in Mux?

Kick off a separate resilient sub-workflow triggered by a tip/video.srt.ready event that checks the Mux asset status; if it isn't ready yet, the workflow sleeps for 60 seconds and re-sends the same event to retry, repeating until the asset status is ready before attaching subtitles.

_developers debugging timing issues between services can find similar orchestration patterns on daily.dev._

### What LLM setup was used to generate video metadata suggestions like titles and descriptions from a transcript?

Langchain was used to craft a prompt for OpenAI's gpt-3.5-turbo-16k model, requesting output as JSON in a specific format covering body text, short descriptions, alternative titles, tweets, emails, and keywords. A fallback to gpt-4 was added to reparse and heal the response whenever the JSON failed to parse correctly.

_daily.dev helps developers evaluating LLM prompt fallback strategies compare real implementation choices._

## Similar posts on daily.dev

- [Automating Complex Workflow in Your Next.js App with Inngest](https://daily.dev/posts/automating-complex-workflow-in-your-next-js-app-with-inngest-z21aksfdw) · Telerik · 2 upvotes · 0 comments
- [Durable AI Workflows 2026: Inngest, Trigger.dev, Vercel Workflow](https://daily.dev/posts/durable-ai-workflows-2026-inngest-trigger-dev-vercel-workflow-un2tgyyqs) · Alex CloudStar · 0 upvotes · 0 comments

---

Tags: [#architecture](https://daily.dev/tags/architecture), [#inngest](https://daily.dev/tags/inngest), [#nextjs](https://daily.dev/tags/nextjs), [#trpc](https://daily.dev/tags/trpc)

[View this post on daily.dev](https://daily.dev/posts/building-an-event-driven-video-processing-workflow-with-next-js-trpc-and-inngest-ls8w4ryjt)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Building an Event Driven Video Processing Workflow with Next.js, tRPC, and Inngest","url":"https://daily.dev/posts/building-an-event-driven-video-processing-workflow-with-next-js-trpc-and-inngest-ls8w4ryjt","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/building-an-event-driven-video-processing-workflow-with-next-js-trpc-and-inngest-ls8w4ryjt"},"datePublished":"2026-09-13T19:57:49.075Z","dateModified":"2026-10-15T02:22:31.112Z","description":"A real-world case study describes building a self-service video publishing workflow for Kent C. Dodds's EpicWeb.dev site, combining Next.js, tRPC, and Inngest...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/fda2dbf298e26dc070b3bce4488dffca?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/fda2dbf298e26dc070b3bce4488dffca?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Inngest Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Inngest Blog","logo":"https://media.daily.dev/image/upload/s--ieZKUa5y--/c_limit,w_256/f_auto,q_auto/v1789329423/logos/inngest?_a=BAMAMicg0","url":"https://daily.dev/sources/inngest"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/building-an-event-driven-video-processing-workflow-with-next-js-trpc-and-inngest-ls8w4ryjt","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"architecture,inngest,nextjs,trpc","timeRequired":"PT15M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Inngest Blog","item":"https://daily.dev/sources/inngest"},{"@type":"ListItem","position":3,"name":"Building an Event Driven Video Processing Workflow with Next.js, tRPC, and Inngest"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/building-an-event-driven-video-processing-workflow-with-next-js-trpc-and-inngest-ls8w4ryjt#faq","mainEntity":[{"@type":"Question","name":"How can I build a durable workflow that waits for an external transcription service before continuing, using Inngest?","acceptedAnswer":{"@type":"Answer","text":"Use step.waitForEvent with a match key and timeout, such as waiting on data.videoResourceId with a 1-hour timeout for a tip/video.transcript.created event. A separate Cloudflare Worker calling Deepgram sends that event back to Inngest once transcription finishes, letting the main workflow resume without blocking or polling. daily.dev surfaces practical patterns like this for developers wiring async transcription pipelines."}},{"@type":"Question","name":"How do you handle a race condition where a video transcript finishes processing before the video transcoding is done in Mux?","acceptedAnswer":{"@type":"Answer","text":"Kick off a separate resilient sub-workflow triggered by a tip/video.srt.ready event that checks the Mux asset status; if it isn't ready yet, the workflow sleeps for 60 seconds and re-sends the same event to retry, repeating until the asset status is ready before attaching subtitles. developers debugging timing issues between services can find similar orchestration patterns on daily.dev."}},{"@type":"Question","name":"What LLM setup was used to generate video metadata suggestions like titles and descriptions from a transcript?","acceptedAnswer":{"@type":"Answer","text":"Langchain was used to craft a prompt for OpenAI's gpt-3.5-turbo-16k model, requesting output as JSON in a specific format covering body text, short descriptions, alternative titles, tweets, emails, and keywords. A fallback to gpt-4 was added to reparse and heal the response whenever the JSON failed to parse correctly. daily.dev helps developers evaluating LLM prompt fallback strategies compare real implementation choices."}}]}
```

