Why Inngest?
Inngest runs reliable functions triggered by events. Multi-step workflows with automatic retries, delays, and fan-out — no queues to manage.
npm install inngest
Define a Function
import { inngest } from './client'
export const processSignup = inngest.createFunction(
{ id: 'process-signup' },
{ event: 'user/signup' },
async ({ event, step }) => {
// Step 1: Send welcome email
await step.run('send-welcome', async () => {
await sendEmail(event.data.email, 'Welcome!')
})
// Step 2: Wait 1 day
await step.sleep('wait-1-day', '1d')
// Step 3: Send onboarding email
await step.run('send-onboarding', async () => {
await sendEmail(event.data.email, 'Getting started guide')
})
// Step 4: Wait 3 days
await step.sleep('wait-3-days', '3d')
// Step 5: Check engagement
const isActive = await step.run('check-engagement', async () => {
return await checkUserActivity(event.data.userId)
})
if (!isActive) {
await step.run('send-re-engage', async () => {
await sendEmail(event.data.email, 'We miss you!')
})
}
}
)
Trigger Events
import { inngest } from './client'
await inngest.send({
name: 'user/signup',
data: { userId: '123', email: 'user@example.com' },
})
Inngest vs Temporal vs Trigger.dev
| Feature | Inngest | Temporal | Trigger.dev |
|---|---|---|---|
| Steps | Built-in | Activities | Tasks |
| Delays | step.sleep | Timer | wait |
| Events | Native | Manual | Triggers |
| Self-host | Yes | Yes | Yes |
| Complexity | Low | High | Low |
Need to extract data from any website at scale? I build custom web scrapers — 77 production scrapers running on Apify Store. Email me at spinov001@gmail.com for a tailored solution.
Top comments (0)