Automation library · Content

Workflow function to summarize Reddit posts with Gemini

Started by a clock, and works across Reddit and Supabase. It hands the judgement calls to Gemini. 20 steps, 1 branch, 2 loops or waits: a working afternoon to understand properly.

MediumCalls a model: Gemini

20 stepsMedium: a working afternoon
1Branch: places the flow splits
2Loops or waits
2Services it connects to

The flow

Starts it 2Model 5Logic 9Service 4

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

  1. 1Google Gemini Chat ModelLm Chat Google GeminiModel
  2. 2Structured Output ParserOutput Parser StructuredModel
  3. 3Google Gemini Chat Model1Lm Chat Google GeminiModel
  4. 4manual trigger when testingManual triggerStarts it
  5. 5check once a day if new post are availableSchedule triggerStarts it
  6. 6LLM2Chain LlmModel
  7. 7LLM1Chain LlmModel
  8. 8Get post data from supabaseSupabaseService
  9. 9prepare data to be inserted in supabaseCodeLogic
  10. 10If the condition is satisfiedIfLogic
  11. 11and extract their reddit idCodeLogic
  12. 12insert new reddit postSupabaseService
  13. 13get all comments for the current postRedditService
  14. 14Loop Over Every PostsSplit In BatchesLogic
  15. 15get saved post from reddit profileRedditService
  16. 16Wait (rate limiting)WaitLogic
  17. 17extract relevant attribut from commentsCodeLogic
  18. 18extract relevant attribut and filter posts based on subredditCodeLogic
  19. 19aggregate post and comment into a single textCodeLogic
  20. 20further filtering existing posts wrt existing posts in databaseCodeLogic

How it's built

Starts on
A clock
Steps
20, with 1 branch, 2 loops or waits
Size
Medium: a working afternoon
Connects to
Reddit, Supabase
Model
Gemini

Questions

What does it need to run?

An n8n account, plus your own Reddit and Supabase accounts, and a key for Gemini. 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 Gemini. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Plan an afternoon. 20 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 20 steps before you point it at anything that matters.