You can, yes. This looks like a local dev specific bug (which we can fix). This works: ```ts export

You can, yes. This looks like a local dev specific bug (which we can fix). This works:
export class FirstWorkflow extends WorkflowEntrypoint<Env, Params> {
    async run(event: WorkflowEvent<Params>, step: WorkflowStep) {
        const files = await step.do('my first step', async () => {
            return {
                inputParams: event,
                files: [],
            };
        });

        const apiResponse = await step.do('some other step', async () => {
            let resp = await fetch('https://api.cloudflare.com/client/v4/ips');
            return await resp.json<any>();
        });
    }
}

export class SecondWorkflow extends WorkflowEntrypoint<Env, Params> {
    async run(event: WorkflowEvent<Params>, step: WorkflowStep) {
        const files = await step.do('some step', async () => {
            return {};
        });
    

[[workflows]]
name = "first-workflow"
binding = "FIRST_WORKFLOW"
class_name = "FirstWorkflow"

[[workflows]]
name = "second-workflow"
binding = "SECOND_WORKFLOW"
class_name = "SecondWorkflow"

➜  npx wrangler@latest deploy

Total Upload: 1.48 KiB / gzip: 0.62 KiB
Your worker has access to the following bindings:
- Workflows:
  - FIRST_WORKFLOW: FirstWorkflow
  - SECOND_WORKFLOW: SecondWorkflow
Uploaded two-workflows (1.76 sec)

Showing last 3 workflows:
┌───────────────────┬────────────────┬────────────────┬─────────────────────────┬─────────────────────────┐
│ Name              │ Script name    │ Class name     │ Created                 │ Modified                │
├───────────────────┼────────────────┼────────────────┼─────────────────────────┼─────────────────────────┤
│ first-workflow    │ two-workflows  │ FirstWorkflow  │ 10/25/2024, 12:01:24 PM │ 10/25/2024, 12:01:24 PM │
├───────────────────┼────────────────┼────────────────┼─────────────────────────┼─────────────────────────┤
│ second-workflow   │ two-workflows  │ SecondWorkflow │ 10/25/2024, 12:01:24 PM │ 10/25/2024, 12:01:24 PM │
├───────────────────┼────────────────┼────────────────┼─────────────────────────┼─────────────────────────┤
│ workflows-starter │ workflows-demo │ MyWorkflow     │ 10/23/2024, 11:33:58 AM │ 10/24/2024, 7:23:58 PM  │
└───────────────────┴────────────────┴────────────────┴─────────────────────────┴─────────────────────────┘
Was this page helpful?