Automation library · Customer support

Autonomous customizable support chatbot

Started by another system calling it, and works across Intercom and Pinecone. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 36 steps, 3 branches: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAIRetrieval

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

The flow

Starts it 1Model 5Logic 16Service 14

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

  1. 1Intercom Webhook TriggerWebhookStarts it
  2. 2OpenAI Chat ModelLm Chat Open AiModel
  3. 3Simple MemoryMemory Buffer WindowModel
  4. 4Embeddings OpenAIEmbeddings Open AiModel
  5. 5Get a leadIntercomService
  6. 6Get a lead1IntercomService
  7. 7Get a lead2IntercomService
  8. 8Get a lead3IntercomService
  9. 9Prevents from running when event is 'bot reply'FilterLogic
  10. 10AI Agent1AgentModel
  11. 11Pinecone Vector StoreVector Store PineconeModel
  12. 12Tokens and IdsSetLogic
  13. 13[Intercom] ReplyHttp RequestService
  14. 14[Discord] ReplyHttp RequestService
  15. 15Whether it is a new conversation or notIfLogic
  16. 16[Discord] Create ThreadHttp RequestService
  17. 17[Intercom] GET conversationHttp RequestService
  18. 18[Discord] Type first message into the threadHttp RequestService
  19. 19Split OutSplit OutLogic
  20. 20[Intercom] Store the thread ID as a 'note'Http RequestService
  21. 21Isolating all textual messages contentsFilterLogic
  22. 22Isolating the 'note' to get the thread ID storedFilterLogic
  23. 23new conversation prepared dataSetLogic
  24. 24conversation -> JSONSetLogic
  25. 25conversation info -> JSONSetLogic
  26. 26sorting data (cuz we join 2 different flows here)SetLogic
  27. 27Aggregate1AggregateLogic
  28. 28conversation prepared dataMergeLogic
  29. 29preparing data for Agentic useSetLogic
  30. 30SwitchSwitchLogic
  31. 31[Discord] User messageHttp RequestService
  32. 32If2IfLogic
  33. 33[Discord] Human admin reply Http RequestService
  34. 34not going through if bot deactivatedFilterLogic
  35. 35[Discord] Notify bot re-activation notificationHttp RequestService
  36. 36[Discord] Notify bot de-activationHttp RequestService

How it's built

Starts on
Another system calling it
Steps
36, with 3 branches
Size
Large: read it before trusting it with anything live
Connects to
Intercom, Pinecone
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 Intercom and Pinecone accounts, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on another system calling it.

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