← All N8N workflows
AI & researchChain LLMGmailGmail TriggerIfOpenAI Chat Model

telegram and transcribe audio open ai and receive gmail events

Configured with Chain LLM, Gmail, Gmail Trigger, OpenAI Chat Model, and additional nodes. Review the connections and setup before adapting this template.

Workflow preview
TransformStructured OutputParserOutput Parser StructuredAI & modelsOpenAI Chat ModelOpenAI Chat ModelMessagingText EmailTelegramAI & modelsOpenAIOpen AiTriggerNew Email ReceivedGmail TriggerRoutingIn the Inbox?IfRoutingNeeds a response?IfTriggerTelegram Bot MessageReceivedTelegram TriggerMessagingIt needs to be an audiomessage + a reply!TelegramMessagingGet Audio FileTelegramMessagingCreate Email DraftGmailMessagingDirect to DraftTelegramAI & modelsDoes Email Need aResponse?Chain LLMRoutingIs Type Audio Message +Reply?IfAI & modelsOpenAI Chat Model1OpenAI Chat ModelAI & modelsWrite Polished ReplyChain LLMTransformSet Chat IDEdit Fields

Node categories in this workflow

  • Transform
  • AI & models
  • Messaging
  • Trigger
  • Routing

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
Structured Output ParserTransformOutput Parser StructuredSee node parameters
OpenAI Chat ModelAI & modelsOpenAI Chat ModelSee node parameters
Text EmailMessagingTelegramSee node parameters
OpenAIAI & modelsOpen Aiaudio / transcribe
New Email ReceivedTriggerGmail TriggerSee node parameters
In the Inbox?RoutingIfSee node parameters
Needs a response?RoutingIfSee node parameters
Telegram Bot Message ReceivedTriggerTelegram TriggerSee node parameters
It needs to be an audio message + a reply!MessagingTelegramSee node parameters
Get Audio FileMessagingTelegramfile
Create Email DraftMessagingGmaildraft
Direct to DraftMessagingTelegramSee node parameters
Does Email Need a Response?AI & modelsChain LLMSee node parameters
Is Type Audio Message + Reply?RoutingIfSee node parameters
OpenAI Chat Model1AI & modelsOpenAI Chat ModelSee node parameters
Write Polished ReplyAI & modelsChain LLMSee node parameters
Set Chat IDTransformEdit FieldsSee 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

  • gmailOAuth2
  • openAiApi
  • telegramApi

Workflow notes

1. New Email Received

1. New Email Received

Our workflow is triggered when a new email comes in.

We use an IF node here to only run the automation on incoming emails to the INBOX - not in the SENT folder.

2. Check If Email Needs a Response

2. Check If Email Needs a Response

We use ChatGPT to check if the email needs a reply. Anything sent with an "unsubscribe" button or "manage preferences" is ignored. Anything that comes from a company (e.g. sent from "user@example.com"), or has the format of a newsletter doesn't need a response.

We use an output parser so that we can use an IF node on the output.

3. Send Email to Telegram

3. Send Email to Telegram

We use a VoicerEmailer bot to send the email over a Telegram message to our account on Telegram.

4. Telegram Reply Received

4. Telegram Reply Received

This workflow is triggered when the Telegram bot receives a message.

We check that the message is a reply to a previous email message, and that the reply is an audio message.

If not, we send a message back telling them what they did wrong.

5. Audio Transcription

5. Audio Transcription

We get the audio file from the Telegram message and send it to OpenAI's Whisper API to get a transcription of the message.

5. Create Email Draft

5. Create Email Draft

Finally, we get ChatGPT to write up a response, given the original email for context and our voice note reply.

We create a new draft in Gmail, which shows up in the same email thread. We sent a link to the newly created draft to the user via Telegram.

Edit here

Edit here

Add in your Chat ID here.

telegram and transcribe audio open ai and receive gmail events

telegram and transcribe audio open ai and receive gmail events

Purpose and structure

This folder contains the telegram and transcribe audio open ai and receive gmail events workflow. Its executable nodes use chainLlm, gmail, gmailTrigger, if, lmChatOpenAi, openAi, outputParserStructured, set, 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

New Email Received, Telegram Bot Message Received

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/0916_Telegram_Gmail_Create_Triggered.json MIT; preserve source notices.

More in AI & research