Free n8n flow

Ad comment triage

This workflow pulls recent comments from one Meta post, asks Claude to sort them, and drafts a reply. It does not post that reply. A person still chooses what goes live. It is free. There is no form on this page. You import it into your own n8n and run it there.

The flow file and setup help are in #freebies on our Discord.

How it works

The trigger in the file is When clicking Test, so you run it by hand until you swap in a schedule.

It reads a single post

Fetch Real Ad Comments calls the Graph API. It uses $env.META_ACCESS_TOKEN and $env.META_API_VERSION (or v21.0 if that version var is empty). The page id and post id are placeholders: YOUR_FACEBOOK_PAGE_ID and YOUR_POST_ID. It keeps up to 10 comments that have text.

Claude sorts each comment

Build Triage Request writes the prompt. For each comment, Claude (claude-haiku-4-5) returns a category, a sentiment, an action, a draft, and a short reason. The actions in the prompt are:

  • auto_reply for a plain question the draft can answer.
  • approve_to_post when the draft is fine but a person should approve it.
  • route_to_human for complaints, refunds, and anything legal or medical.
  • ignore for spam and off-topic notes.

Classify with Claude sends that body to the Anthropic messages API with $env.ANTHROPIC_API_KEY. Render Triage (stdout) prints a sheet: counts, the comment, the draft, and why. Nothing in this file calls the Graph API to publish a comment.

Edit the brand line in Build Triage Request. The file ships with a placeholder for your business, not a real name.

What you need

  • Meta. META_ACCESS_TOKEN in the n8n environment, plus YOUR_FACEBOOK_PAGE_ID and YOUR_POST_ID in Fetch Real Ad Comments. Optional: META_API_VERSION.
  • Anthropic. ANTHROPIC_API_KEY for the Claude node. The header reads $env.ANTHROPIC_API_KEY.
  • A brand line. Replace the bracketed sentence in Build Triage Request so the drafts sound like you.

This file reads secrets with $env. n8n 2.x blocks that by default. If a node stops with an env access error, use the n8n env access fix.

How to use it

Four steps. The file in #freebies is rup-ad-comment-triage.json.

1

Get the file

Join Discord and open #freebies. The flow file and setup help are there.

2

Import into n8n

In n8n, use Import from File and pick the JSON from #freebies.

3

Connect what it asks for

Set META_ACCESS_TOKEN and ANTHROPIC_API_KEY, and replace the page id, post id, and brand line.

4

Run it

Click Test. The last node should print a triage sheet. Post any reply yourself. This file will not publish it.

Questions

Will this reply on the ad by itself?

No. It classifies and drafts. The last node prints the sheet. You post the replies you want.

How many comments does one run read?

The fetch asks for 12 and keeps up to 10 that have message text.

Which comments should a person handle?

Anything marked route_to_human, and anything marked approve_to_post until you trust the draft.

The node says it cannot read $env. What now?

n8n 2.x blocks environment access in nodes unless you allow it, or you move the keys into credentials. The env access page walks through both.

A small note

Goat O Mate is a community of builders shipping marketing and AI automations together.

Join Discord