Monitor Facebook post safety with Apify, Google Gemini and Telegram alerts
Monitor Facebook Pages and Analyze Content Safety via Telegram  This n8n template automates the collection, storage, and safety analysis of Facebook posts while...
Template notes
Monitor Facebook Pages and Analyze Content Safety via Telegram 
This n8n template automates the collection, storage, and safety analysis of Facebook posts while simultaneously providing an interactive AI assistant on Telegram.
If you manage communities or brand pages and need to stay instantly informed about toxic content while having a smart assistant to answer quick operational queries, this workflow is perfect for you.
How it works
Interactive Chatbot (Trigger): The Telegram Trigger listens for direct messages. An AI Agent (powered by Google Gemini) processes the input using MongoDB for conversation memory and custom tools (like SerpAPI) for deep research. Data Scraping (Schedule): A Schedule Trigger runs every 3 hours to fetch the latest posts from your specified Facebook page using the Apify Facebook Scraper. Data Normalization & Storage: Extracted posts are normalized and upserted into an n8n Data Table. This prevents duplicate processing of the same posts in future runs. Safety Analysis: Post text and downloaded images are merged and sent to a secondary AI Agent. The AI evaluates the context and user reactions to flag the content as "Safe" or "Toxic". Smart Notification: The safety report is beautifully formatted using Telegram HTML and dispatched directly to the admin's Telegram inbox.
How to use
1. Connect your Telegram Bot API credentials in both the Telegram Trigger and Send nodes. 2. Connect your Google Gemini API key in all Language Model nodes. 3. Connect your Apify API credentials and SerpAPI key. 4. Configure your MongoDB connection for the chat memory nodes. 5. Create an n8n Data Table (e.g., facebooknewsdb) with a postId column (Number) and update the Data Table Upsert node to select your table. 6. Customize the Set Context (Chat) and Set Context (Scraper) nodes with your specific details (Telegram Admin ID, Facebook Page URL, Bot Name). 7. Activate the workflow and let the automation run.
