See llms.txt for all machine-readable content.

Back to Templates

Summarize Facebook and Instagram campaign comments with Apify and Claude

Quick overview

This workflow generates a sentiment and theme brief from comments on a public Facebook or Instagram post, using Apify to collect comments (live mode) and Anthropic Claude to classify them, then outputs a readable report plus a downloadable CSV.

How it works

  1. Starts when you manually execute the workflow and sets the run mode, target post URL, and maximum number of comments to analyze.
  2. If demo mode is selected, it loads a small set of fictional comments with pre-made sentiment/topic/intent labels.
  3. If live mode is selected, it validates the Facebook or Instagram post URL, chooses the correct Apify actor, and requests up to the configured number of public comments.
  4. It cleans and compiles the collected comment texts into a single list and builds a JSON-schema classification prompt.
  5. It sends the comments to Anthropic Claude to label each one with sentiment, topic, and intent, then validates that every comment received exactly one valid label.
  6. It aggregates the labels into sentiment totals and theme counts, generates a short Markdown brief with suggested follow-ups, and produces a CSV file you can download.

Setup

  1. Decide whether to run in demo mode (no credentials) or set mode to live and paste an HTTPS link to a public Facebook or Instagram post in the configuration.
  2. For live mode, add an Apify API token as a Header Auth credential (Authorization: Bearer YOUR_APIFY_TOKEN) for the comment collection request.
  3. For live mode, add an Anthropic API key as a Header Auth credential (x-api-key: YOUR_ANTHROPIC_KEY) for the Claude classification request.
  4. Adjust maxComments (1–100) to control sample size and cost, then execute the workflow and download the CSV from the final step.