Skip to main content

Design UI projects πŸŽ¨πŸ–ΌοΈ with Google Stitch via Telegram using MCP and Gemini AI

Workflow preview

Workflow preview
100%
Design UI projects πŸŽ¨πŸ–ΌοΈ with Google Stitch via Telegram using MCP and Gemini AI preview
Open on n8n.io

1. Workflow Overview

This workflow implements an AI powered design and prototyping assistant that integrates Telegram , Google Gemini , and Google Stitch (MCP) to enable conversational UI generation and project managem...

Best for

  • Content Creation automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.chattrigger, @n8n/n8n-nodes-langchain.lmchatgooglegemini, n8n-nodes-base.stickynote, @n8n/n8n-nodes-langchain.memorybufferwindow, @n8n/n8n-nodes-langchain.mcpclienttool, n8n-nodes-base.perplexitytool, n8n-nodes-base.code, n8n-nodes-base.if

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Davide Boizza.

Original n8n.io source

1.1 Workflow description

Title
Design UI projects πŸŽ¨πŸ–ΌοΈ with Google Stitch via Telegram using MCP and Gemini AI
Workflow name
Design UI projects πŸŽ¨πŸ–ΌοΈ with Google Stitch via Telegram using MCP and Gemini AI

This workflow implements an AI-powered design and prototyping assistant that integrates Telegram, Google Gemini, and Google Stitch (MCP) to enable conversational UI generation and project management.

Supported actions include:

  • Creating new design projects
  • Retrieving existing projects
  • Listing projects and screens
  • Fetching individual screens
  • Generating new UI screens directly from text descriptions

Key Advantages

1. βœ… Conversational Design Workflow

Design and UI prototyping can be driven entirely through natural language. Users can create screens, explore layouts, or manage projects simply by chatting, without opening design tools.

2. βœ… Tight Integration with Google Stitch

By leveraging the Stitch MCP API, the workflow provides direct access to structured design capabilities such as screen generation, project management, and UI exploration, avoiding manual API calls or custom scripting.

3. βœ… Intelligent Tool Selection

The AI agent does not blindly call APIs. It first analyzes the user request, determines the required level of fidelity and intent, and then selects the most appropriate Stitch function or combination of functions.

4. βœ… Multi-Channel Support

The workflow supports both generic chat triggers and Telegram, making it flexible for internal tools, demos, or production chatbots.

5. βœ… Security and Access Control

Telegram access is restricted to a specific user ID, and execution only happens when a dedicated command is used. This prevents accidental or unauthorized usage.

6. βœ… Context Awareness with Memory

The inclusion of conversational memory allows the agent to maintain context across interactions, enabling iterative design discussions rather than isolated commands.

7. βœ… Production-Ready Output Formatting

Responses are automatically converted into Telegram-compatible HTML, ensuring clean, readable, and well-formatted messages without manual post-processing.

8. βœ… Extensible and Modular Architecture

The workflow is highly modular: additional Stitch tools, AI models, or communication channels can be added with minimal changes, making it future-proof and easy to extend.


How It Works

This workflow functions as a Telegram-powered AI agent that leverages Google Stitch's MCP (Model Context Protocol) tools for design, UI generation, and product prototyping. It combines conversational AI, tool-based actions, and web search capabilities.

  1. Trigger & Authorization: The workflow is activated by an incoming message from a configured Telegram bot. A code node first checks the sender's Telegram User ID against a hardcoded value (xxx) to restrict access. Only authorized users can proceed.
  2. Command Parsing: An IF node filters messages, allowing the agent to proceed only if the message text starts with the command /stitch. This ensures the agent is only invoked intentionally.
  3. Query Preparation: The /stitch prefix is stripped from the message text, and the cleaned query, along with the user's ID (used as a session identifier), is passed to the main agent.
  4. AI Agent Execution: The core "Google Stitch Agent" node is an LLM-powered agent (using Google Gemini) equipped with:
  • Tools: Access to several Google Stitch MCP functions (create_project, get_project, list_projects, list_screens, get_screen, generate_screen_from_text) and a Perplexity web search tool.
  • Memory: A conversation buffer window to maintain context within a session.
  • System Prompt: Instructs the agent to intelligently select and use the appropriate Stitch tools based on the user's design-related request (e.g., generating screens from text, managing projects). It is directed to use web search when necessary for additional context.
  1. Response Processing & Delivery: The agent's text output (in Markdown) is passed through another LLM chain ("From MD to HTML") that converts it to Telegram-friendly HTML. Finally, the formatted response is sent back to the user via the Telegram bot.

Set Up Steps

To make this workflow operational, you need to configure credentials and update specific nodes:

  1. Telegram Bot Configuration:
  • In the "Code" node (id: 08bfae9e...), replace xxx in the condition $input.first().json.message.from.id !== xxx with your actual Telegram User ID. This ensures only you can trigger the agent.
  • Ensure the "Telegram Trigger" and "Send a text message" nodes have valid Telegram Bot credentials configured.
  1. Google Stitch API Setup:
  • Obtain an API key from Google Stitch.
  • Configure the HTTP Header Auth credential named "Google Stitch" (referenced by all MCP tool nodes: Create Project, Get Project, etc.).
  • Set the Header Auth with:
  • Name: X-Goog-Api-Key
  • Value: Your actual Google Stitch API Key (YOUR-API-KEY).
  1. AI Model & Tool Credentials:
  • Verify the credentials for the Google Gemini Chat Model nodes are correctly set up for API access.
  • Verify the credentials for the Perplexity API node ("Search on web") are configured if web search functionality is required.
  1. Activation:
  • Once all credentials are configured, set the workflow to Active. The Telegram webhook will be registered, and the workflow will listen for authorized messages containing the /stitch command.

πŸ‘‰ Subscribe to my new YouTube channel. Here I’ll share videos and Shorts with practical tutorials and FREE templates for n8n.


Need help customizing?

Contact me for consulting and support or add me on Linkedin.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When chat message received

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.4

Block 2 - Google Gemini Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 3 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Simple Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 5 - Create Project

Type / Role
@n8n/n8n-nodes-langchain.mcpClientTool - mcpClientTool
Config choices
Version 1.2

Block 6 - Get Project

Type / Role
@n8n/n8n-nodes-langchain.mcpClientTool - mcpClientTool
Config choices
Version 1.2

Block 7 - List projects

Type / Role
@n8n/n8n-nodes-langchain.mcpClientTool - mcpClientTool
Config choices
Version 1.2

Block 8 - List screen

Type / Role
@n8n/n8n-nodes-langchain.mcpClientTool - mcpClientTool
Config choices
Version 1.2

Block 9 - Get screen

Type / Role
@n8n/n8n-nodes-langchain.mcpClientTool - mcpClientTool
Config choices
Version 1.2

Block 10 - Generate Screen

Type / Role
@n8n/n8n-nodes-langchain.mcpClientTool - mcpClientTool
Config choices
Version 1.2

Block 11 - Search on web

Type / Role
n8n-nodes-base.perplexityTool - perplexityTool
Config choices
Version 1

Block 12 - Code

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 13 - Search with MCP?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 14 - Get Message

Type / Role
n8n-nodes-base.telegramTrigger - telegramTrigger
Config choices
Version 1.1

Block 15 - Sticky Note8

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Get Text

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 17 - Send a text message

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 18 - Google Gemini Chat Model1

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 19 - Google Stitch Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3.1

Block 20 - From MD to HTML

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.9

Block 21 - Clean query

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 22 - is Telegram?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.3

Block 23 - Sticky Note9

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 24 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Showing the first 24 of 25 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Design UI projects πŸŽ¨πŸ–ΌοΈ with Google Stitch via Telegram using MCP and Gemini AI
Complexity advanced
Nodes 25
Categories Content Creation, AI Chatbot
Author Davide Boizza
Published 09 Feb 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/13269/13269.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Design UI projects πŸŽ¨πŸ–ΌοΈ with Google Stitch via Telegram using MCP and Gemini AI do?

This workflow implements an AI powered design and prototyping assistant that integrates Telegram , Google Gemini , and Google Stitch (MCP) to enable conversational UI generation and project managem...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Content Creation, AI Chatbot use case.