Table of Contents
Introduction
Modern web applications need background jobs to maintain smooth user experiences—sending welcome emails, running reports, processing files, and triggering alerts. Traditionally, this required setting up job queues and worker servers, adding infrastructure complexity and monitoring overhead.
Inngest eliminates this complexity by allowing you to define background functions as event-driven jobs. Your app emits an event (like user/created), and Inngest automatically invokes the right function reliably at scale without requiring you to manage servers or queues.
an app platform provides streamlined deployment from GitHub repositories with automatic building, deploying, and scaling. Using App Platform's SaaS Add-Ons feature, you can integrate Inngest with your application in just a few clicks.
This tutorial will guide you through deploying your app on App Platform, adding Inngest as a SaaS Add-On, configuring environment variables, syncing your app with Inngest, and testing the integration. By the end, your application will handle background jobs without additional infrastructure management.
Key Takeaways
- Inngest eliminates infrastructure complexity by handling background job processing without requiring you to manage servers, queues, or worker processes
- an app platform's SaaS Add-Ons make it simple to integrate Inngest with your existing applications in just a few clicks
- Event-driven architecture allows your app to emit events (like
user/created) and Inngest automatically invokes the appropriate functions - Zero-infrastructure scaling means Inngest handles reliability, retries, and scaling automatically as your application grows
- Secure integration uses environment variables and signing keys to ensure safe communication between your app and Inngest
What is Inngest and how does it work with an app platform?
Inngest is an event-driven, durable workflow engine that lets you run reliable background jobs and orchestrate workflows on any platform—including serverless environments. Instead of maintaining servers, job queues, or worker processes, you simply define functions in your application that respond to specific events.
When your application emits an event (for example, user/created), Inngest detects it and invokes the corresponding function automatically and reliably, handling scaling, retries, and failure recovery for you. This event-driven approach is ideal for building resilient, maintainable systems where background jobs and workflows are essential.
Real-life Examples & Use Cases:
- Sending User Welcome Emails: When a new user registers (
user/created), automatically trigger an email welcome sequence. - Image or Video Processing: When a user uploads media (
media/uploaded), kick off background processing without blocking the main app. - Order Processing in E-commerce: Respond to events like
order/placedorpayment/receivedto manage inventory, notify fulfillment providers, or send receipts. - Scheduled Reports or Notifications: Use time-based events to periodically generate and email reports or reminders.
an app platform streamlines deployment by allowing you to launch applications directly from GitHub repositories. It automatically handles build, deploy, and scaling steps. By integrating Inngest using App Platform's SaaS Add-Ons feature, you can connect your background job workflows to your application with just a few clicks—unlocking powerful event-driven capabilities with minimal setup.
Prerequisites
Before starting, make sure you have:
- A cloud account.
- A GitHub repository containing your application. This could be a Node.js, Next.js, or any supported framework
- A an app platform app (we'll cover setup in the next section)
- Access to SaaS Add-Ons and Environment Variables in your App Platform project
How to deploy your application to an app platform?
If your app is not yet on App Platform, you'll need to deploy it. an app platform makes deployment straightforward by automatically detecting your framework and handling the build process. For more detailed deployment guidance, see our App Platform deployment guide.
- Log in to the the cloud provider Control Panel.
- From the left-hand menu, go to Apps.
- Click Create App.
- Select GitHub as the source and connect your account if you haven’t already.
- Choose the repository and branch (usually main or master).
- App Platform will auto-detect your framework (for example, Node.js or Next.js) and pre-fill build and run commands.
- Select the deployment region (closest to your primary users).
- Click Next, review your configuration, and then click Create App.
the cloud provider will deploy your app and give you a live URL, such as:
https://www.progressiverobot.com/
This URL is what users will interact with and what Inngest will connect to later.
How to add Inngest as a SaaS Add-On to your App Platform project?
Now that your app is running, the next step is to purchase the License through the inngest marketplace and integrate Inngest as a SaaS Add-On. This process automatically generates the necessary credentials for secure communication between your app and Inngest.
- Open your application from the Apps section.
- Go to SaaS Add-Ons.
- Click Add SaaS Add-On → Inngest.
- Select the region closest to your app’s deployment.
- Click Create Resource.
the cloud provider will now:
- Attach Inngest as an add-on to your project.
- Automatically generate secure credentials (
INNGEST_EVENT_KEYandINNGEST_SIGNING_KEY):
- Make these keys available for you to configure in the next step.
How to configure environment variables for Inngest integration?
Your app needs the keys generated in the previous step to securely communicate with Inngest. These environment variables enable authentication and ensure that only your application can trigger Inngest functions.
- Go to your app's Components → Web Service section.
- Scroll down to Environment Variables and click Edit.
- Add the following:
INNGEST_EVENT_KEY→ copy from the Inngest SaaS Add-On.INNGEST_SIGNING_KEY→ copy from the Inngest SaaS Add-On.- Save your changes.
- Redeploy your app so the new environment variables are available.
How to sync your app with Inngest?
Your repository should contain the logic to integrate with Inngest. This involves creating an API endpoint that Inngest can communicate with and defining functions that respond to specific events. The two major components that handle this integration are:
The API Route
Located at app/api/inngest/route.js:
import { serve } from "inngest/next";
import { inngest } from "../../../src/inngest/client";
import * as fns from "../../../src/inngest/functions";
export const { GET, POST, PUT } = serve({
client: inngest,
functions: Object.values(fns),
});
This route:
- Registers all your functions with Inngest when the app boots
- Listens for signed requests from Inngest
- Verifies authenticity using the Signing Key
For more information about managing environment variables in App Platform, see our documentation.
The Functions
Functions live in src/inngest/functions/.
Example: userCreated.js:
import { inngest } from "../client";
export const userCreated = inngest.createFunction(
{ id: "user-created" },
{ event: "user/created" },
async ({ event }) => {
console.log("User created event:", event);
return { name: event.data.name };
}
);
Example: welcomeEmail.js:
import { inngest } from "../client";
export const welcomeEmail = inngest.createFunction(
{ id: "welcome-email" },
{ event: "user/created" },
async ({ event }) => {
console.log("Sending welcome email to", event.data.email);
return { email: event.data.email };
}
);
How to trigger an event to test your Inngest integration?
Now, let's confirm the setup works by triggering a test event. This will verify that your application can successfully communicate with Inngest and that your functions are executing properly.
- Open your deployed app’s public URL.
- Perform an action that triggers a user/created event (e.g., submit a signup form).
- Go to the Inngest dashboard:
- Navigate to your app.
- Open Events and confirm user/created appears.
- Check Functions and verify welcomeEmail was executed.
If both the event and the function run successfully, the integration is complete.
How to troubleshoot common Inngest integration issues?
When setting up Inngest with an app platform, you may encounter several common issues. Here's how to resolve them:
Functions not showing in the dashboard?
- Verify environment variables are set correctly
- Ensure
/api/inngestis deployed and accessible - Check that your app has been redeployed after adding environment variables
Events not triggering the functions?
- Confirm the app is actually emitting
user/createdevents - Double-check event names in your functions match exactly
- Verify that your functions are properly exported and registered
Unauthorized errors
- Rotate keys in the Inngest add-on and redeploy your application
- Ensure the signing key matches between your app and Inngest configuration
FAQs
1. What is the difference between App Platform and Functions?
App Platform is a Platform-as-a-Service (PaaS) offering that allows developers to publish code directly to the cloud provider servers without worrying about the underlying infrastructure. Functions are blocks of code that run on demand without the need to manage any infrastructure. Inngest works with both App Platform and Functions, but this tutorial focuses on App Platform integration.
2. Is an app platform free?
an app platform offers a free tier that's ideal for trying out the platform, hosting personal websites, portfolios, or small projects. However, for production applications with Inngest integration, you'll likely need a paid plan that includes access to SaaS Add-Ons and environment variables.
3. What is the use of Inngest?
Inngest is an event-driven durable workflow engine that enables you to run reliable code on any platform, including serverless. With any Inngest SDK, you write functions in your codebase and make them available to Inngest using an HTTP endpoint. It's particularly useful for background job processing, workflow orchestration, and event-driven architecture.
You can refer to Inngest official documentation for more information on how to use Inngest.
4. How to use Inngest?
To use Inngest, you:
- Install the Inngest SDK in your application
- Create an Inngest client and configure it with your credentials
- Define functions that respond to specific events
- Set up an HTTP endpoint that Inngest can communicate with
- Emit events from your application to trigger the functions
5. What are the three types of workflows?
The three main types of Inngest workflows are:
- Sequential workflows: Follow a strict, step-by-step path where each task must be completed before the next one begins
- State machine workflows: Progress through different states based on events or decisions, allowing movement back and forth between steps
- Rules-driven workflows: Triggered by specific conditions or business rules, with paths determined by logic like "if/then" statements
Inngest supports all three types of workflows, making it flexible for various use cases.
6. Can you run background jobs on an app platform?
Yes, an app platform supports background jobs through several methods:
- Scheduled Jobs: Run tasks on a schedule using cron-like syntax
- Worker Components: Run background services that don't respond to HTTP requests
- SaaS Add-Ons: Integrate with services like Inngest for more advanced background job processing
This tutorial focuses on using Inngest as a SaaS Add-On for sophisticated background job processing.
Conclusion
You've successfully deployed your app on an app platform, added Inngest as a SaaS Add-On, configured secure environment variables, synced functions and created an /api/inngest endpoint, and triggered a test event to verify execution.
Your application can now handle background jobs without managing servers or queues. As your project grows, simply add new events and functions—Inngest will scale automatically.
Next Steps
Ready to explore more advanced background job processing and App Platform features? Check out these related tutorials:
- How to Manage Jobs in App Platform – Learn about scheduled jobs and worker components
- How to Use SaaS Add-Ons in App Platform – Discover other available add-ons for your applications
- App Platform Components Overview – Understand different component types and their use cases
- Building Production-Ready Apps with App Platform – Best practices for production deployments
For more background job processing solutions, explore our App Platform documentation or visit the the cloud provider Community for additional tutorials and support.