## Introduction
In product development, user feedback is invaluable for steering feature improvements and troubleshooting issues. Community forums often serve as a rich source of this feedback. However, manually sifting through posts, extracting feedback, and logging it into tracking systems is time-consuming and prone to error. Automating this process can help product teams quickly capture, organize, and act on community insights.
This article guides you through building an automation workflow using n8n, a powerful open-source automation tool, to automatically log user feedback from community forums. Specifically, we will demonstrate how to:
– Monitor posts on a popular community forum (e.g., Discourse-based forums)
– Extract relevant feedback data
– Log the feedback into a Google Sheets spreadsheet (or your preferred tracking tool)
– Send notifications to your product Slack channel
This workflow benefits product managers, customer success teams, and automation engineers by creating a streamlined pipeline from community input to actionable data.
—
## Tools and Services Integrated
– **n8n:** The automation platform orchestrating the workflow.
– **Community Forum API:** This tutorial assumes a Discourse forum with API access. Other forums may have similar API endpoints.
– **Google Sheets:** For centralized logging of feedback entries.
– **Slack:** To send feedback alerts in real-time to the product team.
—
## Workflow Overview
### What the Workflow Does
1. **Trigger:** Periodically poll the community forum to check for new posts or threads.
2. **Filter:** Identify posts containing user feedback (using keywords, tags, or categories).
3. **Extract:** Parse the post content, user details, and timestamp.
4. **Log:** Append extracted feedback as new rows in Google Sheets.
5. **Notify:** Send an informative Slack message to a product team channel.
—
## Step-By-Step Tutorial
### Prerequisites
– An n8n instance running (self-hosted or n8n.cloud).
– API credentials / access tokens for your community forum’s API.
– A Google account with a Google Sheet prepared for logging feedback.
– Slack workspace with a webhook URL or Slack app credentials.
### Step 1: Setup n8n Trigger
– **Node:** Cron
– **Purpose:** To poll the forum at a specified interval (e.g., every 15 minutes).
– **Configuration:** Set the Cron node to trigger periodically matching your team’s operational needs.
Example:
“`json
{
“cronTime”: “0 */15 * * * *”
}
“`
—
### Step 2: Fetch New Posts from the Forum
– **Node:** HTTP Request
– **Purpose:** Call the forum’s API to fetch recent posts or threads.
For Discourse forums, the REST API endpoint to get latest posts is usually `/posts.json` or `/latest.json`.
– **Method:** GET
– **URL:** “https://forum.example.com/latest.json” (replace with your forum URL)
– **Authentication:** Use API key/token headers as per your forum documentation.
– **Important Parameters:** If the API supports timestamp filters or pagination, use them to only retrieve new content since the last poll.
Example headers:
“`json
{
“Api-Key”: “YOUR_API_KEY”,
“Api-Username”: “system”
}
“`
– **Output:** JSON with posts data.
—
### Step 3: Filter Relevant Feedback Posts
– **Node:** Function
– **Purpose:** Process JSON response to isolate posts that represent feedback.
Implementation ideas:
– Filter by category IDs (e.g., “Feedback”)
– Filter posts containing keywords like “bug”, “feature request”, “problem”
Example Function code:
“`javascript
const posts = items[0].json.latest_topics || [];
const keywords = [“bug”, “feature request”, “issue”, “problem”];
const feedbackPosts = posts.filter(post => {
const content = (post.title + ” ” + (post.fancy_title || ”)).toLowerCase();
return keywords.some(keyword => content.includes(keyword));
});
return feedbackPosts.map(post => ({ json: post }));
“`
—
### Step 4: Extract and Structure Feedback Data
– **Node:** Set or Function
– **Purpose:** Pull out necessary fields such as post title, content, author username, post URL, and timestamp for logging.
Example:
“`javascript
return items.map(item => {
return {
json: {
title: item.json.title,
content: item.json.fancy_title || “”,
author: item.json.last_poster_username || “unknown”,
postUrl: `https://forum.example.com/t/${item.json.slug}/${item.json.id}`,
createdAt: item.json.created_at
}
};
});
“`
—
### Step 5: Append Feedback to Google Sheets
– **Node:** Google Sheets – Append Row
– **Purpose:** Log each feedback post as a new row for tracking and analysis.
– **Setup:**
– Connect your Google Account with n8n.
– Select the spreadsheet and worksheet where you want to save data.
– **Data Mapping:** Map the extracted fields from the previous step to corresponding columns, e.g.,
– Column A: Title
– Column B: Content
– Column C: Author
– Column D: Post URL
– Column E: Created Date
—
### Step 6: Send Notification to Slack
– **Node:** Slack – Post Message
– **Purpose:** Alert the product team to new feedback with key details.
– **Configuration:**
– Connect to Slack workspace.
– Choose the target channel.
– Craft a message, e.g.,
“`
New user feedback received:
*Title:* {{ $json.title }}
*Author:* {{ $json.author }}
*Link:* <{{ $json.postUrl }}>
*Submitted at:* {{ $json.createdAt }}
“`
This gives the product team real-time visibility.
—
### Step 7: Handle Duplicate Entries and Robustness
– **To avoid duplicates:**
– Implement a data store in n8n (with the built-in data store node) to keep track of processed post IDs.
– Before logging or notifying, check if the post ID exists in the data store.
– **Error Handling Tips:**
– Add error triggers globally in n8n to catch failures and send alerts.
– Use try/catch blocks in Function nodes to handle unexpected data.
– Identify API rate limits; implement exponential backoff or request throttling.
—
### Step 8: Scaling and Adaptation
– **Scaling for large forums:**
– Increase the polling interval or implement webhooks if the forum supports them.
– Batch process posts in chunks.
– Store feedback in a database instead of Google Sheets for higher volume.
– **Adapting to other forums:**
– Replace the HTTP request step with the appropriate API calls.
– Adapt filtering logic to forum-specific metadata.
– **Integrate with issue trackers:**
– Instead of or in addition to Google Sheets, create tickets in Jira, GitHub Issues, or Trello using n8n nodes.
—
## Summary
Automating the logging of user feedback from community forums empowers your product team to respond quickly to user needs without manual overhead. Using n8n’s flexible nodes, you can build a reliable pipeline from forum posts to structured feedback entries and real-time notifications. Implementing deduplication and error handling ensures robustness as your community grows. Finally, this workflow can be extended to integrate with various ticketing and analytics systems, making it adaptable to your team’s evolving needs.
—
## Bonus Tip
If your forum supports webhooks, consider configuring a webhook to n8n instead of polling with Cron. This allows your workflow to be event-driven, reducing latency and API calls. You can set up an HTTP webhook trigger node in n8n to receive real-time updates and process new feedback posts instantly.