← All N8N workflows
AI & researchAgentCodeIfLM Chat Google GeminiMemory Buffer Window

Speech Support Workflow

Configured with Agent, LM Chat Google Gemini, Memory Buffer Window, Memory Manager, and additional nodes. Review the connections and setup before adapting this template.

Workflow preview
AI & modelsAI AgentAgentAI & modelsGoogle Gemini ChatModelLM Chat Google GeminiTriggerRecieve TelegramMessageTelegram TriggerTransformCheck For Text or VoiceMessageEdit FieldsMessagingDownload Audio FileTelegramAI & modelsTranscribe Audio FileOpen AiRoutingIf Voice MessageIfCodeCode to remove unwantedcharacters from LLM…CodeCodeCode to split outputinto chunks under 4000…CodeMessagingRespond to TelegramMessageTelegramData storeWipe ConversationMemoryMemory ManagerData storeStore ConversationMemoryMemory Buffer WindowTransformSet prompt to start anew speechEdit FieldsTransformSet prompt to generatea speech based on the…Edit FieldsTransformSet prompt to providefeedback on speechEdit FieldsRoutingRoute Flow Based onMessage ContentSwitch

Node categories in this workflow

  • AI & models
  • Trigger
  • Transform
  • Messaging
  • Routing
  • Code
  • Data store

Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.

Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.

How it works

The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.

Workflow node names, types, and operations
NodeCategoryTypeOperation
AI AgentAI & modelsAgentSee node parameters
Google Gemini Chat ModelAI & modelsLM Chat Google GeminiSee node parameters
Recieve Telegram MessageTriggerTelegram TriggerSee node parameters
Check For Text or Voice MessageTransformEdit FieldsSee node parameters
Download Audio FileMessagingTelegramfile
Transcribe Audio FileAI & modelsOpen Aiaudio / transcribe
If Voice MessageRoutingIfSee node parameters
Code to remove unwanted characters from LLM responseCodeCodeSee node parameters
Code to split output into chunks under 4000 charactersCodeCodeSee node parameters
Respond to Telegram MessageMessagingTelegramSee node parameters
Wipe Conversation MemoryData storeMemory ManagerSee node parameters
Store Conversation MemoryData storeMemory Buffer WindowSee node parameters
Set prompt to start a new speechTransformEdit FieldsSee node parameters
Set prompt to generate a speech based on the feedbackTransformEdit FieldsSee node parameters
Set prompt to provide feedback on speechTransformEdit FieldsSee node parameters
Route Flow Based on Message ContentRoutingSwitchSee node parameters

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.

Requirements

An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.

Credential types declared in the source

  • googlePalmApi
  • openAiApi
  • telegramApi

Workflow notes

Dynamic System Prompting:

Dynamic System Prompting:

This node sets the AI's system prompt according to the user's request identified in the incoming message.

Telegram-Ready Output: Formatting and Length Management:

Telegram-Ready Output: Formatting and Length Management:

These code nodes perform two crucial tasks:

  1. Formatting: Removing characters that could cause issues with Telegram's message parsing.
  2. Chunking: Dividing messages longer than Telegram's 4000-character limit into multiple shorter messages for sequential delivery.
Clearing AI Agent Memory:

Clearing AI Agent Memory:

This node clears the AI agent's short-term memory. This helps to minimize the influence of past interactions on future responses, thereby reducing the likelihood of the AI generating inaccurate or irrelevant information (hallucinations).

Processing Telegram Messages:

Processing Telegram Messages:

This section handles incoming messages from Telegram. It first checks if the message contains text.

  1. Text Message: If the message includes text, it's directly routed to the analysis switch node.
  2. Audio Message: If the message is an audio file:
    • The audio file is downloaded.
    • The audio is transcribed into text.
    • The transcribed text is then sent to the analysis switch node.

Finally, the analyzed text (whether directly from a text message or transcribed from audio) is forwarded for further processing based on the analysis results.

Gemini-Powered Response and Conversation Storage:

Gemini-Powered Response and Conversation Storage:

This node utilizes the Google Gemini model to generate a response to the user's prompt and stores the ongoing conversation.

Speech Support Workflow

Speech Support Workflow

Purpose and structure

This folder contains the Speech Support Workflow workflow. Its executable nodes use agent, code, if, lmChatGoogleGemini, memoryBufferWindow, memoryManager, openAi, set, switch, telegram, telegramTrigger. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.

Setup

Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.

Entry points

Recieve Telegram Message

Verification

Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.

Attribution

https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Telegram/1452_Telegram_Stickynote_Automate_Triggered.json MIT; preserve source notices.

Canvas section labels

These name areas of the original canvas; they do not include explanatory instructions.

  • This n8n workflow acts as your personal AI speechwriting coach, directly accessible through Telegram. It listens to your spoken or typed drafts, provides insightful feedback on clarity, engagement, structure, and content, and iteratively refines your message based on your updates. Once you're ready, it synthesizes a brand-new speech or talk incorporating all the improvements and your accumulated ideas. This tool streamlines the speechwriting process, offering on-demand AI assistance to help you craft impactful and well-structured presentations.

More in AI & research