Automation library · Research and reporting

AI-powered stock analysis with OpenAI and OpenRouter

Started by an incoming WhatsApp message, and works across Gmail, Supabase vectors, Telegram and WhatsApp. It puts OpenAI and OpenRouter behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 54 steps: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAI, OpenRouterRetrieval

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

The flow

Starts it 5Model 17Logic 22Service 10

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

  1. 1ThinkTool ThinkModel
  2. 2Embeddings OpenAIEmbeddings Open AiModel
  3. 3Recursive Character Text SplitterText Splitter Recursive Character Text SplitterModel
  4. 4Embeddings OpenAI1Embeddings Open AiModel
  5. 5Reranker CohereReranker CohereModel
  6. 6rankingHttp Request ToolService
  7. 7sectorsHttp Request ToolService
  8. 8industriesHttp Request ToolService
  9. 9Technical Analysis Tool1Tool WorkflowModel
  10. 10Trends Analysis Tool1Tool WorkflowModel
  11. 11Think2Tool ThinkModel
  12. 12Edit Fields1SetLogic
  13. 13OpenRouter Chat Model2Lm Chat Open RouterModel
  14. 14Set Stock Symbol and API KeySetLogic
  15. 15Generate Variables For API1CodeLogic
  16. 16Grok 4Lm Chat Open RouterModel
  17. 17Call trend + technical AgentTool WorkflowModel
  18. 18Slack TriggerSlack triggerStarts it
  19. 19Telegram TriggerTelegram triggerStarts it
  20. 20Gmail TriggerGmail triggerStarts it
  21. 21WhatsApp TriggerWhats App triggerStarts it
  22. 22When chat message receivedChat triggerStarts it
  23. 23MAIN AGENTAgentModel
  24. 24Supabase Vector Store1Vector Store SupabaseModel
  25. 25Default Data LoaderDocument Default Data LoaderModel
  26. 26Supabase Vector StoreVector Store SupabaseModel
  27. 27Trend + Technical AgentAgentModel
  28. 28Get Price HistoryHttp RequestService
  29. 29Get Bollinger BandsHttp RequestService
  30. 30Get MACDHttp RequestService
  31. 31Split Out3Split OutLogic
  32. 32Set message variableSetLogic
  33. 33Markdown to HTMLMarkdownLogic
  34. 34Calculate Support ResistanceCodeLogic
  35. 35Edit FieldsSetLogic
  36. 36MergeMergeLogic
  37. 37Edit Fields3SetLogic
  38. 38Send reportGmailService
  39. 39Get Chart URLHttp RequestService
  40. 40Organizing DataCodeLogic
  41. 41Get News Data1Http RequestService
  42. 42Download ChartHttp RequestService
  43. 43Merge-2MergeLogic
  44. 44Aggregate1AggregateLogic
  45. 45First Technical AnalysisOpen AiModel
  46. 46Warp as JSON for GPTCodeLogic
  47. 47CodeCodeLogic
  48. 48Set VariableSetLogic
  49. 49Set Final ResponseSetLogic
  50. 50Code1CodeLogic
  51. 51Split Out2Split OutLogic
  52. 52Edit Fields4SetLogic
  53. 53Limit1LimitLogic
  54. 54Aggregate2AggregateLogic

How it's built

Starts on
An incoming WhatsApp message
Steps
54
Size
Large: read it before trusting it with anything live
Connects to
Gmail, Supabase vectors, Telegram, WhatsApp
Model
OpenAI, OpenRouter
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 Gmail, Supabase vectors, Telegram and WhatsApp accounts, and a key for OpenAI and OpenRouter. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an incoming WhatsApp message.

Does it use AI?

Yes. It calls OpenAI and OpenRouter. 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 54 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 54 steps before you point it at anything that matters.