Automation library · Lead generation

Instagram Post & Reel Comments Auto-Reply Lead DM Funnel Unipile

Started by a clock, and works across n8n data table. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 38 steps, 5 branches: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAIRetrieval

38 stepsLarge: read it before trusting it with anything live
5Branches: places the flow splits
0Loops or waits
1Service it connects to

The flow

Starts it 1Model 5Logic 25Service 7

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

  1. 1Schedule TriggerSchedule triggerStarts it
  2. 2OpenAI Chat ModelLm Chat Open AiModel
  3. 3Simple MemoryMemory Buffer WindowModel
  4. 4Config Variables SetSetLogic
  5. 5AI AgentAgentModel
  6. 6AI Agent - Lead DMAgentModel
  7. 7AI Agent - Lead Public CommentAgentModel
  8. 8Get Recent PostsHttp RequestService
  9. 9Save Normal Reply OutputSetLogic
  10. 10Save Lead DM OutputSetLogic
  11. 11Save Lead Public OutputSetLogic
  12. 12Split PostsSplit OutLogic
  13. 13Merge Normal Reply ContextMergeLogic
  14. 14Prepare Public Comment Payload1SetLogic
  15. 15Merge Lead Public Comment ContextMergeLogic
  16. 16Prepare Public Comment PayloadSetLogic
  17. 17Preserve New Chat ContextSetLogic
  18. 18Normalize PostSetLogic
  19. 19Prepare Reply Guard InsertSetLogic
  20. 20Attendee Match Found?2IfLogic
  21. 21Attendee Match Found?1IfLogic
  22. 22Start New Lead ChatHttp RequestService
  23. 23Merge New Chat ContextMergeLogic
  24. 24Get CommentsHttp RequestService
  25. 25Insert Reply Guard RowData TableService
  26. 26Post ReplyHttp RequestService
  27. 27Post Lead Comment ReplyHttp RequestService
  28. 28Split CommentsSplit OutLogic
  29. 29Attach Post ContextSetLogic
  30. 30Build Reply Guard FieldsSetLogic
  31. 31Get Reply Guard Row(s)Data TableService
  32. 32Mark Reply Guard FoundCodeLogic
  33. 33Not Replied Yet?IfLogic
  34. 34Spam FilterCodeLogic
  35. 35Should Reply?IfLogic
  36. 36High-Intent FilterCodeLogic
  37. 37High Intent?IfLogic
  38. 38Tag Normal Reply PathSetLogic

How it's built

Starts on
A clock
Steps
38, with 5 branches
Size
Large: read it before trusting it with anything live
Connects to
n8n data table
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, 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?

Take your time. At 38 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 38 steps before you point it at anything that matters.