# AI-powered LinkedIn post automation with Gemini and OpenAI: n8n workflow

> Started by an incoming Telegram message, and works across LinkedIn and Telegram. It hands the judgement calls to Gemini and OpenAI.

Source: https://millionrounds.com/workflow/ai-powered-linkedin-post-automation-with-gemini-and-openai (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Content](https://millionrounds.com/workflows?category=Content#library)

# AI-powered LinkedIn post automation with Gemini and OpenAI

Started by an incoming Telegram message, and works across LinkedIn and Telegram. It hands the judgement calls to Gemini and OpenAI. 33 steps, 4 branches, 1 loop or waits: large, and worth reading before you trust it with anything live.

Large Calls a model: Gemini, OpenAI

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fai-powered-linkedin-post-automation-with-gemini-and-openai)

**33 steps** Large: read it before trusting it with anything live

**4** Branches: places the flow splits

**1** Loop or waits

**2** Services it connects to

## The flow

Starts it 3 Model 6 Logic 13 Service 11

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

- 1 **Google Gemini Chat Model** Lm Chat Google Gemini *Model*
- 2 **Schedule Trigger** Schedule trigger *Starts it*
- 3 **Telegram Trigger** Telegram trigger *Starts it*
- 4 **On form submission** Form trigger *Starts it*
- 5 **OpenAI Chat Model** Lm Chat Open Ai *Model*
- 6 **Code in JavaScript** Code *Logic*
- 7 **If** If *Logic*
- 8 **Edit Fields** Set *Logic*
- 9 **Get Viral post Apify Scraper** Http Request *Service*
- 10 **Generate post for manual topic** Agent *Model*
- 11 **Message a model** Google Gemini *Model*
- 12 **Posts Format** Code *Logic*
- 13 **Send message and wait for response** Telegram *Service*
- 14 **Code in JavaScript2** Code *Logic*
- 15 **Switch** Switch *Logic*
- 16 **If1** If *Logic*
- 17 **HTTP Request – Image Task** Http Request *Service*
- 18 **Viral Post Generator** Google Gemini *Model*
- 19 **Simple Text** Code *Logic*
- 20 **Perplexity1** Http Request *Service*
- 21 **Code in JavaScript1** Code *Logic*
- 22 **Set Task Info** Set *Logic*
- 23 **Perplexity** Http Request *Service*
- 24 **Create a post** Linked In *Service*
- 25 **HTTP Request - Get Status** Http Request *Service*
- 26 **Post Generator** Chain Llm *Model*
- 27 **Send a text message** Telegram *Service*
- 28 **Switch1** Switch *Logic*
- 29 **Set Finished Result** Set *Logic*
- 30 **Wait** Wait *Logic*
- 31 **Download Result Image** Http Request *Service*
- 32 **Create a post1** Linked In *Service*
- 33 **Send a text message1** Telegram *Service*

## How it's built

- **Starts on:** An incoming Telegram message
- **Steps:** 33, with 4 branches, 1 loop or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** LinkedIn, Telegram
- **Model:** Gemini, OpenAI

## Questions

What does it need to run?

An n8n account, plus your own LinkedIn and Telegram accounts, and a key for Gemini and OpenAI. 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 and OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 33 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 33 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fai-powered-linkedin-post-automation-with-gemini-and-openai)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[LinkedIn](https://millionrounds.com/workflows?service=LinkedIn#library)[Telegram](https://millionrounds.com/workflows?service=Telegram#library)

## Workflows like it

Also content, with the same services where possible, closest in size first.

- [**Auto-generate social media posts from URLs with Telegram** 33 steps · calls a model · Google Sheets, LinkedIn](https://millionrounds.com/workflow/auto-generate-social-media-posts-from-urls-with-telegram)
- [**Auto-post Amazon India affiliate videos to 6 platforms** 33 steps · calls a model · Apify, Google Sheets](https://millionrounds.com/workflow/auto-post-amazon-india-affiliate-videos-to-6-platforms)
- [**Automated Blog Creation & Multi-Platform Publishing** 33 steps · calls a model · Discord, LinkedIn](https://millionrounds.com/workflow/automated-blog-creation-and-multi-platform-publishing)
- [**Generate & auto-post social videos to multiple platforms** 33 steps · calls a model · Google Sheets, Telegram](https://millionrounds.com/workflow/generate-and-auto-post-social-videos-to-multiple-platforms)
- [**Videos with FAL AI and Blotato** 33 steps · calls a model · Google Sheets, Telegram](https://millionrounds.com/workflow/videos-with-fal-ai-and-blotato)
- [**Automate LinkedIn content from Twitter AI posts** 32 steps · calls a model · Google Sheets, LinkedIn](https://millionrounds.com/workflow/automate-linkedin-content-from-twitter-ai-posts)
