Automation library · Alerts and monitoring

Monitor Facebook post safety with Apify and Gemini

Started by an incoming Telegram message, and works across Apify, Telegram and n8n data table. It puts Gemini behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 28 steps: large, and worth reading before you trust it with anything live.

LargeCalls a model: GeminiRetrieval

28 stepsLarge: read it before trusting it with anything live
0Branches: places the flow splits
0Loops or waits
3Services it connects to

The flow

Starts it 3Model 8Logic 10Service 7

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

  1. 1Telegram TriggerTelegram triggerStarts it
  2. 2MongoDB Chat MemoryMemory Mongo Db ChatModel
  3. 3SerpAPI SearchSerp Api ToolService
  4. 4Scrape Specific Page ToolTool WorkflowModel
  5. 5Schedule TriggerSchedule triggerStarts it
  6. 6When Executed by Another WorkflowExecute Workflow triggerStarts it
  7. 7MongoDB Chat Memory 1Memory Mongo Db ChatModel
  8. 8Google Gemini Chat ModelLm Chat Google GeminiModel
  9. 9Google Gemini Chat Model1Lm Chat Google GeminiModel
  10. 10Set Context (Chat)SetLogic
  11. 11Chat AI AgentAgentModel
  12. 12Set Context (Scraper)SetLogic
  13. 13Safety Analysis AgentAgentModel
  14. 14Structured Output ParserOutput Parser StructuredModel
  15. 15Send Telegram ReplyTelegramService
  16. 16Apify Facebook ScraperApifyService
  17. 17Format Telegram MessageCodeLogic
  18. 18Normalize FieldsSetLogic
  19. 19Send NotificationTelegramService
  20. 20If row does not existData TableService
  21. 21Data Table UpsertData TableService
  22. 22Format Post ContentSetLogic
  23. 23Has Image?FilterLogic
  24. 24Aggregate TextAggregateLogic
  25. 25Download ImageHttp RequestService
  26. 26Merge DataMergeLogic
  27. 27Aggregate ImagesAggregateLogic
  28. 28Final AggregateAggregateLogic

How it's built

Starts on
An incoming Telegram message
Steps
28
Size
Large: read it before trusting it with anything live
Connects to
Apify, Telegram, n8n data table
Model
Gemini
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 Apify and Telegram accounts, and a key for Gemini. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an incoming Telegram message.

Does it use AI?

Yes. It calls Gemini. 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?

Take your time. At 28 steps it is large: read it before trusting it with anything live.

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 28 steps before you point it at anything that matters.