## Introduction
In fast-growing startups and operations teams, maintaining an up-to-date internal knowledge base or wiki is crucial for efficient workflows, onboarding, and reducing repeated questions. However, manually creating and updating wiki pages can be tedious and error-prone. Automating this process ensures that critical documentation is created on time, consistent in format, and easily accessible.
This guide explains how to build an automation workflow using **n8n**, an open-source automation tool, to auto-create internal wiki pages whenever new topics or projects are initiated. This solution benefits operations specialists, documentation engineers, and startup teams by streamlining the creation and management of internal documentation.
—
## Use Case and Problem Statement
**Problem:** When new projects, processes, or operational procedures start, responsible team members often forget or delay creating the corresponding wiki pages. This leads to fragmented knowledge sharing, inconsistent documentation standards, and time lost repeating explanations.
**Benefit:** Automating wiki page creation triggered by project management tools or form submissions ensures documentation happens in parallel with operations activities. It standardizes the initial page format and reduces manual effort.
## Tools and Services Integrated
– **n8n:** Automation workflow builder.
– **Google Forms:** Capture new project or topic requests from team members.
– **Google Sheets:** Acts as a database for project metadata.
– **Confluence (Atlassian):** Internal wiki platform where pages will be auto-created.
– **Slack:** Optional, to notify the team when a new page is created.
## How the Workflow Works (Trigger to Output)
1. **Trigger:** New row submission from Google Sheets populated by Google Forms.
2. **Workflow Steps:**
    – Parse new project/topic info.
    – Format the content and metadata.
    – Create a new Confluence wiki page under a specific space or parent page.
    – Send a Slack notification with the new page link.
## Step-by-Step Tutorial to Build the Workflow with n8n
### Prerequisites
– Have access to a Confluence workspace with API tokens configured.
– Google Forms and Sheets connected and shared appropriately.
– Slack workspace with a bot to send notifications.
– n8n instance set up (self-hosted or cloud).
### Step 1: Set Up Google Form for Wiki Page Requests
– Create a Google Form to capture necessary info like:
  – Page title
  – Project description or summary
  – Owners or contributors
– Link the Google Form responses to a Google Sheet.
### Step 2: Configure n8n Trigger for Google Sheets
– In n8n, add the **Google Sheets Trigger** node.
– Connect it to the Google Sheet linked to your form responses.
– Configure polling or webhook to detect new rows.
### Step 3: Add a Node to Extract and Format the Data
– Add a **Set** or **Function** node after the trigger.
– Extract fields like `page title`, `description`, and `owners` from the new row’s data.
– Use JavaScript within the Function node to format the content in Confluence’s storage format (usually XHTML).
– Example format:
“`javascript
return [{
  title: items[0].json[‘Page Title’],
  content: `
${items[0].json[‘Description’]}
Owners: ${items[0].json[‘Owners’]}
`
}];
“`
### Step 4: Create the Wiki Page in Confluence
– Add an **HTTP Request** node to n8n.
– Configure it to POST a request to the Confluence API endpoint `/wiki/rest/api/content`.
– Authentication: Use Basic Auth with API token or OAuth, depending on your setup.
– Body example in JSON:
“`json
{
  “type”: “page”,
  “title”: “{{ $json.title }}”,
  “space”: { “key”: “OPS” },
  “body”: {
    “storage”: {
      “value”: “{{ $json.content }}”,
      “representation”: “storage”
    }
  },
  “ancestors”: [{ “id”: “123456” }]
}
“`
– Use n8n expressions to insert dynamic values.
### Step 5: Parse Response and Get New Page Link
– Capture the Confluence API response to get the new page ID.
– Construct a URL like `https://your-domain.atlassian.net/wiki/pages/viewpage.action?pageId={pageId}`.
### Step 6: Optional Slack Notification Node
– Add a **Slack** node.
– Configure it to post a message to a channel or DM.
– The message can include the page title and URL.
### Step 7: Connect All Nodes and Activate Workflow
– Connect nodes in sequence:
  Google Sheets Trigger → Function/Set → HTTP Request (Confluence) → Slack Notification
– Test the workflow by submitting entries on the Google Form.
## Common Errors and Tips for Robustness
– **Authentication errors:** Ensure API tokens have the right scope and are refreshed.
– **Rate-limiting:** Add delays or error handling to respect Confluence API limits.
– **Data validation:** Add nodes to check for missing or invalid fields before creating pages.
– **Error handling:** Use n8n’s error triggers and add fallback notifications for failures.
– **Concurrency:** Prevent multiple pages for the same project by checking existing pages before creation.
## How to Adapt or Scale the Workflow
– **Add more input sources:** Trigger wiki creation from Jira issues, Trello cards, or Slack slash commands.
– **Expand wiki templates:** Include sections for FAQs, SOPs, and checklists.
– **Automated updates:** Integrate periodic review reminders or auto-update pages with new data.
– **Multi-language support:** Use translation nodes to generate pages in different languages.
– **Analytics:** Log created pages in Google Sheets or databases for tracking documentation growth.
## Summary
Automating the creation of internal wiki pages saves operations teams valuable time and helps maintain consistent, updated documentation. Using n8n combined with common workspace tools like Google Forms, Google Sheets, and Confluence provides a flexible and powerful automation solution. By following this step-by-step tutorial, your team can ensure new projects and operational knowledge are captured and shared immediately without manual intervention.
—
### Bonus Tip: Using Templates for Wiki Pages
To ensure consistency, create a standard template for new pages that includes placeholders for key information like project goals, team members, deadlines, and resources. Use n8n’s template injection capabilities in your Function node to dynamically populate this template. This approach promotes uniformity and high-quality documentation across your organization.