# Automated tweet generator & publisher with OpenAI and Discord: n8n workflow

> Started by an event in a connected app, and works across Discord, Google Sheets, Notion and X.

Source: https://millionrounds.com/workflow/automated-tweet-generator-and-publisher-with-openai-and-disc (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)

# Automated tweet generator & publisher with OpenAI and Discord

Started by an event in a connected app, and works across Discord, Google Sheets, Notion and X. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 33 steps, 2 branches: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenAI Retrieval

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fautomated-tweet-generator-and-publisher-with-openai-and-disc)

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

**2** Branches: places the flow splits

**0** Loops or waits

**4** Services it connects to

## The flow

Starts it 2 Model 12 Logic 8 Service 11

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

- 1 **OpenAI Chat Model** Lm Chat Open Ai *Model*
- 2 **Simple Memory** Memory Buffer Window *Model*
- 3 **Get_Brand_Brief** Tool Workflow *Model*
- 4 **Get_Content_Fedback** Tool Workflow *Model*
- 5 **Structured Output Parser** Output Parser Structured *Model*
- 6 **When clicking ‘Test workflow’** Manual trigger *Starts it*
- 7 **OpenAI Chat Model1** Lm Chat Open Ai *Model*
- 8 **Simple Memory1** Memory Buffer Window *Model*
- 9 **Check History** Google Sheets Tool *Service*
- 10 **Check Examples** Google Sheets Tool *Service*
- 11 **When Executed by Another Workflow** Execute Workflow trigger *Starts it*
- 12 **Get brand brief** Execute Workflow *Logic*
- 13 **OpenAI Chat Model2** Lm Chat Open Ai *Model*
- 14 **AI Content creator** Agent *Model*
- 15 **Idea creator** Chain Llm *Model*
- 16 **Get Brief** Execute Workflow *Logic*
- 17 **Rewriter** Agent *Model*
- 18 **Notion** Notion *Service*
- 19 **OpenAI** Open Ai *Model*
- 20 **Edit Fields** Set *Logic*
- 21 **Send post for approval** Discord *Service*
- 22 **Aggregate** Aggregate *Logic*
- 23 **Edit Fields2** Set *Logic*
- 24 **If2** If *Logic*
- 25 **Edit Fields1** Set *Logic*
- 26 **Post on X** Twitter *Service*
- 27 **Try Again** Discord *Service*
- 28 **Add post to examples** Google Sheets *Service*
- 29 **If1** If *Logic*
- 30 **Update history** Google Sheets *Service*
- 31 **Confirm of next try** Discord *Service*
- 32 **End of work** Discord *Service*
- 33 **Discord confirm** Discord *Service*

## How it's built

- **Starts on:** An event in a connected app
- **Steps:** 33, with 2 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Discord, Google Sheets, Notion, X
- **Model:** OpenAI
- **Retrieval:** Answers are drawn from documents you supply, not from the model alone

## Questions

What does it need to run?

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

What starts it?

It starts on an event in a connected app.

Does it use AI?

Yes. It calls OpenAI. Its answers draw on documents you give it, not on the model alone. 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%2Fautomated-tweet-generator-and-publisher-with-openai-and-disc)
- **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.

[Discord](https://millionrounds.com/workflows?service=Discord#library)[Google Sheets](https://millionrounds.com/workflows?service=Google+Sheets#library)[Notion](https://millionrounds.com/workflows?service=Notion#library)[X](https://millionrounds.com/workflows?service=X#library)

## Workflows like it

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

- [**Auto-generate & publish short videos with OpenAI** 33 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/auto-generate-and-publish-short-videos-with-openai)
- [**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)
- [**Create TikTok carousel posts with Upload Post** 33 steps · calls a model · Google Sheets](https://millionrounds.com/workflow/create-tiktok-carousel-posts-with-upload-post)
- [**Create self-improving TikTok carousels with Gemini and OpenAI** 33 steps · calls a model · Google Sheets](https://millionrounds.com/workflow/create-self-improving-tiktok-carousels-with-gemini-and-opena)
