DEV Community

Alex Spinov
Alex Spinov

Posted on

Inngest Has a Free API — Event-Driven Functions with Built-in Queuing and Orchestration

What if you could write complex workflows — with retries, delays, fan-out, and step functions — without managing queues or state machines?

Inngest is a workflow engine for TypeScript. You define steps, Inngest handles queuing, retries, and orchestration.

Why Inngest

  • Step functions — break work into reliable steps with automatic retries
  • Event-driven — trigger functions from events, webhooks, or cron
  • Built-in queuing — no RabbitMQ, SQS, or Bull to manage
  • Concurrency control — limit parallel executions per user/key
  • Sleep/delaystep.sleep("1 hour") — pause and resume reliably
  • Free tier — 5,000 function runs/month

Quick Start

npm install inngest
Enter fullscreen mode Exit fullscreen mode
import { Inngest } from "inngest";

const inngest = new Inngest({ id: "my-app" });

// Define a multi-step workflow
export const processOrder = inngest.createFunction(
  { id: "process-order", retries: 3 },
  { event: "order/placed" },
  async ({ event, step }) => {
    // Step 1: Charge payment
    const charge = await step.run("charge-payment", async () => {
      return stripe.charges.create({ amount: event.data.amount });
    });

    // Step 2: Wait 5 minutes (yes, really — the function pauses and resumes)
    await step.sleep("wait-for-confirmation", "5 minutes");

    // Step 3: Send confirmation email
    await step.run("send-email", async () => {
      return sendEmail(event.data.email, { orderId: charge.id });
    });

    // Step 4: Update inventory
    await step.run("update-inventory", async () => {
      return updateStock(event.data.items);
    });
  }
);
Enter fullscreen mode Exit fullscreen mode

Concurrency Control

export const sendNotification = inngest.createFunction(
  {
    id: "send-notification",
    concurrency: {
      limit: 1,
      key: "event.data.userId", // Only 1 notification per user at a time
    },
  },
  { event: "notification/send" },
  async ({ event, step }) => {
    // Guaranteed: only one notification processes per user
    await step.run("send", () => sendPush(event.data.userId, event.data.message));
  }
);
Enter fullscreen mode Exit fullscreen mode

Real Use Case

A SaaS had a complex onboarding flow: create account, provision resources, send welcome email, schedule check-in reminder. It was a fragile chain of setTimeout calls and database flags. After migrating to Inngest, each step was explicit, retried on failure, and the 3-day reminder "just worked" with step.sleep. Zero onboarding failures since.

When to Use Inngest

  • Multi-step workflows (onboarding, order processing)
  • Background jobs with complex orchestration
  • Scheduled tasks and recurring workflows
  • Any process needing reliable step execution

Get Started

Visit inngest.com — free tier, TypeScript-first, self-hostable.


Need custom data pipelines or scraping solutions? Check out my Apify actors or email me at spinov001@gmail.com for custom solutions.

Top comments (0)