Skip to main content

Reply to Facebook ad comments with OpenRouter AI, Google Docs and Slack

Workflow preview

Workflow preview
100%
Reply to Facebook ad comments with OpenRouter AI, Google Docs and Slack preview
Open on n8n.io

1. Workflow Overview

Every comment on your Facebook ad is a sales opportunity. But manually replying to dozens of comments every day in the right tone, in the right language, at the right speed is simply not scalable. ...

Best for

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

Tools used

n8n-nodes-base.webhook, n8n-nodes-base.httprequest, @n8n/n8n-nodes-langchain.lmchatopenrouter, n8n-nodes-base.filter, n8n-nodes-base.switch, n8n-nodes-base.set, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.googledocstool

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Reply to Facebook ad comments with OpenRouter AI, Google Docs and Slack
Workflow name
Reply to Facebook ad comments with OpenRouter AI, Google Docs and Slack

Every comment on your Facebook ad is a sales opportunity. But manually replying to dozens of comments every day - in the right tone, in the right language, at the right speed - is simply not scalable.

This workflow deploys an AI agent that watches your boosted Facebook posts 24/7, classifies every incoming comment, and instantly posts a smart public reply - so your ads stay engaged, your leads get answered, and your team only steps in when it truly matters.


🚨 The Problem This Solves

When businesses and agencies run Facebook Ads, comments pile up fast:

  • Queries go unanswered for hours, killing purchase intent
  • Positive reviews get ignored, wasting social proof
  • Negative reviews stay public with no response, damaging brand trust
  • Spam clutters the thread, making the brand look unmonitored
  • Manual replies are slow, inconsistent, and cost agency time

This workflow eliminates all four problems automatically — with zero manual effort for routine engagement and instant alerts for anything that needs a human touch.


⚙️ How It Works

  1. Webhook fires every time someone comments on your Facebook page
  2. Filter skips comments by the page owner and ignores non-boosted organic posts — only real comments on active ad posts continue
  3. Get Comment Details fetches the full comment text from the Facebook Graph API
  4. Skip Attachments drops GIF, sticker, and image-only comments — only text comments are processed
  5. Get Post Data fetches the original ad post text so the AI understands the context
  6. AI Classifier reads both the ad and the comment together, then classifies into: QUERY · POSITIVE_REVIEW · NEGATIVE_REVIEW · SPAM
  7. Switch routes each classification to the right action branch
  8. AI Reply Generator writes a warm, human-sounding public reply — automatically in the commenter's own language (English / Urdu / mixed) and searches your Google Docs Knowledge Base for accurate answers to queries
  9. Reply to Comment posts the reply publicly on Facebook via Graph API
  10. Slack Alert sends your team a full notification with commenter name, comment text, post link, and comment link — for every negative review that needs a manual response

✅ Key Benefits

  • Always-on engagement: Replies post instantly, day or night, no human needed
  • Context-aware AI: Reads the ad post AND the comment together before classifying — not just the comment alone
  • Multilingual replies: Automatically matches the language of the commenter — English, Urdu, or mixed — without any configuration
  • Knowledge Base powered: Queries are answered using your own pricing, FAQs, and service info stored in Google Docs — no hallucinated answers
  • Smart escalation: Negative reviews never get an auto-reply — your team is alerted on Slack immediately with full context
  • Spam-proof: Attachment comments and spam are silently ignored, keeping your workflow clean and cost-efficient

🛠️ Setup Steps

  1. Subscribe your Facebook Page to webhook feed events and paste the webhook URL
  2. Add your Facebook Graph API access token to the Query Auth credential
  3. Add your OpenRouter API credential (used for both classification and reply generation)
  4. Create a Google Doc with your agency's FAQs, services, and pricing — paste the document ID into the Knowledge Base node
  5. Connect your Slack account and update the Slack user ID in the Inform User node to the right team member
  6. In the Filter node, replace your page name with your actual Facebook page name

⏱️ Estimated setup time: 20–30 minutes


📋 Requirements

  • Facebook Page with webhook subscription (feed changes)
  • Facebook Graph API access token
  • OpenRouter account (LLM — supports all major models)
  • Google Docs account (Knowledge Base document)
  • Slack account (for negative review alerts)

For assistance and support: [email protected] Linkedin: https://www.linkedin.com/in/salman-mehboob-pro/

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 - Webhook

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2.1

Block 2 - Get Commnet Details

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 3 - Get FB Post Data

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 4 - OpenRouter Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenRouter - lmChatOpenRouter
Config choices
Version 1

Block 5 - Filleter Author Comment and Reqular Post

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

Block 6 - Switch

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.4

Block 7 - Clean Data

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 8 - Comment Classifier

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3.1

Block 9 - Knowledge Base

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

Block 10 - Comment Generator

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3.1

Block 11 - Reply to Comment

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 12 - Inform User

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

Block 13 - Skip If Coment Contains Attachment

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.4

Block 14 - Sticky Note

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

Block 15 - Sticky Note1

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

Block 16 - Sticky Note2

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

Block 17 - Sticky Note3

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

Block 18 - Sticky Note4

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

Block 19 - Sticky Note5

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

Block 20 - Structured Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

3. Summary Table

Workflow Reply to Facebook ad comments with OpenRouter AI, Google Docs and Slack
Complexity advanced
Nodes 20
Categories Social Media, AI Chatbot
Author Salman Mehboob
Published 04 Apr 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/14711/14711.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 Reply to Facebook ad comments with OpenRouter AI, Google Docs and Slack do?

Every comment on your Facebook ad is a sales opportunity. But manually replying to dozens of comments every day in the right tone, in the right language, at the right speed is simply not scalable. ...

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 Chatbot use case.