BNOD

← All templates
aiaisummaryanthropicbyok

Summarize the active page with Claude (BYOK)

Open a URL, capture body text, POST it to Anthropic's Messages API using env.ANTHROPIC_API_KEY, log the model's summary. Bring your own key; data never leaves your machine until the POST.

Install in BNOD

Install in BNOD

Opens BNOD sidepanel with this template installed. Requires BNOD extension.

You're scanning a long article — an arXiv paper, a Wikipedia entry, a competitor's pricing page — and you want a five-bullet summary before deciding whether to read it in full. ChatGPT and Claude both do this beautifully, but pasting page text into a chat tab is friction you hit fifty times a week. This template opens any URL you give it, grabs the body text, sends it to Anthropic's Claude API with your own key, and logs the summary. BYOK (bring your own key) — the request goes from your browser directly to Anthropic, never via a third-party proxy. Useful for researchers, journalists, knowledge workers triaging article queues, or anyone tired of context-switching to a chat tab.

How this workflow works

Seven blocks. The first four prepare the page text; the last three handle the AI call.

  1. manual_trigger — Sidepanel Run. Exposes one input: page_url (default Wikipedia's Hummingbird article). targetTab: "new" opens the page in a fresh tab.
  2. navigate — Opens {{vars.input.page_url}}.
  3. wait_for — Waits up to 15 seconds for body to be visible. The selector is intentionally permissive — any page has a body, so this just ensures the document is fully parsed before scraping.
  4. get_text — Reads the text content of body. This strips HTML tags and returns plain text, available as $('Capture body text').text. For a long Wikipedia article this might be 5-20 KB of text.
  5. set_variable — Builds the prompt string: "Summarize the following page in 5 bullet points:\n\n{{$('Capture body text').text}}". Stored in vars.prompt. Wrapping the prompt construction in its own step makes it easier to tweak and to inspect via the run log.
  6. http_request — POST to https://api.anthropic.com/v1/messages. Three headers: x-api-key (sourced from env.ANTHROPIC_API_KEY), anthropic-version: 2023-06-01, and content-type: application/json. The body uses Anthropic's Messages API shape: model claude-haiku-4-5-20251001, max_tokens: 400, and a single user message whose content is the prompt variable — the {{json:vars.prompt}} modifier JSON-escapes the string to prevent quotes inside the page text from breaking the body. timeoutMs: 30000 for slow pages.
  7. log_data — Writes the full response body (which includes the model's summary text) to the workflow log with label summary. Visible in the sidepanel Run history.

A typical run takes 2-6 seconds depending on the page size and Anthropic's response latency. Cost is fractions of a cent at Haiku pricing for normal-length pages.

Customising it for your case

Several useful tweaks.

Common gotchas

Three to watch. First: very long pages (50K+ words) exceed Claude Haiku's context window or cost a non-trivial amount. The body selector is greedy; truncate via set_variable with a substring like {{$('Capture body text').text}}.slice(0, 20000) before sending. Second: pages behind login (paywalled articles, internal dashboards) return the login page's text — the summary will be of the login form, not the real content. Use the recorder to capture login first, then chain that workflow into this one. Third: env.ANTHROPIC_API_KEY must be set in Settings → Env first. If missing, the request sends with an empty key and returns 401; the workflow logs the error response instead of a summary.

FAQ

Do I need an Anthropic API key? Yes. Sign up at console.anthropic.com, create a key, and add it to Settings → Env as ANTHROPIC_API_KEY. The first $5 of usage is typically free for new accounts.

Does my page text get stored on Anthropic's servers? Per Anthropic's privacy policy, API traffic is not used for training. The text transits Anthropic to generate the response and is retained briefly for abuse monitoring. Read their data policy if you're handling sensitive content.

Why send body text instead of the URL? Anthropic's API doesn't fetch URLs on its own — you have to give it the content. Some other providers (Perplexity, Brave Search MCP) accept URLs directly. Automa and Bardeen handle this identically; the URL-to-text step is required regardless of platform.

Can I batch-summarize 50 articles? Yes. Wrap this workflow in a parent that loops over an array of URLs, calling this one as a sub-workflow. Watch your token spend.

Blocks used

  • manual_trigger
  • navigate
  • wait_for
  • get_text
  • set_variable
  • http_request
  • log_data

Works on

Any site

Install in BNOD

Free. No signup required.

Related templates