Skip to main content

Filter URLs with AI-powered robots.txt compliance & source verification

Workflow preview

Workflow preview
100%
Filter URLs with AI-powered robots.txt compliance & source verification preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

URL Officer Respect robots.txt and Avoid Undesirable Sources Overview Version : 1.0 The URL Officer workflow automates the filtering of URLs by checking them against a database of forbidden sour...

Best for

  • SecOps automation workflows
  • AI RAG automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.scheduletrigger, n8n-nodes-base.code, n8n-nodes-base.set, @n8n/n8n-nodes-langchain.informationextractor, @n8n/n8n-nodes-langchain.modelselector, @n8n/n8n-nodes-langchain.lmchatmistralcloud, @n8n/n8n-nodes-langchain.lmchatgroq, @n8n/n8n-nodes-langchain.lmchatgooglegemini

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Hybroht.

Original n8n.io source

1.1 Workflow description

Title
Filter URLs with AI-powered robots.txt compliance & source verification
Workflow name
Filter URLs with AI-powered robots.txt compliance & source verification

URL Officer - Respect robots.txt and Avoid Undesirable Sources

🎬 Overview

Version : 1.0

The URL Officer workflow automates the filtering of URLs by checking them against a database of forbidden sources and the rules defined in robots.txt files. It proactively respects robot exclusion protocols and user-defined banned sources to aid in lawful and ethical web automation. Designed primarily as a sub-workflow, it serves automation pipelines with robust URL validation to avoid undesirable or restricted sources.

✨ Features

  • Dual-layer URL Filtering: Checks URLs against a manually maintained forbidden sources list and robots.txt restrictions.
  • Automated robots.txt Retrieval & Update: Automatically fetches and updates robots.txt content for new or outdated sources (older than 3 days).
  • AI-backed robots.txt Interpretation: Uses AI models to interpret robots.txt comments and restrictions, ensuring nuanced compliance.
  • Configurable User-Agent Identification: Allows customization of User-Agent strings that are checked against robots.txt directives.
  • Sub-Workflow Ready: Easily integrates as a sub-workflow for link validation in larger automation pipelines.
  • Multi-Model AI Support: Supports mistral, groq, and gemini AI models for enhanced robots.txt compliance checks.
  • Detailed Diagnostic Outputs: Returns comprehensive link allowance statuses and metadata for use in downstream processing.
  • Database Integration: Utilizes PostgreSQL to store and manage robots.txt content and banned source lists.

👤 Who is this for?

Ideal for developers, data engineers, researchers, or businesses implementing web crawlers, scrapers, or any automation that processes URLs. This workflow helps your compliance with source restrictions and avoids content from blacklisted sites, reducing legal exposure and promoting ethical data use.

💡 What problem does this solve?

URL Officer addresses the challenge of automating URL validation by combining manual blacklist filtering with automated and AI-assisted robots.txt parsing. It prevents accidental scraping or processing from undesirable or disallowed sources, helping automate respect for webmasters' policies and legal boundaries.

🔍 What this workflow does

When given a URL, the workflow:

  • Extracts the base URL.
  • Checks the URL against a manually configured banned sources list (stored in database).
  • Fetches robots.txt for new or stale sources (older than 3 days).
  • Performs a programmatic parse and check of robots.txt directives against the URL using the specified User-Agent.
  • Runs an AI model to analyze robots.txt content and confirm if the URL is allowed, taking into account any special comments or prohibitions relevant to the automation goal.
  • Returns a final "allow or disallow" determination for both the URL and its base URL, along with metadata about the robots.txt fetch status and timing.

🔄 Workflow Steps

1. Input Parsing & Base URL Extraction

  • Accepts workflow arguments including the URL, User-Agent information, automation goal, and AI model choice.
  • Extracts and normalizes the base URL for processing.

2. Forbidden Source Check

  • Queries PostgreSQL tables containing banned sources.
  • Immediately rejects URLs matching forbidden sources.

3. robots.txt Handling

  • Checks if robots.txt content for the source is in the database and is recent (under 3 days old).
  • If missing or outdated, fetches the robots.txt file from the base URL and updates the database.

4. Code-Based robots.txt Analysis

  • Parses robots.txt directives, matching the User-Agent to appropriate groups.
  • Checks if the URL and base URL paths are allowed according to the parsed rules.
  • Uses a conservative URL and agent matching algorithm for prefix-based allow/disallow checks.

5. AI-Based robots.txt Verification

  • Uses the selected AI model (mistral, groq, or gemini) to analyze robots.txt content and comments regarding allowed automation use.
  • Applies AI understanding to confirm or override automated code checks based on the automation's goal.

6. Output Preparation

  • Produces output indicating permission statuses (allow_link and allow_baseUrl), original URLs, User-Agent info, fetch timestamps, and whether robots.txt was successfully retrieved.
  • Designed to be consumed by other workflows as a validation step.

🔀 Expected Input / Configuration

The workflow is configured primarily via workflow input arguments:

Parameter Description Type
link The URL to be checked. String
userAgent User-Agent string representing your automation, used for robots.txt checks. String
userAgent_extra Additional User-Agent information such as version or contact info. String
automationGoal Description of your automation’s purpose, used by the AI to verify suitability against robots.txt. String
model AI model to use for the robots.txt compliance check. Options: mistral, groq, gemini. String

Database Requirements

  • PostgreSQL database configured with credentials accessible to the workflow.
  • Two tables: one for banned sources (manually maintained) and one for robots.txt content with timestamps.
  • The workflow auto-creates and manages these tables.
  • Recommended to use a containerized PostgreSQL instance (Podman or Docker).

📦 Expected Output

A structured JSON object containing:

Output Key Description
link The URL that was checked.
baseUrl The base URL of the checked link.
allow_link Boolean indicating if the link is allowed according to checks.
allow_baseUrl Boolean indicating if the base URL is allowed.
userAgent User-Agent string used in the check.
userAgent_extra Additional User-Agent metadata.
robots_fetched Boolean, true if robots.txt content was successfully fetched.
fetched_at Timestamp of the last robots.txt content fetch.

📌 Example

Example input payload:

⚙️ n8n Setup Used

  • n8n version: 1.108.2
  • Platform: Podman 4.3.1 on Linux
  • PostgreSQL: Running in Podman 4.3.1 container
  • LLM Models: mistral-small-latest, llama-3.1-8b-instant (Groq), gemini-2.5-flash
  • Date: 2025-08-29

⚡ Requirements to Use / Setup

  • Self-hosted or cloud n8n instance with database connectivity.
  • PostgreSQL database configured and accessible by n8n.
  • Setup PostgreSQL using the recommended containerized deployment or your preferred method.
  • Configure database credentials inside the workflow.
  • Provide API credentials for your chosen AI model (mistral, groq, gemini).
  • Manually maintain the banned sources list in the database.
  • Familiarity with n8n variables and sub-workflow integration is recommended.
  • Internet connectivity for fetching robots.txt files.

⚠️ Notes, Assumptions & Warnings

  • Database tables used by this workflow are automatically created and managed by the workflow.
  • robots.txt refresh interval is set to every 3 days; this can be adjusted by modifying the workflow.
  • The robots.txt parser is relatively simple and does not support wildcard (*) or end-of-string ($) rules.
  • User-Agent matching is substring-based and longer string matches take precedence.
  • AI analysis adds a human-like understanding of robots.txt comments and prohibitions but depends on the quality and capability of the chosen AI model.
  • This workflow does NOT handle:
    • Terms of Service compliance.
    • Preference for official APIs over HTML scraping.
    • Rate-limiting or request throttling.
    • Handling paywalled or restricted content.
    • De-duplication or filtering beyond the banned sources list.
    • Encryption or secure storage.
  • You remain responsible for ensuring your automation complies with legal, ethical, and platform-specific rules.
  • The workflow is designed as a sub-workflow; integrate it into larger automation processes to validate URLs.

🛠 PostgreSQL Setup Instructions (Self-Hosted Route)

Available inside the Workflow Notes, alongside podman commands.

ℹ️ About Us

This workflow was developed by the Hybroht team. Our goal is to create tools that harness the possibilities of technology and more. We aim to continuously improve and expand functionalities based on community feedback and evolving use cases.

For questions, support, or feedback, please contact us at: [email protected]


⚖️ Warranty & Legal Notice

This workflow is provided "as-is" without warranties of any kind. By using this workflow, you agree that you are responsible for complying with all applicable laws, regulations, and terms of service related to your data sources and automations. Please review all relevant legal terms and use this workflow responsibly.

Hybroht disclaims any liability arising from use or misuse of this workflow. This tool assists with robots.txt compliance but is not a substitute for full legal or compliance advice.

You can view the full license terms here. Please review them before making your purchase.

By purchasing this product, you agree to these terms.


1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Schedule Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 2 - Get Base URL

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 3 - Prepare Robots.txt Check

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 4 - Assume Disallow

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 5 - Information Extractor

Type / Role
@n8n/n8n-nodes-langchain.informationExtractor - informationExtractor
Config choices
Version 1.2

Block 6 - Model Selector

Type / Role
@n8n/n8n-nodes-langchain.modelSelector - modelSelector
Config choices
Version 1

Block 7 - Mistral Cloud Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatMistralCloud - lmChatMistralCloud
Config choices
Version 1

Block 8 - Groq Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatGroq - lmChatGroq
Config choices
Version 1

Block 9 - Google Gemini Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 10 - Get Robots.txt

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 11 - Check Robots.txt

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 12 - Prepare Robots.txt Check 2

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 13 - If Link Allowed

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 14 - Prepare Output for Link Disallowed

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 15 - If Link Allowed 2

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 16 - Create robots.txt Table

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.6

Block 17 - Check robots.txt Table

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.6

Block 18 - If robots.txt Found and Updated

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 19 - Output

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 20 - Prepare Output

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 21 - Prepare Output for Link Allowed

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 22 - Upsert robots.txt Table

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.6

Block 23 - Delete robots.txt Table

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.6

Block 24 - Start

Type / Role
n8n-nodes-base.executeWorkflowTrigger - executeWorkflowTrigger
Config choices
Version 1.1

Showing the first 24 of 70 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Filter URLs with AI-powered robots.txt compliance & source verification
Complexity advanced
Nodes 70
Categories SecOps, AI RAG
Author Hybroht
Published 01 Sept 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/8138/8138.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Filter URLs with AI-powered robots.txt compliance & source verification do?

URL Officer Respect robots.txt and Avoid Undesirable Sources Overview Version : 1.0 The URL Officer workflow automates the filtering of URLs by checking them against a database of forbidden sour...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your SecOps, AI RAG use case.