Overview
Fetches the README of a GitHub list of research papers, keeps the links that point at PDFs, and downloads each PDF into the run workspace.
This tutorial does not ship as an importable template. Build it manually by following the steps below. NodeTool has no HTTP request or download node, so both network steps are
Codenodes that call the sandboxfetch.
Demo
Workflow Steps
- Get README (
nodetool.code.Code) - Callsfetch(url)on the raw README URL and readstext(). The same body pulls the link targets that end in.pdfand returns them as a list. Use the@nodetool-ai/sandbox-htmlpack’sextractLinksinstead when the source is an HTML page. - For Each (
nodetool.control.ForEach) - Emits one URL at a time frominput_list. - Download (
nodetool.code.Code) - Fetches each URL and saves it withworkspace.writeBytes(name, await res.bytes()). - Collect (
nodetool.control.Collect) - Gathers the saved file names into a list for aPreviewnode.
fetch refuses loopback, link-local, and private addresses. See the JavaScript Sandbox reference for its limits.
Tags
automation
Workflow Diagram
graph TD
readme["Code (get README, keep PDF links)"]
each["ForEach"]
download["Code (download)"]
collect["Collect"]
preview["Preview"]
readme --> each
each -->|output| download
download --> collect
collect --> preview