Workflows

Durable workflow execution

Build complex, long-running workflows that survive failures. Each step is tracked, with automatic retries and the ability to resume from where you left off.

Workflow Executions

Recent Executions
Workflow executions (auto-refreshes every 5 seconds)
IDStatusStepsDurationStarted
exec_a1b2c3...Completed4/42.3s1/15/2024, 10:30:00 AMView
exec_d4e5f6...Running2/4-1/15/2024, 10:29:45 AMView
exec_g7h8i9...Completed4/41.9s1/15/2024, 10:25:00 AMView
exec_j0k1l2...Failed3/45.4s1/15/2024, 10:20:00 AMView
exec_m3n4o5...Cancelled1/4450ms1/15/2024, 10:15:00 AMView

Key Features

Durable Execution

Workflows survive server restarts and failures automatically.

Step Tracking

Monitor progress with detailed step-by-step execution logs.

Automatic Retries

Failed steps are automatically retried with exponential backoff.

Manual Triggers

Start workflows manually or automatically from events.

Workflow Definition

Define multi-step workflows with automatic durability.

src/index.ts
export default {
  async fetch(request, env) {
    const { executionId } = await env.FLOW
      .trigger({ userId: "123" });
    return Response.json({ executionId });
  },

  workflows: {
    async onboarding({ input, step }) {
      await step.run("welcome", async () => {
        return { sent: true };
      });
    },
  },
};

Ready to get started?

Deploy your first project in minutes with Ploy.

    Workflows | Ploy