Back to Catalog

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

HybrohtHybroht
31 views
2/3/2026
Official Page

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: printscreenurlofficer_example.png printscreen1.png printscreen2.png printscreen3.png

βš™οΈ 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: contact@hybroht.com


βš–οΈ 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.


AI-Powered robots.txt Compliance and Source Verification

This n8n workflow automates the process of filtering URLs based on AI-powered robots.txt compliance and then verifying the source of the compliant URLs. It's designed to ensure that you only process or interact with web pages that allow crawling and come from trusted domains.

What it does

  1. Triggers on Schedule or External Execution: The workflow can be initiated either on a predefined schedule (e.g., daily, hourly) or when explicitly called by another n8n workflow.
  2. Retrieves URLs from Database: It queries a PostgreSQL database to fetch a list of URLs to be processed.
  3. Prepares URL Data: Transforms the retrieved URL data into a suitable format for subsequent processing steps.
  4. Selects AI Model: Dynamically chooses an AI chat model (Mistral Cloud, Google Gemini, or Groq) based on configured preferences or availability for processing.
  5. Extracts robots.txt Information: Uses an AI-powered Information Extractor to analyze the robots.txt file of each URL and determine if crawling is permitted.
  6. Filters Compliant URLs: An If node checks the AI's output to filter out URLs that are compliant with robots.txt rules.
  7. Verifies Source (Placeholder): The HTTP Request node is included, likely as a placeholder or initial step for source verification of the compliant URLs, though its specific configuration for this purpose is not detailed in the JSON.
  8. Custom Code Logic: A Code node allows for custom JavaScript logic to be executed, potentially for further filtering, data manipulation, or integration with other services.

Prerequisites/Requirements

  • n8n Instance: A running n8n instance.
  • PostgreSQL Database: Access to a PostgreSQL database containing the URLs to be processed.
  • AI Model Credentials: API keys and access to at least one of the following AI chat models:
    • Mistral Cloud
    • Google Gemini
    • Groq
  • HTTP Endpoints: If the "HTTP Request" node is used for external API calls, ensure the necessary API keys or authentication methods are configured.

Setup/Usage

  1. Import the Workflow: Import the provided JSON into your n8n instance.
  2. Configure Credentials:
    • PostgreSQL: Set up your PostgreSQL credentials to connect to your database.
    • AI Models: Configure credentials for your chosen AI chat model(s) (Mistral Cloud, Google Gemini, Groq) within the respective nodes.
  3. Adjust Database Query: Modify the Postgres node's SQL query to fetch the specific URLs you need.
  4. Configure AI Logic:
    • Model Selector: Adjust the Model Selector node if you have specific preferences for which AI model to use.
    • Information Extractor: Review and potentially refine the prompt or schema in the Information Extractor node to accurately parse robots.txt content for compliance.
  5. Refine If Node: Ensure the conditions in the If node correctly interpret the output from the Information Extractor to determine robots.txt compliance.
  6. Customize HTTP Request and Code Nodes:
    • If the HTTP Request node is intended for source verification, configure it with the appropriate URL, headers, and authentication.
    • Modify the Code node to implement any additional custom logic required for your specific use case (e.g., logging, further data enrichment, triggering other actions).
  7. Set Schedule (Optional): If you want the workflow to run automatically, configure the Schedule Trigger node with your desired interval.
  8. Activate the Workflow: Once configured, activate the workflow to start automating your robots.txt compliance and source verification.

Related Templates

Track competitor SEO keywords with Decodo + GPT-4.1-mini + Google Sheets

This workflow automates competitor keyword research using OpenAI LLM and Decodo for intelligent web scraping. Who this is for SEO specialists, content strategists, and growth marketers who want to automate keyword research and competitive intelligence. Marketing analysts managing multiple clients or websites who need consistent SEO tracking without manual data pulls. Agencies or automation engineers using Google Sheets as an SEO data dashboard for keyword monitoring and reporting. What problem this workflow solves Tracking competitor keywords manually is slow and inconsistent. Most SEO tools provide limited API access or lack contextual keyword analysis. This workflow solves that by: Automatically scraping any competitor’s webpage with Decodo. Using OpenAI GPT-4.1-mini to interpret keyword intent, density, and semantic focus. Storing structured keyword insights directly in Google Sheets for ongoing tracking and trend analysis. What this workflow does Trigger β€” Manually start the workflow or schedule it to run periodically. Input Setup β€” Define the website URL and target country (e.g., https://dev.to, france). Data Scraping (Decodo) β€” Fetch competitor web content and metadata. Keyword Analysis (OpenAI GPT-4.1-mini) Extract primary and secondary keywords. Identify focus topics and semantic entities. Generate a keyword density summary and SEO strength score. Recommend optimization and internal linking opportunities. Data Structuring β€” Clean and convert GPT output into JSON format. Data Storage (Google Sheets) β€” Append structured keyword data to a Google Sheet for long-term tracking. Setup Prerequisites If you are new to Decode, please signup on this link visit.decodo.com n8n account with workflow editor access Decodo API credentials OpenAI API key Google Sheets account connected via OAuth2 Make sure to install the Decodo Community node. Create a Google Sheet Add columns for: primarykeywords, seostrengthscore, keyworddensity_summary, etc. Share with your n8n Google account. Connect Credentials Add credentials for: Decodo API credentials - You need to register, login and obtain the Basic Authentication Token via Decodo Dashboard OpenAI API (for GPT-4o-mini) Google Sheets OAuth2 Configure Input Fields Edit the β€œSet Input Fields” node to set your target site and region. Run the Workflow Click Execute Workflow in n8n. View structured results in your connected Google Sheet. How to customize this workflow Track Multiple Competitors β†’ Use a Google Sheet or CSV list of URLs; loop through them using the Split In Batches node. Add Language Detection β†’ Add a Gemini or GPT node before keyword analysis to detect content language and adjust prompts. Enhance the SEO Report β†’ Expand the GPT prompt to include backlink insights, metadata optimization, or readability checks. Integrate Visualization β†’ Connect your Google Sheet to Looker Studio for SEO performance dashboards. Schedule Auto-Runs β†’ Use the Cron Node to run weekly or monthly for competitor keyword refreshes. Summary This workflow automates competitor keyword research using: Decodo for intelligent web scraping OpenAI GPT-4.1-mini for keyword and SEO analysis Google Sheets for live tracking and reporting It’s a complete AI-powered SEO intelligence pipeline ideal for teams that want actionable insights on keyword gaps, optimization opportunities, and content focus trends, without relying on expensive SEO SaaS tools.

Ranjan DailataBy Ranjan Dailata
161

Generate song lyrics and music from text prompts using OpenAI and Fal.ai Minimax

Spark your creativity instantly in any chatβ€”turn a simple prompt like "heartbreak ballad" into original, full-length lyrics and a professional AI-generated music track, all without leaving your conversation. πŸ“‹ What This Template Does This chat-triggered workflow harnesses AI to generate detailed, genre-matched song lyrics (at least 600 characters) from user messages, then queues them for music synthesis via Fal.ai's minimax-music model. It polls asynchronously until the track is ready, delivering lyrics and audio URL back in chat. Crafts original, structured lyrics with verses, choruses, and bridges using OpenAI Submits to Fal.ai for melody, instrumentation, and vocals aligned to the style Handles long-running generations with smart looping and status checks Returns complete song package (lyrics + audio link) for seamless sharing πŸ”§ Prerequisites n8n account (self-hosted or cloud with chat integration enabled) OpenAI account with API access for GPT models Fal.ai account for AI music generation πŸ”‘ Required Credentials OpenAI API Setup Go to platform.openai.com β†’ API keys (sidebar) Click "Create new secret key" β†’ Name it (e.g., "n8n Songwriter") Copy the key and add to n8n as "OpenAI API" credential type Test by sending a simple chat completion request Fal.ai HTTP Header Auth Setup Sign up at fal.ai β†’ Dashboard β†’ API Keys Generate a new API key β†’ Copy it In n8n, create "HTTP Header Auth" credential: Name="Fal.ai", Header Name="Authorization", Header Value="Key [Your API Key]" Test with a simple GET to their queue endpoint (e.g., /status) βš™οΈ Configuration Steps Import the workflow JSON into your n8n instance Assign OpenAI API credentials to the "OpenAI Chat Model" node Assign Fal.ai HTTP Header Auth to the "Generate Music Track", "Check Generation Status", and "Fetch Final Result" nodes Activate the workflowβ€”chat trigger will appear in your n8n chat interface Test by messaging: "Create an upbeat pop song about road trips" 🎯 Use Cases Content Creators: YouTubers generating custom jingles for videos on the fly, streamlining production from idea to audio export Educators: Music teachers using chat prompts to create era-specific folk tunes for classroom discussions, fostering interactive learning Gift Personalization: Friends crafting anniversary R&B tracks from shared memories via quick chats, delivering emotional audio surprises Artist Brainstorming: Songwriters prototyping hip-hop beats in real-time during sessions, accelerating collaboration and iteration ⚠️ Troubleshooting Invalid JSON from AI Agent: Ensure the system prompt stresses valid JSON; test the agent standalone with a sample query Music Generation Fails (401/403): Verify Fal.ai API key has minimax-music access; check usage quotas in dashboard Status Polling Loops Indefinitely: Bump wait time to 45-60s for complex tracks; inspect fal.ai queue logs for bottlenecks Lyrics Under 600 Characters: Tweak agent prompt to enforce fuller structures like [V1][C][V2][B][C]; verify output length in executions

Daniel NkenchoBy Daniel Nkencho
601

Automate invoice processing with OCR, GPT-4 & Salesforce opportunity creation

PDF Invoice Extractor (AI) End-to-end pipeline: Watch Drive ➜ Download PDF ➜ OCR text ➜ AI normalize to JSON ➜ Upsert Buyer (Account) ➜ Create Opportunity ➜ Map Products ➜ Create OLI via Composite API ➜ Archive to OneDrive. --- Node by node (what it does & key setup) 1) Google Drive Trigger Purpose: Fire when a new file appears in a specific Google Drive folder. Key settings: Event: fileCreated Folder ID: google drive folder id Polling: everyMinute Creds: googleDriveOAuth2Api Output: Metadata { id, name, ... } for the new file. --- 2) Download File From Google Purpose: Get the file binary for processing and archiving. Key settings: Operation: download File ID: ={{ $json.id }} Creds: googleDriveOAuth2Api Output: Binary (default key: data) and original metadata. --- 3) Extract from File Purpose: Extract text from PDF (OCR as needed) for AI parsing. Key settings: Operation: pdf OCR: enable for scanned PDFs (in options) Output: JSON with OCR text at {{ $json.text }}. --- 4) Message a model (AI JSON Extractor) Purpose: Convert OCR text into strict normalized JSON array (invoice schema). Key settings: Node: @n8n/n8n-nodes-langchain.openAi Model: gpt-4.1 (or gpt-4.1-mini) Message role: system (the strict prompt; references {{ $json.text }}) jsonOutput: true Creds: openAiApi Output (per item): $.message.content β†’ the parsed JSON (ensure it’s an array). --- 5) Create or update an account (Salesforce) Purpose: Upsert Buyer as Account using an external ID. Key settings: Resource: account Operation: upsert External Id Field: taxid_c External Id Value: ={{ $json.message.content.buyer.tax_id }} Name: ={{ $json.message.content.buyer.name }} Creds: salesforceOAuth2Api Output: Account record (captures Id) for downstream Opportunity. --- 6) Create an opportunity (Salesforce) Purpose: Create Opportunity linked to the Buyer (Account). Key settings: Resource: opportunity Name: ={{ $('Message a model').item.json.message.content.invoice.code }} Close Date: ={{ $('Message a model').item.json.message.content.invoice.issue_date }} Stage: Closed Won Amount: ={{ $('Message a model').item.json.message.content.summary.grand_total }} AccountId: ={{ $json.id }} (from Upsert Account output) Creds: salesforceOAuth2Api Output: Opportunity Id for OLI creation. --- 7) Build SOQL (Code / JS) Purpose: Collect unique product codes from AI JSON and build a SOQL query for PricebookEntry by Pricebook2Id. Key settings: pricebook2Id (hardcoded in script): e.g., 01sxxxxxxxxxxxxxxx Source lines: $('Message a model').first().json.message.content.products Output: { soql, codes } --- 8) Query PricebookEntries (Salesforce) Purpose: Fetch PricebookEntry.Id for each Product2.ProductCode. Key settings: Resource: search Query: ={{ $json.soql }} Creds: salesforceOAuth2Api Output: Items with Id, Product2.ProductCode (used for mapping). --- 9) Code in JavaScript (Build OLI payloads) Purpose: Join lines with PBE results and Opportunity Id ➜ build OpportunityLineItem payloads. Inputs: OpportunityId: ={{ $('Create an opportunity').first().json.id }} Lines: ={{ $('Message a model').first().json.message.content.products }} PBE rows: from previous node items Output: { body: { allOrNone:false, records:[{ OpportunityLineItem... }] } } Notes: Converts discount_total ➜ per-unit if needed (currently commented for standard pricing). Throws on missing PBE mapping or empty lines. --- 10) Create Opportunity Line Items (HTTP Request) Purpose: Bulk create OLIs via Salesforce Composite API. Key settings: Method: POST URL: https://<your-instance>.my.salesforce.com/services/data/v65.0/composite/sobjects Auth: salesforceOAuth2Api (predefined credential) Body (JSON): ={{ $json.body }} Output: Composite API results (per-record statuses). --- 11) Update File to One Drive Purpose: Archive the original PDF in OneDrive. Key settings: Operation: upload File Name: ={{ $json.name }} Parent Folder ID: onedrive folder id Binary Data: true (from the Download node) Creds: microsoftOneDriveOAuth2Api Output: Uploaded file metadata. --- Data flow (wiring) Google Drive Trigger β†’ Download File From Google Download File From Google β†’ Extract from File β†’ Update File to One Drive Extract from File β†’ Message a model Message a model β†’ Create or update an account Create or update an account β†’ Create an opportunity Create an opportunity β†’ Build SOQL Build SOQL β†’ Query PricebookEntries Query PricebookEntries β†’ Code in JavaScript Code in JavaScript β†’ Create Opportunity Line Items --- Quick setup checklist πŸ” Credentials: Connect Google Drive, OneDrive, Salesforce, OpenAI. πŸ“‚ IDs: Drive Folder ID (watch) OneDrive Parent Folder ID (archive) Salesforce Pricebook2Id (in the JS SOQL builder) 🧠 AI Prompt: Use the strict system prompt; jsonOutput = true. 🧾 Field mappings: Buyer tax id/name β†’ Account upsert fields Invoice code/date/amount β†’ Opportunity fields Product name must equal your Product2.ProductCode in SF. βœ… Test: Drop a sample PDF β†’ verify: AI returns array JSON only Account/Opportunity created OLI records created PDF archived to OneDrive --- Notes & best practices If PDFs are scans, enable OCR in Extract from File. If AI returns non-JSON, keep β€œReturn only a JSON array” as the last line of the prompt and keep jsonOutput enabled. Consider adding validation on parsing.warnings to gate Salesforce writes. For discounts/taxes in OLI: Standard OLI fields don’t support per-line discount amounts directly; model them in UnitPrice or custom fields. Replace the Composite API URL with your org’s domain or use the Salesforce node’s Bulk Upsert for simplicity.

Le NguyenBy Le Nguyen
942