Skip to main content

Track Facebook mention sentiment with Gemini, Supabase, Telegram and Slack

Workflow preview

Workflow preview
100%
Track Facebook mention sentiment with Gemini, Supabase, Telegram and Slack preview
Open on n8n.io

1. Workflow Overview

Facebook Mention Sentiment Tracker with Gemini, Supabase, Telegram & Slack This workflow automatically tracks Facebook page mentions, analyzes sentiment using AI (Gemini), stores the data in Supaba...

Best for

  • Social Media automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.facebooktrigger, @n8n/n8n-nodes-langchain.googlegemini, n8n-nodes-base.code, n8n-nodes-base.supabase, n8n-nodes-base.if, n8n-nodes-base.telegram, n8n-nodes-base.slack, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by WeblineIndia.

Original n8n.io source

1.1 Workflow description

Title
Track Facebook mention sentiment with Gemini, Supabase, Telegram and Slack
Workflow name
Track Facebook mention sentiment with Gemini, Supabase, Telegram and Slack

Facebook Mention Sentiment Tracker with Gemini, Supabase, Telegram & Slack

This workflow automatically tracks Facebook page mentions, analyzes sentiment using AI (Gemini), stores the data in Supabase and sends alerts via Telegram and Slack. Positive mentions are shared on Telegram, while critical or negative mentions trigger Slack alerts for immediate attention. It also handles storage failures by notifying via Telegram.

Quick Start (Implement in Minutes)

  1. Login to your n8n account.
  2. Connect your Facebook Page to the trigger node.
  3. Configure Gemini API credentials for sentiment analysis.
  4. Set up Supabase and create a mentions table.
  5. Add Telegram bot credentials for notifications.
  6. Connect Slack and choose a channel for alerts.
  7. Test with sample data and activate the workflow.

What It Does

This workflow listens for new Facebook Page mentions in real time. When a mention is received, it sends the message to an AI model (Gemini) to analyze sentiment (positive, neutral or negative) and extract the main topic. The response is cleaned and structured into a consistent JSON format for further processing.

After processing, the workflow stores the mention data in Supabase for tracking and analytics. It then evaluates the sentiment and content of the message to determine the next action. Positive mentions are shared with your team via Telegram to highlight customer satisfaction.

For risk management, the workflow detects critical keywords (like refund, bug, slow, cancel) and also checks if the sentiment is negative. If either condition is met, a Slack alert is triggered so your team can take immediate action. Additionally, if storing data in Supabase fails, a Telegram alert is sent to notify about the issue.

Who It's For

  • Social media managers monitoring brand mentions
  • Customer support teams handling complaints
  • Product teams tracking user feedback
  • Startups and agencies managing multiple clients
  • Businesses wanting real-time alerting on customer sentiment

Requirements to Use This Workflow

  • n8n account (self-hosted or cloud)
  • Facebook Developer App with Page access
  • Google Gemini API credentials
  • Supabase account and project
  • Telegram Bot Token & Chat ID(s)
  • Slack workspace with API access
  • Basic understanding of n8n nodes and credentials

How It Works

  1. The workflow starts when a new Facebook mention is detected.
  2. The message is sent to Gemini AI for sentiment and topic analysis.
  3. The AI response is cleaned and normalized into structured JSON.
  4. The processed data is stored in Supabase.
  5. If sentiment is positive → Telegram notification is sent.
  6. Keywords are checked to detect critical intent.
  7. If sentiment is negative OR keywords match → Slack alert is triggered.
  8. If Supabase storage fails → Telegram error alert is sent.

Setup Instructions

  1. Facebook Trigger
  • Configure Facebook App ID.
  • Enable webhook for Page mentions.
  • Ensure required permissions are granted.
  1. Gemini Node
  • Add Google Gemini API credentials.
  • Use any model (default: gemini-2.5-flash).
  • Ensure output is structured JSON.
  1. Code Node (Clean AI Response)
  • Keep existing logic to extract and normalize AI response.
  1. Supabase Node
  • Create a mentions table.

  • Add fields:

  • message, sentiment, topic, user_name, created_time, confidence

  • Connect using Supabase credentials.

  1. Telegram Nodes
  • Add bot token.

  • Use different chat IDs for:

  • Positive mentions

  • Error alerts (recommended)

  1. Slack Node
  • Connect Slack workspace.
  • Select a channel for critical alerts.
  1. IF Nodes
  • Configure:

  • Positive sentiment check

  • Critical/negative condition routing

  1. Test Workflow
  • Use mock or pinned data.
  • Verify Telegram and Slack alerts.
  • Activate workflow.

How To Customize Nodes

  • Gemini Node

  • Change model (e.g., advanced models for better accuracy)

  • Modify prompt to extract more fields (intent, urgency, etc.)

  • Keyword Detection

  • Update keywords array:

["refund", "cancel", "bug", "slow"]
  • Add business-specific terms

  • Slack संदेश

  • Customize alert format

  • Add priority levels or tagging

  • Telegram Messages

  • Adjust formatting (Markdown, emojis, structure)

  • Supabase

  • Add more columns if needed (e.g., region, category)

Add-ons (Extend This Workflow)

  • Add sentiment trend dashboard (via Supabase + BI tools)
  • Auto-create support tickets (Zendesk, Freshdesk)
  • Email alerts for high-priority issues
  • Auto-reply system for Facebook comments
  • Weekly analytics report via email or Slack
  • AI-based response suggestions for support team

Use Case Examples

  1. Detect and respond instantly to refund complaints
  2. Monitor brand reputation across social media
  3. Highlight positive feedback for marketing teams
  4. Escalate urgent issues to internal teams via Slack
  5. Build a centralized database of customer feedback

There can be many more use cases depending on your business needs.

Troubleshooting Guide

Issue Possible Cause Solution
No Facebook data Webhook not configured Check Facebook App & permissions
AI not returning data Incorrect prompt or API issue Verify Gemini configuration
Supabase insert fails गलत credentials or schema mismatch Check table structure & API key
Telegram not sending Wrong bot token or chat ID Verify credentials
Slack alert not triggered Condition mismatch Check IF node logic
Keywords not detected Case mismatch or logic error Ensure .toLowerCase() is used

Need Help?

If you need help setting up this workflow or want to extend it with advanced features like automation, dashboards or integrations then our n8n workflow development team at WeblineIndia can assist you.

We can help you:

  • Customize this workflow for your business
  • Integrate additional tools (CRM, Helpdesk, Analytics)
  • Build scalable automation systems using n8n

Reach out to WeblineIndia to get started with tailored automation solutions.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Facebook Mention Received

Type / Role
n8n-nodes-base.facebookTrigger - facebookTrigger
Config choices
Version 1

Block 2 - Sentiment & Topic Analysis

Type / Role
@n8n/n8n-nodes-langchain.googleGemini - googleGemini
Config choices
Version 1.1

Block 3 - Clean AI Response

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 4 - Store Mention (Supabase)

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 5 - Is Positive Sentiment?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.3

Block 6 - Telegram (Positive Mention)

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 7 - Storage Failure (Telegram)

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 8 - Keyword & Critical Detection

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 9 - Is Critical or Negative?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.3

Block 10 - Slack (Critical Mention)

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.4

Block 11 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Track Facebook mention sentiment with Gemini, Supabase, Telegram and Slack
Complexity advanced
Nodes 16
Categories Social Media, AI Summarization
Author WeblineIndia
Published 22 Apr 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/15235/15235.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Track Facebook mention sentiment with Gemini, Supabase, Telegram and Slack do?

Facebook Mention Sentiment Tracker with Gemini, Supabase, Telegram & Slack This workflow automatically tracks Facebook page mentions, analyzes sentiment using AI (Gemini), stores the data in Supaba...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Social Media, AI Summarization use case.