Audit a Public Page and Build an Automation Acceptance Pack

Overview

This workflow performs an automated preflight audit of a public web page to assess its readiness for automation or integration. It sends the page URL and an objective to the Automation Integration Preflight API on RapidAPI, which returns an acceptance pack containing a readiness score, risk flags, acceptance tests, and a prioritized backlog. Based on the results, the workflow automatically classifies the page as either Ready to Implement or Needs Review, helping teams decide whether to proceed with automation.

This is especially useful for teams designing integrations, scraping workflows, or automating interactions with external websites. Instead of manually reviewing a page's structure, security headers, and potential blockers, this workflow centralizes the analysis and provides actionable next steps.

Step-by-Step Node Breakdown

  1. Run Workflow (Manual Trigger) — No auth. This is the starting point. Click "Execute Workflow" in the n8n editor to kick off the audit.

  2. Set Target and Objective (Set node) — No auth. Configures two input fields: targetUrl (the public page URL, default https://example.com) and objective (a brief description of the automation goal). Edit these values before running.

  3. Validate Public Target (Code node) — No auth. A JavaScript snippet validates that the target URL is a valid public HTTP/HTTPS URL (not localhost, private IP ranges, or .local domains). If validation fails, the workflow stops with an error message.

  4. Build Acceptance Pack (HTTP Request) — Header Auth (API key). Sends a POST request to https://automation-integration-preflight.p.rapidapi.com/rapidapi/analyze with the validated URL and objective. Authentication is done via a Header Auth credential in n8n that provides the x-rapidapi-key header. The request body is JSON with fields url, mode ("acceptance-pack"), and objective. Timeout is set to 45 seconds.

  5. Summarize Evidence (Code node) — No auth. Processes the API response, extracting key metrics: readiness score (0-100), grade, launch decision (ready or otherwise), risk flags, number of acceptance tests, and backlog items. Combines evidence from the target, page, security headers, and readiness into a single JSON object.

  6. Needs Attention? (IF node) — No auth. Checks whether the requiresAttention boolean is true. This flag is true if the launch decision is not "ready", the readiness score is below 80, or there are risk flags. Branches to one of two paths.

  7. Mark Needs Review (Code node) — No auth. Sets workflowDecision to NEEDS_REVIEW and provides a next step: work through the P0/P1 backlog items and rerun the preflight.

  8. Mark Ready to Implement (Code node) — No auth. Sets workflowDecision to READY_TO_IMPLEMENT and suggests using the acceptance tests as a launch checklist.

Setup Instructions

Before running this workflow, you need:

  • A RapidAPI account. Subscribe to the Automation Integration Preflight API (the BASIC plan includes a small free request allowance).
  • In n8n, create a Header Auth credential with the header name x-rapidapi-key and your RapidAPI application key as the value.
  • On the Build Acceptance Pack node, select that credential.
  • Edit the Set Target and Objective node to provide the actual public page URL and your automation objective. Then run the workflow.

Use Cases & Adaptations

  • Integration preflight: Before writing any API or scraping code, check if the target page is stable, has the expected security headers, and is structurally suitable.
  • Continuous monitoring: Replace the manual trigger with a Cron or Schedule trigger to periodically audit a list of pages (e.g., from a Google Sheet) and send alerts if readiness degrades.
  • CI/CD pipeline: Trigger this workflow via webhook from a CI tool (e.g., GitHub Actions) to gate deployments that depend on external page compatibility.
  • Multi-page audits: Extend the workflow with a loop or splitter to audit multiple URLs in one run and aggregate results into a report or a database.
9 nodesmanual triggerDevOps
SetCodeHTTP RequestIFSticky Note

Workflow JSON

{
  "name": "Audit a Public Page and Build an Automation Acceptance Pack",
  "nodes": [
    {
      "parameters": {},
      "id": "6c13d54f-98c8-4c0b-a9d3-410c116e8785",
      "name": "Run Workflow",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        -760,
        180
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "097a7a7a-dd23-4f0d-91c4-b64e80898daa",
              "name": "targetUrl",
              "value": "https://example.com",
              "type": "string"
            },
            {
              "id": "b95d6346-2a2a-41a7-ad95-08d6af06d4dc",
              "name": "objective",
              "value": "Verify this public page before implementing an automation or integration.",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "21dcc9b6-baca-4679-b139-b8a78e82293c",
      "name": "Set Target and Objective",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -540,
        180
      ]
    },
    {
      "parameters": {
        "jsCode": "const config = $input.first().json;\nconst rawTarget = String(config.targetUrl || '').trim();\nconst objective = String(config.objective || '').trim();\n\nif (!rawTarget) throw new Error('targetUrl is required');\nif (!objective) throw new Error('objective is required');\nif (objective.length > 500) throw new Error('objective must be 500 characters or fewer');\n\nlet target;\ntry {\n  target = new URL(rawTarget);\n} catch {\n  throw new Error('targetUrl must be a valid public HTTP or HTTPS URL');\n}\nif (!['http:', 'https:'].includes(target.protocol)) {\n  throw new Error('targetUrl must use HTTP or HTTPS');\n}\nconst hostname = target.hostname.toLowerCase();\nconst privateHost = hostname === 'localhost'\n  || hostname.endsWith('.local')\n  || hostname === '0.0.0.0'\n  || hostname === '127.0.0.1'\n  || hostname === '::1'\n  || /^10\\./.test(hostname)\n  || /^192\\.168\\./.test(hostname)\n  || /^169\\.254\\./.test(hostname)\n  || /^172\\.(1[6-9]|2\\d|3[01])\\./.test(hostname);\nif (privateHost) throw new Error('targetUrl must resolve to a public host');\n\nreturn [{ json: { targetUrl: target.toString(), objective } }];\n"
      },
      "id": "98f56bd3-526d-41f8-82c6-d5a96279df3c",
      "name": "Validate Public Target",
      "type": "n8n-nodes-base.code",
// ... truncated (copy to see full JSON)

How to Import This Workflow

  1. 1Copy the workflow JSON above using the Copy Workflow JSON button.
  2. 2Open your n8n instance and go to Workflows.
  3. 3Click Import from JSON and paste the copied workflow.

Don't have an n8n instance? Start your free trial at n8nautomation.cloud

Related Templates

Automated n8n Workflow Backup to GitHub Repository

Overview This workflow automatically backs up every workflow in your n8n instance to a dedicated GitHub repository. It runs on a configurable schedule (or manually) and ensures that all your workflow JSON files are version-controlled and safely stored in a structured folder. The backup process intelligently handles both new workflows (creates a file) and existing ones (updates the file), making it ideal for disaster recovery, collaboration, or tracking changes over time. Step-by-Step Node Breakdown Schedule Trigger (No additional auth) — Triggers the workflow on a recurring interval. By default it runs hourly, but you can customize the schedule (e.g., daily at midnight) to suit your needs. Also supports manual execution via the Manual Trigger node. Manual Trigger (No auth) — Provides a manual button to run the backup immediately, useful for testing or on-demand backups. Get many workflows (Internal n8n API, no external credentials) — Fetches a list of all workflows from your n8n instance using the built-in n8n node. No separate API key is required; it uses the same authentication as your n8n session. Loop Over Items (No auth) — Iterates over each workflow in the list one at a time. This node processes workflows sequentially, preventing race conditions. Getafile (GitHub, OAuth2 / Personal Access Token) — Attempts to retrieve the existing workflow file from your GitHub repository at the path . If the file does not exist (i.e., a new workflow), the node’s error output is triggered. The expression in sanitizes the workflow name by replacing invalid characters (), converting to , and normalizing spaces. Convert to File1 (No auth) — Converts the retrieved GitHub file’s binary data back to a JSON object so it can be compared or overwritten. Extract from File1 (No auth) — Extracts the JSON content from the binary file, preparing it for an update operation. Edit a file (GitHub, OAuth2 / Personal Access Token) — If the workflow already exists on GitHub, this node updates the file with the latest JSON from your n8n instance. The commit message is dynamically generated (e.g., ). Convert to File (No auth) — Converts the current n8n workflow JSON into a binary file () with the workflow’s name as the filename. Create a file (GitHub, OAuth2 / Personal Access Token) — If the workflow is new (i.e., error output), this node creates a new file in the folder. The commit message includes the workflow name and . The workflow loops back to the Loop Over Items node to process the next workflow. The Sticky Note at the top serves as a comment. Setup Instructions GitHub account — You need a GitHub account and a repository (e.g., ) to store the backups. Create an empty repository or use an existing one. GitHub credential in n8n — Add a GitHub OAuth2 or Personal Access Token credential in n8n under Credentials > GitHub. Ensure the token has scope (or at least and ). Configure the nodes — - In Get many workflows, no changes needed. - In Getafile, Create a file, and Edit a file, update the and fields to match your GitHub username and repo name. - Optionally adjust the Schedule Trigger interval (set hours/minutes as desired). Error handling — The workflow references an external error workflow (). If you don’t have that, you should either create a simple error handler or remove the setting in the workflow settings. Use Cases & Adaptations Disaster recovery — Restore all workflows by downloading the JSON files from GitHub and importing them back into n8n. Version history — Track changes to workflows over time via GitHub commits and diffs. Multi-instance sync — Modify the workflow to run on multiple n8n instances, pushing to the same repo (be cautious with conflicts). Selective backup — Add a filter node after to only backup workflows with a specific tag or name pattern. Notification — Insert a Slack or email node after the loop to notify you when a backup completes or if an error occurs.

11 nodes

n8n Upgrade: Detect Affected Workflows with Broken Connections

Summary This workflow helps n8n administrators identify workflows that may have been affected by a past upgrade (specifically n8n version ) where multi-output nodes (like , , ) could have their output connections accidentally re-wired. It provides a self-service webhook endpoint that returns an HTML report listing all workflows with potentially broken connections, making it easy to audit and fix them. Node-by-Node Walkthrough Webhook (No auth) — Listens for HTTP GET requests at the path . When a user visits this URL in their browser, the workflow is triggered. The response mode is set to "Response Node", meaning the final output will be sent back directly. Get all workflows (API Key auth) — Uses the n8n API to fetch all workflows from the instance. You must configure this node with an n8n API credential (a personal access token created under Settings > n8n API). The node has no filters, so it retrieves every workflow. Parse potentially affected workflows (Code node, no auth) — A JavaScript code node that loops through each workflow, inspects its connections, and checks if any multi-output node (defined in the array) has empty outputs. If a node has fewer connected outputs than expected, it is flagged as potentially affected. The node outputs a JSON object with an array of affected workflows, each containing , , , and . Generate Report (HTML node, no auth) — Creates a static HTML document with a styled container, a heading, and an empty list. This serves as the shell for the interactive report generated by the next node. Serve HTML Report (Respond to Webhook node, no auth) — Takes the HTML template from the previous node and injects JavaScript that parses the affected workflows data (from the code node) and dynamically builds a list of clickable links. Each link opens the workflow in a new tab so the admin can inspect and fix the connections. The response headers are set to . Setup Instructions Prerequisites: You must have admin access to the n8n instance (the workflow must be run by the instance owner). Create an n8n API key: Go to Settings > n8n API in your n8n instance and generate a personal access token. Copy the token. Configure the "Get all workflows" node: Add an n8n credential of type "API Key" and paste the token. Leave the filters empty. Customize multi-output nodes (if needed): The code node contains a list with the default nodes (, , ). If you have community nodes with multiple outputs, add them to this array with their correct output count. Activate the workflow: Toggle the workflow to active. Use the report: Open your browser and navigate to . The page will list all affected workflows. Click on a row to open the workflow in a new tab — inspect the connections and re-wire them if needed. Use Cases & Variations Post-upgrade audit: Run this workflow after every n8n upgrade to catch connection issues early. Customized detection: Extend the array in the code node to include any custom node type that has multiple outputs. Slack/Email notification: Instead of serving an HTML report, you could send the list of affected workflows to a Slack channel or email using additional nodes. Scheduled scanning: Replace the Webhook trigger with a Schedule trigger to run the check daily and automatically notify the admin.

9 nodes

Weekly Zigbee2MQTT Backup to SFTP Server

Overview This workflow automates the weekly backup of your Zigbee2MQTT configuration. It triggers every Monday at 2:45 AM, sends a backup request to the Zigbee2MQTT bridge via MQTT, waits for the response containing a base64-encoded ZIP file, decodes it, and uploads the backup to an SFTP server. The workflow includes error handling to stop execution and log failures if anything goes wrong. This is ideal for home automation enthusiasts or administrators who want to ensure their Zigbee network configuration is safely archived off-site or on a central server. Node Breakdown CRON Monday 2:45 am () — No auth. Runs the workflow every Monday at 02:45 AM using the cron expression . This ensures backups happen automatically without manual intervention. Send Zigbee2MQTT backup request () — MQTT Client credentials (broker URL, port, username/password). Publishes the message to the topic . This triggers the Zigbee2MQTT bridge to generate a backup. MQTT Trigger - Backup Response () — MQTT Trigger credentials (same broker). Listens on the topic for the backup data. The trigger waits for a message and passes it to the next node. Parse JSON Object from Message Text () — No auth. Runs JavaScript to parse the incoming MQTT message, extracting the nested field from the JSON payload. This isolates the base64-encoded ZIP content. Convert to File - base64 to binary () — No auth. Takes the property from the parsed JSON (which contains the base64 string) and converts it to a binary file. The output is a ZIP file ready for upload. SFTP zip file content () — SFTP credentials (username/password or private key). Uploads the generated ZIP file to the specified SFTP server path: . The filename includes a timestamp with colons replaced by underscores. Error Handler () — No auth. If any node above fails, this node stops the workflow with the message . It acts as a safety net to prevent partial or corrupted backups. Setup Instructions SFTP Server: You need an SFTP server (e.g., a NAS, cloud VM, or any SSH‑enabled server). Create a user account and note the host, port, username, and password/private key. In n8n, configure an SFTP credential with these details. MQTT Broker: You need a running MQTT broker (e.g., Mosquitto). The workflow connects to the same broker that your Zigbee2MQTT instance uses. In n8n, create an MQTT credential with broker URL, port, username, and password. Zigbee2MQTT: Ensure your Zigbee2MQTT bridge is accessible via MQTT and that it supports the backup request feature (Zigbee2MQTT must be running and connected to the same broker). n8n Configuration: Import this workflow into your n8n instance. Update the SFTP path if needed, and verify the cron schedule matches your desired backup day/time (currently Monday 2:45 AM). Test: Run the workflow manually once to confirm the backup process completes without errors. Check your SFTP server for the uploaded ZIP file. Use Cases & Variations Home Automation Backup: Regularly archive Zigbee network configuration to recover from device failures or coordinator changes. Off-Site Redundancy: Replace the SFTP node with a cloud storage node (e.g., Google Drive, AWS S3) for off‑site backups. Notification on Success/Failure: Add a Telegram or email node after the SFTP upload to inform you of backup completion or errors. Multiple Backup Destinations: Chain additional FTP nodes to send the backup to multiple locations. Different Schedule: Change the cron expression to run daily, or at a specific time on multiple days (e.g., for Monday and Friday).

7 nodes

Ready to automate with n8n?

Get affordable managed n8n hosting with 24/7 support.