# LinkedIn post generator with OpenAI and Gmail: n8n workflow

> Started by a clock, and works across Gmail, Google Drive and Notion. It hands the judgement calls to OpenAI.

Source: https://millionrounds.com/workflow/linkedin-post-generator-with-openai-and-gmail (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)

# LinkedIn post generator with OpenAI and Gmail

Started by a clock, and works across Gmail, Google Drive and Notion. It hands the judgement calls to OpenAI. 26 steps, 1 branch, 1 loop or waits: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenAI

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Flinkedin-post-generator-with-openai-and-gmail)

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

**1** Branch: places the flow splits

**1** Loop or waits

**3** Services it connects to

## The flow

Starts it 1 Model 6 Logic 10 Service 9

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

- 1 **Start Workflow** Schedule trigger *Starts it*
- 2 **4.1** Lm Chat Open Ai *Model*
- 3 **Structured Output Parser** Output Parser Structured *Model*
- 4 **Think** Tool Think *Model*
- 5 **Retrieve Keywords** Notion *Service*
- 6 **Research Agent** Agent *Model*
- 7 **Linkedin Copywriter** Agent *Model*
- 8 **Image Prompt Agent** Agent *Model*
- 9 **Prepare Query** Code *Logic*
- 10 **Create Selected_Articles Array** Code *Logic*
- 11 **Image Generation** Http Request *Service*
- 12 **Determine Nb of results** Http Request *Service*
- 13 **End of Loop** If *Logic*
- 14 **Convert to image** Convert To File *Service*
- 15 **Set Total** Set *Logic*
- 16 **Split Articles** Split Out *Logic*
- 17 **Set Page** Set *Logic*
- 18 **Google Drive** Google Drive *Service*
- 19 **Loop Over Items** Split In Batches *Logic*
- 20 **News API First Request - Page N** Http Request *Service*
- 21 **Notion** Notion *Service*
- 22 **Gmail** Gmail *Service*
- 23 **Extract News Content** Http Request *Service*
- 24 **Split Out1** Split Out *Logic*
- 25 **Aggregate** Aggregate *Logic*
- 26 **Edit Fields** Set *Logic*

## How it's built

- **Starts on:** A clock
- **Steps:** 26, with 1 branch, 1 loop or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Gmail, Google Drive, Notion
- **Model:** OpenAI

## Questions

What does it need to run?

An n8n account, plus your own Gmail, Google Drive and Notion accounts, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on a clock.

Does it use AI?

Yes. It calls OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 26 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 26 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%2Flinkedin-post-generator-with-openai-and-gmail)
- **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.

[Gmail](https://millionrounds.com/workflows?service=Gmail#library)[Google Drive](https://millionrounds.com/workflows?service=Google+Drive#library)[Notion](https://millionrounds.com/workflows?service=Notion#library)

## Workflows like it

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

- [**AI YouTube Shorts Creator: Prompt-Based Clipping, Dubbing** 26 steps · calls a model · FTP, Google Drive](https://millionrounds.com/workflow/ai-youtube-shorts-creator-prompt-based-clipping-dubbing)
- [**An AI agent to create faceless YouTube videos with OpenAI** 26 steps · calls a model · Google Drive](https://millionrounds.com/workflow/an-ai-agent-to-create-faceless-youtube-videos-with-openai)
- [**Competitive ad research & image generator with Apify** 26 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/competitive-ad-research-and-image-generator-with-apify)
- [**News collection & multi-platform publishing with OpenAI** 26 steps · calls a model · Discord, Gmail](https://millionrounds.com/workflow/news-collection-and-multi-platform-publishing-with-openai)
- [**Video speech enhancement with OpenAI Whisper** 26 steps · calls a model · FTP, Google Drive](https://millionrounds.com/workflow/video-speech-enhancement-with-openai-whisper)
- [**Arxiv paper trend search with Gmail and Supabase** 26 steps · Gmail, Supabase](https://millionrounds.com/workflow/arxiv-paper-trend-search-with-gmail-and-supabase)
