I spend an hour each morning opening three design blogs to see if there are fresh layouts or font updates. The hours add up quickly. The Content Scrape & Notify workflow replaces that manual check with a scheduled scan. It fires at set intervals, pulls the page, pulls out the new items, and pings me only when something actually changes.
At a glance
- Built for: content creators
- Difficulty: beginner
- Starts with: Cron Schedule Trigger (scheduleTrigger)
- Steps: 5 nodes
- Tools: n8n, HTTP Request, Slack
The Cron Schedule Trigger
The workflow starts with a Cron Schedule Trigger. This node fires at the interval you set—every hour, every day, or on a custom cron expression. I have mine set to every six hours so the page isn’t hammered, but the check happens often enough to catch new posts before the day is out. The trigger passes no data to the next node; it simply starts the run.
The HTTP Request - Scrape Page
After the trigger, an HTTP Request node scrapes the target webpage. I point it at a design blog’s front page and leave the method as GET. The node returns the raw HTML. I use a simple XPath expression in the node’s response format to pull out the article links and titles. If the page structure changes—say the site switches from <h2> to <h3> for headings—the scrape will return empty or broken data, and the workflow will stop at that node.
The Set - Extract Items
The Set node takes the raw scrape and extracts the relevant items. I map the XPath results into a structured object with fields like title, url, and published. This step normalizes the data so the next IF node can compare apples to apples. Without this mapping, the duplicate check would see raw HTML strings and never match anything.
The IF - Check For Duplicates
An IF node runs a simple expression to compare the extracted url against a list of URLs already seen. I store the seen URLs in n8n’s built‑in Items cache between runs, or I use a tiny JavaScript function to push new URLs into a persistent key-value store. If the URL is already in the list, the IF evaluates to false and the workflow ends quietly. If the URL is new, the path continues to the Slack node.
The Slack - Notify New Content
When fresh content is found, a Slack node sends a message to a channel. The message includes the title as a clickable link and a one‑sentence summary pulled from the extracted data. If the scrape returns nothing—perhaps the site is down or the XPath is wrong—the workflow simply ends without notifying anyone, which is the desired behavior.
Worked Example
Sample data: A fictional article titled "New Grid System Released" with URL https://example.design/news/grid-2024.
- Cron Schedule Trigger fires at 08:00.
-
HTTP Request - Scrape Page returns HTML; the XPath extracts
[{title: "New Grid System Released", url: "https://example.design/news/grid-2024"}]. -
Set - Extract Items structures the result into
{title: "New Grid System Released", url: "https://example.design/news/grid-2024"}. - IF - Check For Duplicates compares the URL against the cached list. The URL is not present, so the path proceeds.
- Slack - Notify New Content posts: New Grid System Released – https://example.design/news/grid-2024. The user sees the message and can click through immediately.
If the same URL had appeared in a previous run, the IF would have blocked the Slack step, and no notification would fire.
Likely Failure Points
The most common failure is a mismatched XPath. If the target site updates its markup—moving from <article> tags to <div class="post">—the scrape returns an empty array, the Set node produces no items, and the workflow ends silently. Another frequent issue is the duplicate‑check cache. If the cache is cleared or the expression references the wrong field, every run will treat every item as new, flooding the Slack channel with repeats.
Debugging Checklist
- Verify the XPath returns at least one element in the HTTP Request node’s output preview.
- Confirm the Set node’s mapping produces the expected
urlfield. - Check the IF node’s expression:
items.length > 0 && items[0].urlworks only if the field name matches. - Look at the execution logs: a red error at the HTTP Request node usually means a 404 or a changed site structure; a green pass at the IF node with
falsemeans the item was already seen.
Key takeaways
- The Cron Schedule Trigger runs the workflow on a fixed timetable, not on demand.
- The HTTP Request node pulls raw HTML; any change to the page markup breaks the scrape.
- The IF node’s duplicate check depends on a stable URL field and a persistent cache. }
Before you import it
- A running n8n instance (cloud or self-hosted).
- n8n account
- website URL to scrape
- Slack workspace and token
- Sample data to test with, before pointing it at real records.
Get the free workflow
The importable JSON for Content Scrape & Notify is free to download: https://lanexbuilds.com/entry?id=content-scrape-notify
This workflow was generated with AI assistance. Test it with sample data before using it on real data.
Cover photo by lukasbieri on Pixabay
Top comments (0)