Automation library · Chat assistants

Design UI screens from chat with Google Stitch and Gemini

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

LargeCalls a model: GeminiRetrieval

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

The flow

Starts it 3Model 12Logic 4Service 6

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

  1. 1Chat channel triggerChat triggerStarts it
  2. 2Telegram channel triggerTelegram triggerStarts it
  3. 3Create project toolMcp Client ToolModel
  4. 4Get project toolMcp Client ToolModel
  5. 5List projects toolMcp Client ToolModel
  6. 6List screens toolMcp Client ToolModel
  7. 7Get screen toolMcp Client ToolModel
  8. 8Generate screen toolMcp Client ToolModel
  9. 9Web research toolPerplexity ToolService
  10. 10Gemini formatter modelLm Chat Google GeminiModel
  11. 11Error triggerError triggerStarts it
  12. 12Normalize incoming messageCodeLogic
  13. 13Stitch UI DesignerAgentModel
  14. 14Convert design to Telegram HTMLChain LlmModel
  15. 15Send alert to admin chatTelegramService
  16. 16Log error to sheetsGoogle SheetsService
  17. 17Validate request depthIfLogic
  18. 18Is this a Telegram chat?IfLogic
  19. 19Save project memory rowGoogle SheetsService
  20. 20Per-user conversation memoryMemory Buffer WindowModel
  21. 21Gemini design modelLm Chat Google GeminiModel
  22. 22Send design via TelegramTelegramService
  23. 23Load project memoryGoogle SheetsService
  24. 24Send design via web chatChatModel
  25. 25Merge context into promptCodeLogic

How it's built

Starts on
An incoming Telegram message
Steps
25, with 2 branches
Size
Large: read it before trusting it with anything live
Connects to
Google Sheets, Telegram
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 Google Sheets 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 25 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 25 steps before you point it at anything that matters.