Automation library · Research and reporting

Analyze Facebook comment sentiment with OpenAI and Slack

Started by a clock, and works across Google Sheets, Outlook and Slack. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 15 steps, 1 branch: a working afternoon to understand properly.

MediumCalls a model: OpenAIRetrieval

15 stepsMedium: a working afternoon
1Branch: places the flow splits
0Loops or waits
3Services it connects to

The flow

Starts it 2Model 4Logic 4Service 5

The steps in the order they run, from what starts it.

  1. 1Error Handler TriggerError triggerStarts it
  2. 2LLM - OpenAI GPT-4 ModelLm Chat Open AiModel
  3. 3Memory Buffer - Session ContextMemory Buffer WindowModel
  4. 4Structured JSON ParserOutput Parser StructuredModel
  5. 5Trigger - Daily Sentiment AnalysisSchedule triggerStarts it
  6. 6Slack: Send Error AlertSlackService
  7. 7💬 Agent - Sentiment & Tone EvaluatorAgentModel
  8. 8Fetch Recent Facebook PostsFacebook Graph ApiService
  9. 9Route Based on Sentiment ScoreSwitchLogic
  10. 10Format Facebook Data (Code Node)CodeLogic
  11. 11Slack Alert - Negative SentimentSlackService
  12. 12Prepare Data for Google SheetsCodeLogic
  13. 13Format HTML Email Report (Code Node)CodeLogic
  14. 14Update Google Sheet - Sentiment LogGoogle SheetsService
  15. 15Send Sentiment Report (Outlook)Microsoft OutlookService

How it's built

Starts on
A clock
Steps
15, with 1 branch
Size
Medium: a working afternoon
Connects to
Google Sheets, Outlook, Slack
Model
OpenAI
Retrieval
Answers are drawn from documents you supply, not from the model alone

Questions

What does it need to run?

An n8n account, plus your own Google Sheets, Outlook and Slack accounts, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on a clock.

Does it use AI?

Yes. It calls OpenAI. Its answers draw on documents you give it, not on the model alone. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Plan an afternoon. 15 steps is enough that you should read each one before running it.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

Before you run it

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 15 steps before you point it at anything that matters.