Skip to content
Docs
flero.ai

Recipe 03, AI content summarizer

Goal: POST an article URL to a webhook. Flero fetches the page, summarises it with an LLM, and emails you the result.

Difficulty: Beginner Β· Time: ~15 minutes Β· Connectors: OpenAI or Anthropic, Email

🎬 Gif needed: recipe-03__ai-run.gif, the end-to-end run lighting up: Webhook β†’ Web Scraper β†’ AI Agent β†’ Email, each turning green. ~6 seconds.


Prerequisites

  • An LLM provider credential (OpenAI or Anthropic).
  • An Email credential or transactional email connector.

Finished workflow

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”
β”‚  Webhook    │───▢│ Web Scraper  │───▢│ AI Agent │───▢│  Transform   │───▢│ Email β”‚
β”‚  Trigger    β”‚    β”‚              β”‚    β”‚          β”‚    β”‚ (format msg) β”‚    β”‚       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”˜

Step-by-step

1. Webhook trigger

Replace Start with Webhook Trigger (POST). Expect a body like { "url": "https://..." }.

2. Web Scraper

Add a Web Scraper node:

  • URL: {{ $trigger.body.url }}
  • Render JavaScript: false (faster; toggle on for SPA pages)
  • Selectors:
    • title β†’ h1, attribute text
    • body β†’ article, .post-content, main, attribute text

3. AI Agent

Add an AI Agent node:

  • Provider: Anthropic (or OpenAI)
  • Credential: your LLM credential
  • Model: claude-opus-4-7 (or gpt-4)
  • System instructions:
    You are a concise editor. Given an article, produce a 3-sentence summary
    and 3 key takeaways as a bulleted list. Don't make things up.
  • Prompt:
    Title: {{ $node["Web Scraper"].json.title }}
    
    Article:
    {{ $node["Web Scraper"].json.body }}
  • Max tokens: 500
  • Temperature: 0.3 (more deterministic for summarisation)

4. Transform the result into an email body

Add a Transform node:

map:
  subject: "Summary: {{ $node["Web Scraper"].json.title }}"
  body: |
    <h2>{{ $node["Web Scraper"].json.title }}</h2>
    <p><strong>Source:</strong> {{ $trigger.body.url }}</p>
    <p>{{ $node["AI Agent"].json.response }}</p>

5. Send the email

Add an Email node:

  • Credential: your email credential
  • To: your email address (or {{ $trigger.body.recipient }} for dynamic)
  • Subject: {{ $node["Transform"].json.subject }}
  • Body, HTML: {{ $node["Transform"].json.body }}

6. Save and activate


Try it

curl -X POST <your webhook URL> \
  -H "Content-Type: application/json" \
  -d '{"url": "https://en.wikipedia.org/wiki/Workflow"}'

Within ~15 seconds you should receive an email with a tidy summary.


Variations

Multiple URLs at once

Change the trigger payload to { "urls": ["url1", "url2", ...] }. Add a Loop over urls; the rest of the workflow runs once per URL.

Different output formats

Modify the system instructions:

  • "Output as JSON with fields summary and keyTakeaways" β†’ use responseFormat: json_object on the AI Agent.
  • "Output in French" β†’ just say so.

Add guardrails

Insert an AI Guardrails node after AI Agent to filter PII or unsafe content before the email is sent.

Cost-cap with Token Cost Guard

Add a Token Cost Guard node at the start with a budget of 5 000 tokens per run. Runaway prompts can't bankrupt you.

Cache repeat requests

Add a Cache Storage node keyed on {{ $trigger.body.url }}. If the URL was summarised in the last 24 hours, skip the AI call and reuse the cached summary.


Troubleshooting

Symptom Likely cause Fix
Web Scraper returns empty body Page is JavaScript-rendered Toggle Render JavaScript: true on the Web Scraper node
AI Agent says "prompt too long" Article body exceeds model context Add a Text Processing node to truncate body to ~10 000 chars before the AI Agent
Summary feels generic Temperature too high Lower to 0.2; specify "Cite specific points from the article" in system instructions
Email never arrives Email going to spam Use a transactional email service (SendGrid, Postmark), set up DKIM/SPF on your sender domain
[EXPR-ERROR: Node "Web Scraper" not found] Renamed the node Match the display name exactly in expressions

Next


Found something out of date? This page lives in the Flero docs content set.