Back to Integrations
integrationOpenAI node
integrationTelegram node

OpenAI and Telegram integration

Save yourself the work of writing custom integrations for OpenAI and Telegram and use n8n instead. Build adaptable and scalable AI, Langchain, Communication, and HITL workflows that work with your technology stack. All within a building experience you will love.

How to connect OpenAI and Telegram

  • Step 1: Create a new workflow
  • Step 2: Add and configure nodes
  • Step 3: Connect
  • Step 4: Customize and extend your integration
  • Step 5: Test and activate your workflow

Step 1: Create a new workflow and add the first step

In n8n, click the "Add workflow" button in the Workflows tab to create a new workflow. Add the starting point – a trigger on when your workflow should run: an app event, a schedule, a webhook call, another workflow, an AI chat, or a manual trigger. Sometimes, the HTTP Request node might already serve as your starting point.

OpenAI and Telegram integration: Create a new workflow and add the first step

Step 2: Add and configure OpenAI and Telegram nodes

You can find OpenAI and Telegram in the nodes panel. Drag them onto your workflow canvas, selecting their actions. Click each node, choose a credential, and authenticate to grant n8n access. Configure OpenAI and Telegram nodes one by one: input data on the left, parameters in the middle, and output data on the right.

OpenAI and Telegram integration: Add and configure OpenAI and Telegram nodes

Step 3: Connect OpenAI and Telegram

A connection establishes a link between OpenAI and Telegram (or vice versa) to route data through the workflow. Data flows from the output of one node to the input of another. You can have single or multiple connections for each node.

OpenAI and Telegram integration: Connect OpenAI and Telegram

Step 4: Customize and extend your OpenAI and Telegram integration

Use n8n's core nodes such as If, Split Out, Merge, and others to transform and manipulate data. Write custom JavaScript or Python in the Code node and run it as a step in your workflow. Connect OpenAI and Telegram with any of n8n’s 1000+ integrations, and incorporate advanced AI logic into your workflows.

OpenAI and Telegram integration: Customize and extend your OpenAI and Telegram integration

Step 5: Test and activate your OpenAI and Telegram workflow

Save and run the workflow to see if everything works as expected. Based on your configuration, data should flow from OpenAI to Telegram or vice versa. Easily debug your workflow: you can check past executions to isolate and fix the mistake. Once you've tested everything, make sure to save your workflow and activate it.

OpenAI and Telegram integration: Test and activate your OpenAI and Telegram workflow

✨🤖Automate Multi-Platform Social Media Content Creation with AI

Automate Multi-Platform Social Media Content Creation with AI

Who is this for?
Social Media Managers and Digital Marketers seeking to streamline content production across 7+ platforms (X/Twitter, Instagram, LinkedIn, Facebook, TikTok, Threads, YouTube Shorts) using AI-powered automation.

What problem does this solve?
Creating platform-optimized content at scale while maintaining brand consistency across multiple channels, reducing manual work by 80% through AI generation and automated publishing.

What this workflow does
AI Content Generation:
Uses GPT-4/Gemini to create platform-specific posts
Automatically generates hashtags, CTAs, and emoji placement
Supports image/video suggestions and image creation using OpenAI or Pollinations.ai
Uses SERP api to search for relavent content

Approval Workflow:
Sends formatted HTML emails for human review
Implements double-approval system with Gmail integration

Cross-Platform Publishing:
One-click deployment to:
Instagram/Facebook (via Graph API)
X/Twitter (Official API)
LinkedIn (Sales Navigator integration)

Setup
Credentials:
OpenAI API key
Google Gemini API
Social media platform tokens (X, LinkedIn, Facebook)
ImgBB for image hosting
Gmail
SERP API
Telegram

Configuration:
Update all "your-unique-id" placeholders in API nodes
Set email recipients in Gmail nodes
Customize AI prompts

Customization:
Adjust character limits per platform
Modify approval thresholds
Add/remove social platforms as needed

How to customize
Content Style**: Edit prompt templates in the "Social Media Content Factory" agent node
Approval Process**: Modify email templates
Analytics**: Connect to Google Sheets for performance tracking
Image Generation**: Switch between Pollinations.ai/DALL-E/Midjourney

Nodes used in this workflow

Popular OpenAI and Telegram workflows

Auto-create and publish AI social videos with Telegram, GPT-4 and Blotato

Auto-create and publish AI social videos with Telegram, GPT-4 and Blotato > ⚠️ Disclaimer: This workflow uses Community Nodes and must be run on a self-hosted instance of n8n. Who is this for? This template is perfect for social media managers, content creators, AI enthusiasts, and automation pros who want to generate short-form videos (Reels) from a simple Telegram message, then publish them across multiple platforms—all without video editing or manual uploads. What problem is this workflow solving? Creating content is only half the job. The real bottleneck comes in: Rendering the video, Adding voice or music, Writing captions and titles, Publishing to multiple platforms. This workflow automates all of that using AI. It saves hours every week and guarantees consistent output. What this workflow does This end-to-end automation handles everything from AI video generation to social publishing: Starts with a Telegram message (text or image prompt) Generates video using Kling or Blotato, based on the input Creates music with Piapi and merges it with the video Generates text overlays and captions with GPT-4 Builds a stylized video using JSON2Video Logs results to Google Sheets Sends final output back to Telegram Auto-posts the video to 9 platforms via Blotato (Instagram, TikTok, YouTube, Facebook, LinkedIn, Threads, Twitter/X, Pinterest, Bluesky) Setup Connect your Telegram bot to the trigger node. Add your OpenAI API key for all GPT nodes. Set up Kling and Piapi API access (for video and music generation). Connect your Cloudinary account to upload images. Link a Google Sheet with columns: Title, Caption, URL. Set your Blotato API key and fill in the platform-specific account IDs. How to customize this workflow to your needs Change prompt formatting** to control GPT responses and video tone. Edit text styling** in JSON2Video to match your brand. Add a Telegram approval step** before publishing, if needed. Disable platforms** you don’t use by deleting their HTTP Request nodes. Use a Google Sheet filter** to only process new rows or drafts. 📄 Documentation: Notion Guide

AI-Powered Telegram Task Manager with MCP Server

Detailed Description The ToDo App workflow is designed to streamline task management through Telegram and Google Tasks integration. This workflow allows users to create, update, and manage tasks via Telegram messages, leveraging AI capabilities to enhance user interaction. The expected outcome is a seamless experience where users can manage their tasks efficiently without needing to switch between applications. Who is this for? This workflow is intended for: Individuals** looking for an efficient way to manage their tasks directly from Telegram. Teams** that require a collaborative task management solution integrated with Google Tasks. Developers** interested in automating task management processes using n8n and Telegram. What problem does this workflow solve? Managing tasks can often be cumbersome, especially when switching between different applications. This workflow addresses the following problems: Fragmented Task Management**: Users can manage tasks directly from Telegram, reducing the need to switch to Google Tasks. Inefficient Communication**: By integrating AI, users can interact with the task management system in a conversational manner, making it more intuitive. Task Updates**: Users can easily update task statuses and details through simple messages, enhancing productivity. What this workflow does The ToDo App workflow performs the following functions: Incoming Message Handling: Listens for messages sent to a Telegram bot. Task Creation: Allows users to create new tasks based on their messages. Task Updates: Users can update existing tasks by sending specific commands. Task Retrieval: Retrieves today's and upcoming tasks from Google Tasks. Voice Note Transcription: Supports voice messages, converting them into text for task management. AI Assistance: Utilizes an AI agent to assist users in managing their tasks effectively. Setup Prerequisites Before setting up the workflow, ensure you have the following: n8n Account**: Sign up for an n8n account if you don't have one. Telegram Bot**: Create a Telegram bot and obtain the API token. Google Tasks API**: Set up Google Tasks API and obtain OAuth2 credentials. OpenAI API Key**: Sign up for OpenAI and obtain an API key for AI functionalities. Setup Process Upload the JSON for this workflow and setup the authentication for the different tools. How to customize this workflow To adapt the ToDo App workflow to different needs, consider the following customizations: Change Task Management Platform**: If you prefer a different task management tool, replace the Google Tasks nodes with your preferred service's API. Modify AI Responses**: Adjust the AI agent's system message to change how it interacts with users. Add Additional Commands**: Expand the workflow by adding more commands for different task management functionalities (e.g., deleting tasks). Integrate Other Messaging Platforms**: If you want to use a different messaging service, replace the Telegram nodes with the appropriate nodes for that service. Conclusion The ToDo App workflow provides a powerful solution for managing tasks through Telegram, enhancing productivity and user experience. By following the setup instructions and customization options, users can tailor the workflow to meet their specific needs, making task management more efficient and accessible.
+2

Generate & Auto-Post Social Videos to Multiple Platforms with GPT-4 and Kling AI

AI-Powered Social Video Generator with Auto-Posting to Instagram, TikTok, YouTube, Facebook, LinkedIn, Threads, Pinterest, Twitter (X), and Bluesky Who is this workflow for? This workflow is ideal for content creators, marketers, social media managers, and automation enthusiasts who want to generate, customize, and publish short-form videos across multiple platforms without manual editing or posting. If you use tools like ChatGPT, Kling, or Blotato and want to streamline your content creation process, this workflow is made for you. What problem does this workflow solve? Publishing regular video content on multiple platforms is time-consuming—especially when adding voice-overs, captions, and managing distribution. This workflow solves that by: Automating video generation using AI (Kling + GPT-4) Adding realistic voice narration Styling subtitles for social media Creating titles and social captions Auto-posting to Instagram, TikTok, YouTube, Facebook, Threads, Twitter (X), LinkedIn, Pinterest, and Bluesky All of this is triggered by a simple message sent via Telegram. How the workflow works This end-to-end automation transforms a short Telegram message into a fully produced and published social video: Receives a text prompt from Telegram Transforms it into a detailed video scene using GPT-4 Generates a cinematic video with Kling Creates a voice-over script and converts it to audio Merges the video and the audio Adds styled captions Writes a social caption and an SEO-optimized title Saves metadata to Google Sheets Sends a preview via Telegram Publishes the video to 9 social platforms using Blotato Setup Connect your Telegram bot to the "Telegram Trigger" node Add your OpenAI API key to all GPT-related nodes Configure Kling API access in the "Generate Video" node Link your Cloudinary account for audio upload Connect JSON2Video to handle video merging and captioning Set up Google Sheets with your preferred spreadsheet ID Connect your Blotato API key and fill in the platform IDs (Instagram, TikTok, etc.) Test by sending a Telegram message like: generate video A robot exploring Mars, Why AI will reshape humanity > Disclaimer: This workflow uses Community Nodes, which are only available on self-hosted instances of n8n. How to customize this workflow to your needs Change the visual style**: Adjust the GPT-4 prompt formatting to reflect your brand tone Edit voice style**: Replace the TTS provider or tweak OpenAI's voice settings Revise captions or titles**: Fine-tune the system prompts in the "Create Description" or "Create Title" nodes Target fewer platforms**: Disable or remove nodes for platforms you don’t use Add approval steps**: Insert a Telegram confirmation step before auto-publishing 📄 Documentation: Notion Guide Demo Video 🎥 Watch the full tutorial here: YouTube Demo
+8

✨🤖Automate Multi-Platform Social Media Content Creation with AI

Automate Multi-Platform Social Media Content Creation with AI Who is this for? Social Media Managers and Digital Marketers seeking to streamline content production across 7+ platforms (X/Twitter, Instagram, LinkedIn, Facebook, TikTok, Threads, YouTube Shorts) using AI-powered automation. What problem does this solve? Creating platform-optimized content at scale while maintaining brand consistency across multiple channels, reducing manual work by 80% through AI generation and automated publishing. What this workflow does AI Content Generation: Uses GPT-4/Gemini to create platform-specific posts Automatically generates hashtags, CTAs, and emoji placement Supports image/video suggestions and image creation using OpenAI or Pollinations.ai Uses SERP api to search for relavent content Approval Workflow: Sends formatted HTML emails for human review Implements double-approval system with Gmail integration Cross-Platform Publishing: One-click deployment to: Instagram/Facebook (via Graph API) X/Twitter (Official API) LinkedIn (Sales Navigator integration) Setup Credentials: OpenAI API key Google Gemini API Social media platform tokens (X, LinkedIn, Facebook) ImgBB for image hosting Gmail SERP API Telegram Configuration: Update all "your-unique-id" placeholders in API nodes Set email recipients in Gmail nodes Customize AI prompts Customization: Adjust character limits per platform Modify approval thresholds Add/remove social platforms as needed How to customize Content Style**: Edit prompt templates in the "Social Media Content Factory" agent node Approval Process**: Modify email templates Analytics**: Connect to Google Sheets for performance tracking Image Generation**: Switch between Pollinations.ai/DALL-E/Midjourney
+4

Ultimate AI Assistant: Automate Email, Calendar, WebSearch, Notion, RAG & X

This is an ultimate AI assistant: Handle emails, schedule meetings, search the web, take notes, post to social media, and retrieve information from your knowledge base, all through simple Telegram commands (text, voice, or image). What is included: 1 Ready-to-use n8n workflow file (.json) 4 Instructional videos demonstrating how to connect n8n with: Google Products (Gmail, Calendar, Sheets) Telegram Pinecone Vector Store Notion Who is this for? This workflow is ideal for: Individuals seeking to automate personal and professional tasks. Professionals needing efficient management of emails, calendars, and contacts. Content creators or researchers requiring quick information retrieval and drafting capabilities. Anyone wanting a centralized AI assistant. What problem is this workflow solving? Managing numerous digital tasks across different platforms can be time-consuming and fragmented. This workflow consolidates control into Telegram, leveraging AI to understand your needs and automate actions across email, calendar, contacts, web search, note-taking (Notion), social media (X), and your personal knowledge base (Pinecone RAG), saving you time and effort. It ensures tasks are handled correctly using a built-in verification step. What this workflow does: This workflow acts as a central AI Agent that: Receives Input via Telegram: Accepts text messages, voice notes (transcribes them using OpenAI), or images (analyzes them using OpenAI). Understands Requests: Uses an AI Agent (powered by models like GPT) to interpret the user's instructions. Orchestrates Tools: Selects and uses the appropriate tools based on the request: Email (Gmail): Send, read, reply, draft, and label emails. Calendar (Google Calendar): Create, get, update, and delete events, managing attendees if needed. Contacts (Google Sheets): Look up and add contact information. Web Search (Tavily): Search the internet for up-to-date information. Knowledge Retrieval (Pinecone): Query your personal vector database (RAG). Note Taking (Notion): Create notes in a specified Notion database. Social Media (X/Twitter): Post tweets directly to X. Maintains Context: Uses Window Buffer Memory to remember recent interactions. Ensures Accuracy: Employs a "Think" tool to double-check tool usage and task completion. Responds via Telegram: Sends the results or confirmation back to the user in the Telegram chat. Setup: Telegram: Connect your Telegram bot credentials. AI Model: Connect your OpenAI API key. Email: Connect your Gmail account. Calendar: Connect your Google Calendar account. Contacts: Connect your Google Sheets account. Knowledge Base (RAG): Connect Pinecone. Note Taking: Connect Notion and configure Notion Database. Web Search: Add Tavily API key. Social Media: Connect your X (Twitter) account. (Refer to the included videos for detailed setup guidance) How to customize this workflow: AI Prompts:** Modify the system messages and prompts within the "AI Agent" node. AI Models:** Swap out the language model. Tools:** Add, remove, or replace tool nodes. Category: Automation, AI Agent, Personal Assistant, Productivity, Task Management, Telegram
+2

🔍🛠️Generate SEO-Optimized WordPress Content with AI Powered Perplexity Research

Generate SEO-Optimized WordPress Content with Perplexity Research Who is This For? This workflow is ideal for content creators, marketers, and businesses looking to streamline the creation of SEO-optimized blog posts for WordPress. It is particularly suited for professionals in the AI consulting and workflow automation industries. What Problem Does This Workflow Solve? Creating high-quality, SEO-friendly blog posts can be time-consuming and challenging, especially when trying to balance research, formatting, and publishing. This workflow automates the process by integrating research capabilities, AI-driven content creation, and seamless WordPress publishing. It reduces manual effort while ensuring professional-grade output. What This Workflow Does Research: Gathers detailed insights from Perplexity AI based on user-provided queries. Content Generation: Uses OpenAI models to create structured blog posts, including titles, slugs, meta descriptions, and HTML content optimized for WordPress. Image Handling: Automatically fetches and uploads featured images to WordPress posts. Publishing: Drafts the blog post directly in WordPress with all necessary formatting and metadata. Notification: Sends a success message via Telegram upon completion. Setup Guide Prerequisites: A WordPress account with API access. OpenAI API credentials. Perplexity AI API credentials. Telegram bot credentials for notifications. Steps: Import the workflow into your n8n instance. Configure API credentials for WordPress, OpenAI, Perplexity AI, and Telegram. Customize the form trigger to define your research query. Test the workflow using sample queries to ensure smooth execution. How to Customize This Workflow to Your Needs Modify the research query prompt in the "Form Trigger" node to suit your industry or niche. Adjust content generation guidelines in the "Copywriter AI Agent" node for specific formatting preferences. Replace the image URL in the "Set Image URL" node with your own source or dynamic image selection logic.

Build your own OpenAI and Telegram integration

Create custom OpenAI and Telegram workflows by choosing triggers and actions. Nodes come with global operations and settings, as well as app-specific parameters that can be configured. You can also use the HTTP Request node to query data from any app or service with a REST API.

OpenAI supported actions

Create an Assistant
Create a new assistant
Delete an Assistant
Delete an assistant from the account
List Assistants
List assistants in the organization
Message an Assistant
Send messages to an assistant
Update an Assistant
Update an existing assistant
Message a Model
Create a completion with GPT 3, 4, etc.
Classify Text for Violations
Check whether content complies with usage policies
Analyze Image
Take in images and answer questions about them
Generate an Image
Creates an image from a text prompt
Generate Audio
Creates audio from a text prompt
Transcribe a Recording
Transcribes audio into the text
Translate a Recording
Translate audio into the text in the english language
Delete a File
Delete a file from the server
List Files
Returns a list of files that belong to the user's organization
Upload a File
Upload a file that can be used across various endpoints

Telegram supported actions

Get
Get up to date information about a chat
Get Administrators
Get the Administrators of a chat
Get Member
Get the member of a chat
Leave
Leave a group, supergroup or channel
Set Description
Set the description of a chat
Set Title
Set the title of a chat
Answer Query
Send answer to callback query sent from inline keyboard
Answer Inline Query
Send answer to callback query sent from inline bot
Get
Get a file
Delete Chat Message
Delete a chat message
Edit Message Text
Edit a text message
Pin Chat Message
Pin a chat message
Send Animation
Send an animated file
Send Audio
Send a audio file
Send Chat Action
Send a chat action
Send Document
Send a document
Send Location
Send a location
Send Media Group
Send group of photos or videos to album
Send Message
Send a text message
Send and Wait for Response
Send a message and wait for response
Send Photo
Send a photo
Send Sticker
Send a sticker
Send Video
Send a video
Unpin Chat Message
Unpin a chat message

FAQs

  • Can OpenAI connect with Telegram?

  • Can I use OpenAI’s API with n8n?

  • Can I use Telegram’s API with n8n?

  • Is n8n secure for integrating OpenAI and Telegram?

  • How to get started with OpenAI and Telegram integration in n8n.io?

Need help setting up your OpenAI and Telegram integration?

Discover our latest community's recommendations and join the discussions about OpenAI and Telegram integration.
Artem
Trigi Digital
sérgio eduardo floresta filho
Andrew adawdad
PinkFloyd

Looking to integrate OpenAI and Telegram in your company?

Over 3000 companies switch to n8n every single week

Why use n8n to integrate OpenAI with Telegram

Build complex workflows, really fast

Build complex workflows, really fast

Handle branching, merging and iteration easily.
Pause your workflow to wait for external events.

Code when you need it, UI when you don't

Simple debugging

Your data is displayed alongside your settings, making edge cases easy to track down.

Use templates to get started fast

Use 1000+ workflow templates available from our core team and our community.

Reuse your work

Copy and paste, easily import and export workflows.

Implement complex processes faster with n8n

red iconyellow iconred iconyellow icon