Cloudflare Workflows can now create 100 instances in one call
createBatch() gains an object form that creates instances by count or from a list of IDs, and reports which ones failed instead of failing silently.
Cloudflare shipped a new form of createBatch() for Workflows on 8 October, letting a single call create up to 100 Workflow instances instead of one.
The old form took a plain array of instance definitions and skipped anything that failed, without saying why. The new object form takes either a count, which creates that many instances sharing the same params with auto-generated IDs, or an instances list with custom IDs and per-instance params. The response now splits into a created array and an errors array, and a duplicate or already-existing ID shows up as a reported error rather than being silently dropped. The array form still works but is deprecated. Local development needs Wrangler 4.148.0 or later to get the new types.
const result = await env.MY_WORKFLOW.createBatch({
count: 10,
params: { report: 'daily' },
});
Why it matters: if you fan out Workflow instances in a loop today, this replaces that with one call and gives you an actual error list to check instead of guessing which instances didn’t get created. Worth switching to before the array form’s deprecation turns into a removal.