<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/user-defined-workflows-in-next-js-with-sanity-and-inngest-z1xkso4fl" -->

---
title: User-Defined Workflows in Next.js with Sanity and Inngest
description: A tutorial demonstrates building a no-code, user-defined workflow system by combining Sanity as the schema-driven data store and stakeholder-facing UI with...
canonical: https://daily.dev/posts/user-defined-workflows-in-next-js-with-sanity-and-inngest-z1xkso4fl
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: User-Defined Workflows in Next.js with Sanity and Inngest | daily.dev
og:description: A tutorial demonstrates building a no-code, user-defined workflow system by combining Sanity as the schema-driven data store and stakeholder-facing UI with...
og:url: https://daily.dev/posts/user-defined-workflows-in-next-js-with-sanity-and-inngest-z1xkso4fl
og:image: https://api.daily.dev/og/posts/Z1xksO4FL.png
og:image:alt: User-Defined Workflows in Next.js with Sanity 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.

# User-Defined Workflows in Next.js with Sanity and Inngest

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

## Summary

A tutorial demonstrates building a no-code, user-defined workflow system by combining Sanity as the schema-driven data store and stakeholder-facing UI with Inngest as the durable execution engine, all deployed through Next.js serverless functions. It walks through a simplified workflow/action data model, the Sanity schema definitions, and an Inngest function that loads a workflow from Sanity and steps through actions like delay, sendEmail, filter, and slack via a switch statement, with retries and durability handled automatically. A later addendum notes that the Inngest dev server added MCP (Model Context Protocol) support, letting AI assistants like Claude Code and Cursor connect directly to local Inngest functions to send test events, debug failed runs with trace access, and test workflows end-to-end.

## Full article

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

## Questions this post answers

### How can I let non-developer stakeholders create and edit workflows without writing code in a Next.js app?

Use Sanity as the schema-driven database and editing UI for workflow definitions, then execute those workflows with Inngest inside Next.js serverless functions. Sanity stores a workflow document with a title, trigger, account ID, and an array of typed actions (delay, filter, sendEmail, slack); an Inngest function loads that workflow and steps through the actions array with a switch statement, using step.sleep and step.run for durability and retries.

_daily.dev surfaces practical patterns like this for teams weighing no-code workflow options against building in-house._

### Can AI coding assistants like Claude Code or Cursor connect to a local Inngest dev server for debugging workflows?

Yes, the Inngest dev server added MCP (Model Context Protocol) support that lets AI assistants connect directly to local Inngest functions. Through this connection, assistants can send test events, monitor executions, debug failed runs with full trace access, test entire workflows end-to-end, and search Inngest documentation offline, all without leaving the editor.

_Developers wiring AI assistants into local dev workflows track updates like Inngest's MCP support on daily.dev._

## 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: [#inngest](https://daily.dev/tags/inngest), [#nextjs](https://daily.dev/tags/nextjs), [#serverless](https://daily.dev/tags/serverless), [#workflow-orchestration](https://daily.dev/tags/workflow-orchestration)

[View this post on daily.dev](https://daily.dev/posts/user-defined-workflows-in-next-js-with-sanity-and-inngest-z1xkso4fl)

```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":"User-Defined Workflows in Next.js with Sanity and Inngest","url":"https://daily.dev/posts/user-defined-workflows-in-next-js-with-sanity-and-inngest-z1xkso4fl","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/user-defined-workflows-in-next-js-with-sanity-and-inngest-z1xkso4fl"},"datePublished":"2026-09-13T19:57:18.458Z","dateModified":"2026-10-15T02:22:43.614Z","description":"A tutorial demonstrates building a no-code, user-defined workflow system by combining Sanity as the schema-driven data store and stakeholder-facing UI with...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/2639ae1d3a5b7ab91977ac41a32e8bf1?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/2639ae1d3a5b7ab91977ac41a32e8bf1?_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/user-defined-workflows-in-next-js-with-sanity-and-inngest-z1xkso4fl","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"inngest,nextjs,serverless,workflow-orchestration","timeRequired":"PT9M"}
{"@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":"User-Defined Workflows in Next.js with Sanity and Inngest"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/user-defined-workflows-in-next-js-with-sanity-and-inngest-z1xkso4fl#faq","mainEntity":[{"@type":"Question","name":"How can I let non-developer stakeholders create and edit workflows without writing code in a Next.js app?","acceptedAnswer":{"@type":"Answer","text":"Use Sanity as the schema-driven database and editing UI for workflow definitions, then execute those workflows with Inngest inside Next.js serverless functions. Sanity stores a workflow document with a title, trigger, account ID, and an array of typed actions (delay, filter, sendEmail, slack); an Inngest function loads that workflow and steps through the actions array with a switch statement, using step.sleep and step.run for durability and retries. daily.dev surfaces practical patterns like this for teams weighing no-code workflow options against building in-house."}},{"@type":"Question","name":"Can AI coding assistants like Claude Code or Cursor connect to a local Inngest dev server for debugging workflows?","acceptedAnswer":{"@type":"Answer","text":"Yes, the Inngest dev server added MCP (Model Context Protocol) support that lets AI assistants connect directly to local Inngest functions. Through this connection, assistants can send test events, monitor executions, debug failed runs with full trace access, test entire workflows end-to-end, and search Inngest documentation offline, all without leaving the editor. Developers wiring AI assistants into local dev workflows track updates like Inngest's MCP support on daily.dev."}}]}
```

