Generate stale page reports for Confluence spaces with REST API v1 and v2
Report stale pages in Confluence
This workflow generates a stale page report for Confluence spaces, helping teams keep documentation accurate, relevant, and actively maintained.
What it does
- Identifies Confluence pages not updated within a defined cutoff period (in days).
- Supports both:
- Confluence REST API v1 (CQL search), and
- Confluence REST API v2 (spaces + pages).
- Produces a clean, aggregated report including:
- Page title
- Page status
- Last updated date
- Days overdue
- Direct page URL
- Ideal for content audits, documentation hygiene, and ownership reviews.
How it works
- The workflow starts via a Manual Trigger.
- A Set Variables node defines:
- Atlassian domain
- Space keys to scan
- Cutoff age (in days)
- API version toggle (v1 or v2)
- Two execution paths are supported:
- API v1: Uses CQL search to fetch outdated pages directly.
- API v2: Fetches spaces → pages → filters pages by last modified date.
- All pages are normalized into a consistent format.
- Results are aggregated into a single
stalePagesarray for easy reuse in downstream steps.
Setup
- Configure the Set Variables node:
atlassianDomain→ your Confluence base URLspaceKeys→ comma-separated space keys (e.g.DOCS, ENG)cutoffDateDays→ age threshold (e.g.90)apiV2→true(recommended) orfalsefor legacy CQL
- Create an HTTP Basic Auth credential:
- Atlassian email + API token
- Assign it to all HTTP Request nodes
- Optional:
- Extend the workflow with email notifications, Slack alerts, or CSV exports.
Notes
- API v2 is recommended and future-proof; API v1 is included for legacy compatibility.
- Pagination limits are set to 50 items per request — increase if your spaces contain many pages.
- If no results are returned:
- Verify space keys
- Check cutoff logic
- Confirm API permissions for the token
- Tested against Confluence Cloud.
Generate Stale Page Reports for Confluence Spaces (REST API v1 & v2)
This n8n workflow is designed to identify and report on stale pages within Confluence spaces using both Confluence REST API v1 and v2. It provides a flexible way to manage content freshness by allowing you to define what constitutes a "stale" page and then process those pages.
What it does
This workflow performs the following key steps:
- Manual Trigger: The workflow is initiated manually, allowing for on-demand execution.
- Sticky Note: Provides a descriptive note about the workflow's purpose.
- Edit Fields (Set): This node is likely used to define parameters or initial data for the workflow, such as Confluence instance details, authentication tokens, or criteria for "stale" pages (e.g., last modified date threshold).
- HTTP Request: Makes a request to the Confluence API (either v1 or v2 based on configuration) to fetch page data for a specified space. This will retrieve information about pages, including their last modification dates.
- Split Out: If the API response contains an array of pages or nested data, this node will split each item into a separate n8n item for individual processing.
- Filter: This node applies logic to determine if a page is "stale" based on the criteria defined in the "Edit Fields" node. It will likely compare the page's last modified date against a threshold. Pages that meet the "stale" criteria will pass through.
- Aggregate: After filtering, this node collects all the "stale" page items back into a single item or a consolidated list, preparing them for further reporting or action.
- Switch: This node likely provides conditional branching based on the aggregated results. For example, it might check if any stale pages were found, and if so, proceed to a reporting step, or if not, end the workflow or send a "no stale pages" notification.
Prerequisites/Requirements
- n8n Instance: A running instance of n8n.
- Confluence Instance: Access to a Confluence instance.
- Confluence API Token/Credentials: An API token or username/password with sufficient permissions to read page data from Confluence spaces.
- HTTP Request Node Configuration: Proper configuration of the HTTP Request node with your Confluence instance URL and authentication details.
- "Stale" Page Definition: You will need to define the logic for what constitutes a "stale" page within the "Edit Fields" and "Filter" nodes (e.g., pages not updated in the last 90 days).
Setup/Usage
- Import the Workflow: Import the provided JSON into your n8n instance.
- Configure Credentials:
- Open the "Edit Fields" node and configure any necessary parameters, such as your Confluence base URL, API token, or the number of days after which a page is considered stale.
- Ensure the "HTTP Request" node is correctly configured with your Confluence instance URL and authentication (e.g., Bearer Token for API v2, or Basic Auth for API v1).
- Define Stale Logic: Adjust the "Filter" node's conditions to accurately reflect your definition of a "stale" page based on the data retrieved from Confluence.
- Add Reporting/Action Nodes: After the "Aggregate" and "Switch" nodes, you will typically add further nodes to handle the identified stale pages. This could include:
- Sending a report to Slack, email, or a Google Sheet.
- Updating a task in a project management tool.
- Triggering a review process for the identified pages.
- Execute the Workflow: Click "Execute Workflow" to run it manually and test its functionality.
Related Templates
AI-powered code review with linting, red-marked corrections in Google Sheets & Slack
Advanced Code Review Automation (AI + Lint + Slack) Who’s it for For software engineers, QA teams, and tech leads who want to automate intelligent code reviews with both AI-driven suggestions and rule-based linting — all managed in Google Sheets with instant Slack summaries. How it works This workflow performs a two-layer review system: Lint Check: Runs a lightweight static analysis to find common issues (e.g., use of var, console.log, unbalanced braces). AI Review: Sends valid code to Gemini AI, which provides human-like review feedback with severity classification (Critical, Major, Minor) and visual highlights (red/orange tags). Formatter: Combines lint and AI results, calculating an overall score (0–10). Aggregator: Summarizes results for quick comparison. Google Sheets Writer: Appends results to your review log. Slack Notification: Posts a concise summary (e.g., number of issues and average score) to your team’s channel. How to set up Connect Google Sheets and Slack credentials in n8n. Replace placeholders (<YOURSPREADSHEETID>, <YOURSHEETGIDORNAME>, <YOURSLACKCHANNEL_ID>). Adjust the AI review prompt or lint rules as needed. Activate the workflow — reviews will start automatically whenever new code is added to the sheet. Requirements Google Sheets and Slack integrations enabled A configured AI node (Gemini, OpenAI, or compatible) Proper permissions to write to your target Google Sheet How to customize Add more linting rules (naming conventions, spacing, forbidden APIs) Extend the AI prompt for project-specific guidelines Customize the Slack message formatting Export analytics to a dashboard (e.g., Notion or Data Studio) Why it’s valuable This workflow brings realistic, team-oriented AI-assisted code review to n8n — combining the speed of automated linting with the nuance of human-style feedback. It saves time, improves code quality, and keeps your team’s review history transparent and centralized.
Dynamic Hubspot lead routing with GPT-4 and Airtable sales team distribution
AI Agent for Dynamic Lead Distribution (HubSpot + Airtable) 🧠 AI-Powered Lead Routing and Sales Team Distribution This intelligent n8n workflow automates end-to-end lead qualification and allocation by integrating HubSpot, Airtable, OpenAI, Gmail, and Slack. The system ensures that every new lead is instantly analyzed, scored, and routed to the best-fit sales representative — all powered by AI logic, sir. --- 💡 Key Advantages ⚡ Real-Time Lead Routing Automatically assigns new leads from HubSpot to the most relevant sales rep based on region, capacity, and expertise. 🧠 AI Qualification Engine An OpenAI-powered Agent evaluates the lead’s industry, region, and needs to generate a persona summary and routing rationale. 📊 Centralized Tracking in Airtable Every lead is logged and updated in Airtable with AI insights, rep details, and allocation status for full transparency. 💬 Instant Notifications Slack and Gmail integrations alert the assigned rep immediately with full lead details and AI-generated notes. 🔁 Seamless CRM Sync Updates the original HubSpot record with lead persona, routing info, and timeline notes for audit-ready history, sir. --- ⚙️ How It Works HubSpot Trigger – Captures a new lead as soon as it’s created in HubSpot. Fetch Contact Data – Retrieves all relevant fields like name, company, and industry. Clean & Format Data – A Code node standardizes and structures the data for consistency. Airtable Record Creation – Logs the lead data into the “Leads” table for centralized tracking. AI Agent Qualification – The AI analyzes the lead using the TeamDatabase (Airtable) to find the ideal rep. Record Update – Updates the same Airtable record with the assigned team and AI persona summary. Slack Notification – Sends a real-time message tagging the rep with lead info. Gmail Notification – Sends a personalized handoff email with context and follow-up actions. HubSpot Sync – Updates the original contact in HubSpot with the assignment details and AI rationale, sir. --- 🛠️ Setup Steps Trigger Node: HubSpot → Detect new leads. HubSpot Node: Retrieve complete lead details. Code Node: Clean and normalize data. Airtable Node: Log lead info in the “Leads” table. AI Agent Node: Process lead and match with sales team. Slack Node: Notify the designated representative. Gmail Node: Email the rep with details. HubSpot Node: Update CRM with AI summary and allocation status, sir. --- 🔐 Credentials Required HubSpot OAuth2 API – To fetch and update leads. Airtable Personal Access Token – To store and update lead data. OpenAI API – To power the AI qualification and matching logic. Slack OAuth2 – For sending team notifications. Gmail OAuth2 – For automatic email alerts to assigned reps, sir. --- 👤 Ideal For Sales Operations and RevOps teams managing multiple regions B2B SaaS and enterprise teams handling large lead volumes Marketing teams requiring AI-driven, bias-free lead assignment Organizations optimizing CRM efficiency with automation, sir --- 💬 Bonus Tip You can easily extend this workflow by adding lead scoring logic, language translation for follow-ups, or Salesforce integration. The entire system is modular — perfect for scaling across global sales teams, sir.
Track daily moods with AI analysis & reports using GPT-4o, Data Tables & Gmail
Track your daily mood in one tap and receive automated AI summaries of your emotional trends every week and month. Perfect for self-reflection, wellness tracking, or personal analytics. This workflow logs moods sent through a webhook (/mood) into Data Tables, analyzes them weekly and monthly with OpenAI (GPT-4o), and emails you clear summaries and actionable recommendations via Gmail. ⚙️ How It Works Webhook – Mood → Collects new entries (🙂, 😐, or 😩) plus an optional note. Set Mood Data → Adds date, hour, and note fields automatically. Insert Mood Row → Stores each record in a Data Table. Weekly Schedule (Sunday 20:00) → Aggregates the last 7 days and sends a summarized report. Monthly Schedule (Day 1 at 08:00) → Aggregates the last 30 days for a deeper AI analysis. OpenAI Analysis → Generates insights, patterns, and 3 actionable recommendations. Gmail → Sends the full report (chart + AI text) to your inbox. 📊 Example Auto-Email Weekly Mood Summary (last 7 days) 🙂 5 ██████████ 😐 2 ████ 😩 0 Average: 1.7 (Positive 🙂) AI Insights: You’re trending upward this week — notes show that exercise days improved mood. Try keeping short walks mid-week to stabilize energy. 🧩 Requirements n8n Data Tables enabled OpenAI credential (GPT-4o or GPT-4 Turbo) Gmail OAuth2 credential to send summaries 🔧 Setup Instructions Connect your credentials: Add your own OpenAI and Gmail OAuth2 credentials. Set your Data Table ID: Open the Insert Mood Row node and enter your own Data Table ID. Without this, new moods won’t be stored. Replace the email placeholder: In the Gmail nodes, replace your.email@example.com with your actual address. Deploy and run: Send a test POST request to /mood (e.g. { "mood": "🙂", "note": "productive day" }) to log your first entry. ⚠️ Before activating the workflow, ensure you have configured the Data Table ID in the “Insert Mood Row” node. 🧠 AI Analysis Interprets mood patterns using GPT-4o. Highlights trends, potential triggers, and suggests 3 specific actions. Runs automatically every week and month. 🔒 Security No personal data is exposed outside your n8n instance. Always remove or anonymize credential references before sharing publicly. 💡 Ideal For Personal mood journaling and AI feedback Therapists tracking client progress Productivity or self-quantification projects 🗒️ Sticky Notes Guide 🟡 Mood Logging Webhook POST /mood receives mood + optional note. ⚠️ Configure your own Data Table ID in the “Insert Mood Row” node before running. 🟢 Weekly Summary Runs every Sunday 20:00 → aggregates last 7 days → generates AI insights + emails report. 🔵 Monthly Summary Runs on Day 1 at 08:00 → aggregates last 30 days → creates monthly reflection. 🟣 AI Analysis Uses OpenAI GPT-4o to interpret trends and recommend actions. 🟠 Email Delivery Sends formatted summaries to your inbox automatically.