Automation library · Content

Generate and publish LinkedIn posts with OpenAI and Gmail

Started by an arriving email, and works across Gmail, Google Sheets and LinkedIn. It hands the judgement calls to OpenAI. 24 steps, 1 branch: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAI

24 stepsLarge: read it before trusting it with anything live
1Branch: places the flow splits
0Loops or waits
3Services it connects to

The flow

Starts it 2Model 6Logic 8Service 8

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

  1. 1Start Content CycleManual triggerStarts it
  2. 2OpenAI Chat Model (Ideas)Lm Chat Open AiModel
  3. 3Gmail Trigger - Await ReplyGmail triggerStarts it
  4. 4OpenAI Chat Model (Drafts)Lm Chat Open AiModel
  5. 5ConfigurationSetLogic
  6. 6Generate LinkedIn Post IdeasAgentModel
  7. 7Ideas Output ParserOutput Parser StructuredModel
  8. 8Extract Reply Number & Correlation IDSetLogic
  9. 9Generate LinkedIn Post DraftsAgentModel
  10. 10Drafts Output ParserOutput Parser StructuredModel
  11. 11Prepare Ideas Email & Log DataSetLogic
  12. 12Get Row by Correlation IDGoogle SheetsService
  13. 13Prepare Drafts Email & Log DataSetLogic
  14. 14Log Idea Batch to Tracking SheetGoogle SheetsService
  15. 15Route by Approval StageSwitchLogic
  16. 16Update Sheet with DraftsGoogle SheetsService
  17. 17Email Ideas for ApprovalGmailService
  18. 18Prepare Draft RequestSetLogic
  19. 19Select Final Draft to PublishSetLogic
  20. 20Ignore Unrecognized ReplyNo OpLogic
  21. 21Email Drafts for ApprovalGmailService
  22. 22Publish Post to LinkedInLinked InService
  23. 23Update Sheet as PostedGoogle SheetsService
  24. 24Email Publish ConfirmationGmailService

How it's built

Starts on
An arriving email
Steps
24, with 1 branch
Size
Large: read it before trusting it with anything live
Connects to
Gmail, Google Sheets, LinkedIn
Model
OpenAI

Questions

What does it need to run?

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

What starts it?

It starts on an arriving email.

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 24 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 24 steps before you point it at anything that matters.