Course lesson 34 · Building AI Workflows

Update: Fixing issues with 1MiB Output limit

One study unit · Read, recall, then practice · Original video 00:02:52

This corrective lesson fixes workflow failures caused by oversized persisted step output, especially after screenshots were added. The first step now creates the evaluation ID, renders the page, and writes bulky evidence directly to R2, returning only the text needed for AI and that ID. The AI step remains, and the final database save accepts the already-created ID rather than generating its own.

Primary source: course video 34 · Supplied English subtitles · 00:02:52.

Understand the idea

What the course does

  1. Identify the first collection step as the source of the oversized saved-state error.
  2. Generate an evaluation ID at the start of that step.
  3. Render the destination and move the HTML, text, and screenshot R2 writes into the same step.
  4. Return the evaluation ID and body text instead of the full HTML and encoded image.
  5. Keep the AI step using the returned text.
  6. Change the add-evaluation query to accept the caller’s ID, save the database record last, and remove the separate final R2 step.

Watch for

Recall before revealing

Why does moving the R2 upload into the first step fix the screenshot-related failure?

Reveal the explanation

The large screenshot no longer has to be returned and persisted as that step’s output; it is stored in R2 before the checkpoint.

Try it

Redraw the final workflow after this patch and annotate which data is stored in R2 versus returned between steps.

Check your result

Your diagram shows collection plus backup first, AI second, database save last, with a shared ID and no large image crossing a step boundary.

Practice prompts and answer checks are added teaching material. Answer from memory first, then compare and explain any difference.

Rewatch only what you need

Open this lesson in your original course library and seek to the times below. Videos are not hosted on this site.

Companion primary documentation: Workflows limits. For recorded API names, commands, limits, and prices, check the version you use.

← Previous   Next →