Course lesson 27 · Building AI Workflows

Rendering Webpages with Cloudflare Browser Render

One study unit · Read, recall, then practice · Original video 00:14:50

The dummy collection step becomes a real Browser Rendering operation using Cloudflare’s Puppeteer integration. The workflow opens the destination, waits for network activity to settle, and extracts visible body text, HTML, and the response status for later analysis. The instructor then moves this logic into a helper and explicitly closes the browser to release the session.

Primary source: course video 27 · Supplied English subtitles · 00:14:50.

Understand the idea

What the course does

  1. Install the Cloudflare-compatible Puppeteer package and add the virtual-browser binding.
  2. Regenerate environment types and pass the binding to Puppeteer’s launch operation.
  3. Define the workflow payload type and use its destination URL when opening a page.
  4. Wait for network idle, extract body text and HTML, and capture the response status.
  5. Deploy and trigger a test against the instructor’s site, then compare returned content with the page.
  6. Inspect logs on the associated Worker, extract rendering into a helper, and close the browser after collection.

Watch for

Follow the final workflow correction in lesson 34 when combining these steps.

Recall before revealing

Why preserve both body text and HTML rather than feed the whole HTML directly to AI?

Reveal the explanation

Text gives the model the content it needs with less markup, while HTML provides richer evidence for later debugging.

Try it

Compare a simple static page with a page that fills content after loading. Record what the rendered text contains and what readiness condition you used.

Check your result

You can explain whether the collected input actually includes the content needed for a page-health decision.

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 Workers API. For recorded API names, commands, limits, and prices, check the version you use.

← Previous   Next →