TypeScript SDK v4 is now available! See what's new

Inngest Functions

Inngest functions enable developers to run reliable background logic, from background jobs to complex workflows. An Inngest Function is composed of 3 main parts that provide robust tools for retrying, scheduling, and coordinating complex sequences of operations:

inngest.createFunction({
    id: "sync-systems",
    // A Function is triggered by events
    triggers: { event: "auto/sync.request" },
    // Easily add Throttling with Flow Control
    throttle: { limit: 3, period: "1min"},
  },
  async ({ step }) => {
    // step is retried if it throws an error
    const data = await step.run("get-data", async () => {
      return getDataFromExternalSource();
    });

    // Steps can reuse data from previous ones
    await step.run("save-data", async () => {
      return db.syncs.insertOne(data);
    });
  }
);

Using Inngest Functions

Start using Inngest Functions by using the pattern that fits your use case:

Learn more about Functions and Steps

Functions and Steps are powered by Inngest's Durable Execution Engine. Learn about its inner working by reading the following guides:

SDK References