📱 Pick a daily Facebook comment contest winner with OpenAI, Airtable and Telegram

⚡ 98 views · 📱 Social Media & Email Marketing

💡 Pro Tip — If you’ve run into Facebook’s Graph API permission restrictions, ScraperNode is a community node that scrapes pages, groups, posts, and comments directly — no app review needed.

View All Scrapers

Description

Community Contest Tracker (FB Comments) → Sentiment Analysis → Telegram Winner Alerts + Airtable Proof

This workflow automatically monitors a Facebook post, extracts comments, enforces a “past winner” blocklist, analyzes sentiment using AI to find positive entries, randomly selects a winner, stores them in Airtable and announces the result via Telegram.

This workflow runs every night to manage your daily community giveaways. It fetches fresh comments from a specific Facebook post and cross-references users against a list of previous winners stored in Airtable to ensure fairness. It uses OpenAI to filter for genuinely positive sentiment (removing spam), selects a random winner, saves the record and sends a celebratory announcement to your Telegram channel.

You receive:

Ideal for community managers and brand owners who want to run fair, high-engagement contests without manually reading hundreds of comments or tracking past winners in spreadsheets.

Quick Start – Implementation Steps

  1. Add your Facebook Graph API Credentials in the HTTP Request node.
  2. Connect and configure your Airtable base (Winners Table).
  3. Add your OpenAI API Key for sentiment analysis.
  4. Connect your Telegram Bot credentials and set the Chat ID.
  5. Update the Post ID in the “Get FB Comments” node.
  6. Activate the workflow — daily contest automation begins instantly.

What It Does

This workflow automates the entire lifecycle of a social media contest:

  1. Daily Trigger: Runs automatically at 9:00 PM every day.
  2. Data Ingestion: Fetches the latest comments from Facebook and the full list of past winners from Airtable simultaneously.
  3. Pre-Processing:
    • Creates a blocklist of users who won in the last 30 days.
    • Filters out spam, short comments (e.g., single emojis) and blocklisted users.
  4. AI Analysis:
    • Uses GPT-4o-mini to analyze the text of eligible comments.
    • Filters specifically for “Positive” sentiment.
  5. Selection: Randomly picks one winner from the pool of positive comments.
  6. Storage: Saves the winner’s Name, Facebook ID and Comment to Airtable.
  7. Notification:
    • Sends a “Winner Announcement” to your public Telegram channel.
    • If any errors occur (e.g., DB save fail), logs them to Supabase and alerts the Admin.

This ensures your contests are fair, spam-free and consistently managed with zero manual effort.

Who’s It For

This workflow is ideal for:

To run this workflow, you will need

How It Works

  1. Daily Trigger – The schedule node initiates the process.
  2. Fetch Data – Comments are pulled from FB; Winners pulled from Airtable.
  3. Code Filter – JavaScript node removes past winners and low-quality spam.
  4. Sentiment Analysis – AI determines if the comment is Positive, Neutral or Negative.
  5. Pick Winner – A randomized logic block selects one “Positive” user.
  6. Record Keeping – The winner is officially logged in your database.
  7. Broadcast – The winner is announced to the community via Telegram.

Setup Steps

  1. Import the provided n8n JSON file.
  2. Open Get FB Comments node → Add credentials and paste your specific Post ID.
  3. Open Get Past Winners node → Link to your Airtable “Winners” table.
  4. Open OpenAI Chat Model node → Add your API Key.
  5. Open Create a record (Airtable) → Map the fields:
    • Name
    • Facebook ID
    • Date
  6. Open Send a text message (Telegram) → Add your Chat ID (e.g., @mychannel).
  7. Activate the workflow — done!

How To Customize Nodes

Customize Filtering Logic

Modify the Pre-Filter (Blocklist) Code node:

Customize AI Criteria

Modify the Sentiment Analysis or OpenAI prompt:

Customize Notifications

Replace Telegram with:

Customize Storage

Replace Airtable with:

Add-Ons (Optional Enhancements)

You can extend this workflow to:

Use Case Examples

1. Daily Product Giveaways

Reward one user every day who comments why they love your product.

2. Feedback Drives

Encourage users to leave constructive feedback and reward the most helpful positive comment.

3. Community Engagement

Keep your group active by automating “Best Comment of the Day” rewards.

4. Brand Loyalty Programs

Track “Super Fans” by counting how many times they participate (even if they don’t win).

Troubleshooting Guide

IssuePossible CauseSolution
No comments foundInvalid Post ID or TokenCheck Facebook Graph API token and Post ID.
No winner selectedNo positive commentsAI found no “Positive” sentiment. Check prompt or input data.
Airtable ErrorField MismatchEnsure column names in Airtable match exactly (Name, Facebook ID).
Telegram ErrorBot PermissionsEnsure the Bot is an Admin in the channel.
Workflow StuckAPI Rate LimitCheck OpenAI or Facebook API usage limits.

Need Help?

If you need help customizing or extending this workflow, adding multi-platform support (Instagram/YouTube), integrating complex prize logic or setting up advanced dashboards, feel free to hire n8n automation developers at WeblineIndia. We are happy to assist you with advanced automation solutions.

đź”— Nodes Used

Airtable, HTTP Request, Telegram, Supabase, Schedule Trigger, OpenAI Chat Model

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup