This workflow corresponds to n8n.io template #5162 — we link there as the canonical source.
This workflow follows the Gmail → OpenAI recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "siRh53ZuPMkLBAVH",
"meta": {
"templateId": "5162",
"templateCredsSetupCompleted": true
},
"name": "AI-Powered LinkedIn Content Engine (n8n + OpenAI + Perplexity + Replicate)",
"tags": [
{
"id": "hK91R6qCdWj98Hkw",
"name": "LinkedIn",
"createdAt": "2025-07-11T16:14:19.949Z",
"updatedAt": "2025-07-11T16:14:19.949Z"
}
],
"nodes": [
{
"id": "3ef4644e-7c2e-4642-8bed-2ebbb30c9fb1",
"name": "\ud83d\uddbc\ufe0f Image Prompt Generator",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
2680,
480
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "chatgpt-4o-latest",
"cachedResultName": "CHATGPT-4O-LATEST"
},
"options": {},
"messages": {
"values": [
{
"content": "=\ud83c\udfaf Your task is to generate a **visual image prompt** for creating a **conceptual infographic** that will visually support a LinkedIn post.\n\nThe image should clearly and attractively illustrate the emotion, concept, or core message of the post \u2014 using an **abstract but readable design**, ideal for grabbing attention during scrolling.\n\n---\n\n\ud83d\udcc4 POST CONTENT: \n{{ $('Content Aggregator').item.json.message.content }}\n\n---\n\n\u2705 DESIRED VISUAL STYLE:\n- Abstract or conceptual infographic\n- Vector graphics, geometric shapes, minimal layouts\n- High contrast, clean lines, professional color palette\n- Readable and catchy, made to stand out in a LinkedIn feed\n\n\u2705 YOU CAN INCLUDE:\n- Names of tools (e.g., n8n, OpenAI, ChatGPT), in **stylized/visual form only**\n- Icons, symbolic representations, or simplified elements\n- Flow-based visuals, arrows, automation concepts, productivity metaphors\n\n\ud83d\udeab AVOID:\n- Hyper-realistic photography\n- Designs that are too abstract to understand\n- Detailed software interfaces or pixel art\n- Long text (labels like \u201cAI\u201d, \u201cFlow\u201d, \u201cData\u201d are fine)\n\n---\n\n\ud83e\udde0 VISUAL APPROACH SUGGESTIONS (pick one that fits best):\n- **Automation/Workflow:** Stylized flowchart with curved arrows, tool icons (e.g., n8n + OpenAI), few bold colors \n- **Productivity/Efficiency:** Central engine (e.g., AI) triggering smaller parts, clean connected shapes \n- **Small Team, Big Impact:** Small node with large radiating influence, scalable bar graphs \n- **Tool Integration:** Puzzle of flat-style icons (e.g., Gmail, Notion, Zapier) fitting together visually\n\n---\n\n\ud83c\udfa8 GRAPHIC STYLE REQUIREMENTS:\n- Vector, flat design or semi-isometric\n- 2\u20133 primary colors, professional and clean\n- No long text or realistic 3D\n- Balanced, center-weighted composition\n\n---\n\n\u270f\ufe0f OUTPUT FORMAT:\nReturn **only the final image generation prompt** (ready to use in DALL\u00b7E or similar). No further explanation.\n\n---\n\n**Prompt:**\n"
}
]
}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.8
},
{
"id": "de8492e6-9fa5-4da6-90db-95a2c979ed2b",
"name": "Code",
"type": "n8n-nodes-base.code",
"position": [
3040,
480
],
"parameters": {
"jsCode": "const imagePrompt = $input.first().json.message.content\n\n// Clean and escape the prompt for JSON\nconst cleanPrompt = imagePrompt\n .replace(/\"/g, '\\\\\"') // Escape quotes\n .replace(/\\n/g, ' ') // Remove line breaks\n .replace(/\\r/g, ' ') // Remove carriage returns\n .trim(); // Remove extra whitespace\n\nreturn {\n json: {\n clean_prompt: cleanPrompt\n }\n};\n"
},
"typeVersion": 2
},
{
"id": "a1d79590-cd7a-4a8f-9027-534891c233e9",
"name": "Generate an image",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
3320,
480
],
"parameters": {
"model": "gpt-image-1",
"prompt": "={{ $json.clean_prompt }}",
"options": {},
"resource": "image"
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.8
},
{
"id": "2f23ae1c-9bb0-4a2a-924d-ab65ccf42296",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
20,
280
],
"parameters": {
"rule": {
"interval": [
{
"field": "weeks",
"triggerAtDay": [
1
]
}
]
}
},
"typeVersion": 1.2
},
{
"id": "5e26fa9f-c556-4469-80da-7b29633702d9",
"name": "Click to start",
"type": "n8n-nodes-base.manualTrigger",
"position": [
20,
480
],
"parameters": {},
"typeVersion": 1
},
{
"id": "c0f1a648-55be-448a-a775-7b683a7db088",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-60,
-80
],
"parameters": {
"color": 4,
"width": 280,
"height": 720,
"content": "\ud83d\udd52 WORKFLOW STARTER\nThis triggers the content generation process automatically.\n\nSetup Required:\n\u2022 Set your preferred trigger interval. \n\nBelow I suggest two possible trigger. If you want to automate your workflow, change the trigger with the schedule. "
},
"typeVersion": 1
},
{
"id": "afec1b86-eda6-42fd-b800-bd92663b5eb5",
"name": "\ud83d\udd0d Research the Trends",
"type": "n8n-nodes-base.perplexity",
"position": [
360,
480
],
"parameters": {
"model": "sonar",
"options": {},
"messages": {
"message": [
{
"content": "=Research the topic: {{ $json.body.Topic }}\n\nAdditional context: {{ $json.body.Additional_Context }}\n\nI\u2019m researching **AI Agents and Large Language Models (LLMs)** with the goal of creating high-quality, factual content focused on **practical applications in the workplace**.\n\nPlease return only **verifiable, recent information** (from 2024\u20132025) and structure the response around these points:\n\n1. Summarize **recent news, trends, or innovations** in the space \u2014 include **exact dates** and **direct source URLs**.\n2. Highlight **concrete business use cases** or deployments \u2014 focus on **measurable results** and clearly defined workplace benefits.\n3. Identify **high-signal discussions** on platforms like Reddit, X, or reputable forums \u2014 ideally with links to original threads.\n4. Include **expert opinions or statements** from industry professionals or research-backed reports \u2014 ensure sources are cited.\n\n---\n\n\ud83d\udccc **CRUCIAL RULES:**\n- Only include **verified facts** with **direct URLs** to sources.\n- **No vague claims**, unlinked stats, or general AI hype.\n- If data is unavailable or unverifiable, explicitly write: *\"No recent verifiable information found.\"*\n- If a source is outdated or lacks context, state the limitation.\n\n---\n\n\ud83c\udfaf **DELIVERABLE:**\nProvide a concise list of **exactly 3 key insights**, clearly labeled and sourced. Use bullet points. No filler.\n\n---\n\n\ud83d\udeab **Do NOT include:**\n- Speculative content\n- Marketing fluff or overly technical research with no workplace application\n- Sections titled \u201cContent Angles\u201d or \u201cVerified Insights\u201d \u2014 just go straight to the findings.\n\n---\n\n\ud83e\uddf1 **FORMAT Example:**\n1. **[Insight Title]** \n - Summary of the finding \n - Source: [URL] \n - Date: [Month YYYY]\n\n2. \u2026\n\nIf nothing meaningful is found for a point, write: *\"No recent verifiable information found.\"*\n"
}
]
},
"requestOptions": {}
},
"credentials": {
"perplexityApi": {
"name": "<your credential>"
}
},
"executeOnce": false,
"typeVersion": 1
},
{
"id": "603c1b98-afa1-41e8-b47f-2e434449ad63",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
240,
-80
],
"parameters": {
"color": 3,
"width": 340,
"height": 720,
"content": "\ud83e\udde0 Perplexity Research \u2013 Trends & Use Cases\n\nThis node queries the Perplexity API to retrieve verified, up-to-date insights on a specific topic \u2014 ideal for identifying real-world trends, use cases, and expert opinions.\n\n\u2705 Why Perplexity?\nAmong available LLMs, Perplexity offers the most source-driven answers, making it the top choice for factual content creation.\n\n\u2699\ufe0f Setup Required\n\nCreate a Perplexity API account and set your API key in the credentials.\n\n\u270f\ufe0f How to Personalize\n\nOpen the prompt inside the node and:\n\nChange the main topic you want to research (e.g., switch from AI Agents to AI in Healthcare)\n\nAdjust the number of insights (default = 3)"
},
"typeVersion": 1
},
{
"id": "ab88ea12-c30d-4080-9eff-47340511d2e4",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
600,
-80
],
"parameters": {
"width": 340,
"height": 720,
"content": "\ud83d\udce8 Gmail \u2013 Select the Best Topic (Human-in-the-loop)\n\nThis node sends you an email listing the 3 main topics extracted from the previous Perplexity node. You act as the human-in-the-loop, choosing which topic to use for your content.\n\n\u2705 Why Gmail?\nIt's quick, reliable, and always accessible \u2014 whether you're on your phone or laptop.\n\n\u2699\ufe0f Setup Required\n\nConnect your Gmail account\n\nSet your email address as the recipient\n\n\u270f\ufe0f How to Personalize\n\nCustomize the email subject and body to fit your tone or workflow\n\nDecide what information to display (currently: topic titles only)\n\nOptionally, replace Gmail with Telegram or Slack for faster interaction"
},
"typeVersion": 1
},
{
"id": "d4705dde-36a4-475e-8440-f3060588500d",
"name": "Select the Best Topic",
"type": "n8n-nodes-base.gmail",
"position": [
720,
480
],
"parameters": {
"sendTo": "abcloudart@gmail.com",
"message": "=Hi there! Here are 3 topic ideas generated by Perplexity:\n\n1\ufe0f\u20e3 {{ $json.search_results[0].title }}\n2\ufe0f\u20e3 {{ $json.search_results[1].title }}\n3\ufe0f\u20e3 {{ $json.search_results[2].title }}\n\n\ud83d\udce9 Just reply to this email with the number of the idea you want to move forward with (1, 2, or 3).\n\nThe workflow will automatically continue from there! \ud83d\ude80",
"options": {},
"subject": "Perplexity Research \u2013 Trends & Use Cases",
"operation": "sendAndWait",
"formFields": {
"values": [
{
"fieldType": "dropdown",
"fieldLabel": "Quale vuoi approfondire? ",
"fieldOptions": {
"values": [
{
"option": "=1 - {{ $json.search_results[0].title }}"
},
{
"option": "=2 - {{ $json.search_results[1].title }}"
},
{
"option": "=3 - {{ $json.search_results[2].title }}"
}
]
}
}
]
},
"responseType": "customForm"
},
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
},
"typeVersion": 2.1
},
{
"id": "1d8651a7-45a2-4ade-9f34-732d982488ea",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-60,
660
],
"parameters": {
"color": 5,
"width": 640,
"height": 220,
"content": "\ud83d\uddc2\ufe0f Legend \u2013 Node Color Coding\nTo help navigate and document this workflow, notes are color-coded based on their function:\n\n\ud83d\udd35 Blue \u2013 General information or high-level context\n\ud83d\udfe2 Green \u2013 Workflow triggers\n\ud83d\udfe1 Yellow \u2013 Standard processing nodes\n\ud83d\udd34 Red \u2013 Nodes that require API integration and may incur execution costs\n\nUse this legend as a reference before diving into the detailed node explanations."
},
"typeVersion": 1
},
{
"id": "cc84f9f0-057a-4136-8aef-45852fecc040",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
960,
-80
],
"parameters": {
"color": 3,
"width": 600,
"height": 720,
"content": "\ud83e\udde0 OpenAI \u2013 Content Creation Support\n\nThis is one of the core nodes of the workflow. It generates the actual LinkedIn post based on the topic you selected and the insights retrieved earlier.\n\nHere, you can review and personalize the prompt to reflect your personal information, tone of voice, and the desired output language (currently set to Italian for my audience).\n\n\u2699\ufe0f Setup Required\n\nYou\u2019ll need an OpenAI API key (note: this is different from a ChatGPT account)\n\n\u26a0\ufe0f API calls have a cost, so choose your model wisely\n\u2192 I suggest balancing performance and price \u2014 you're writing a LinkedIn post, not launching a rocket \ud83d\ude80\n\n\u270f\ufe0f How to Personalize\n\nOpen the prompt inside the node and replace my personal details with your own\n\nYou can customize:\n\nThe writing style (e.g., tone, use of emojis, structure)\n\nThe language of the output\n\nFor an extra check, paste the prompt into ChatGPT and refine it there based on your style"
},
"typeVersion": 1
},
{
"id": "121a6e68-f406-41f1-aaeb-dc04c8532c2c",
"name": "\u270d\ufe0f Content Creator",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
1140,
480
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "chatgpt-4o-latest",
"cachedResultName": "CHATGPT-4O-LATEST"
},
"options": {},
"messages": {
"values": [
{
"content": "=You are helping write a **LinkedIn post** for **Alberto Bordoni**, an Assistant Manager with a strong background in **Data, Artificial Intelligence, and Program Management**. He's also a **trainer and YouTube content creator**, passionate about productivity, automation, and practical AI applications in the workplace.\n\n---\n\n\ud83d\udd0e **TOPIC to focus on:** \n{{ $json.data['Quale vuoi approfondire? '] }}\n\n---\n\n\ud83d\udce5 **RESEARCH INSIGHTS (use only if directly relevant to the topic):** \n{{ $('\ud83d\udd0d Research the Trends').item.json.choices[0].message.content }}\n\n---\n\n\ud83d\udde3\ufe0f **LANGUAGE OF THE OUTPUT:** \nPlease write in **{{ $json.data['Language'] || 'Italiano' }}** \n(The user can change this input in the node manually)\n\n---\n\n\ud83c\udfaf **CONTENT OBJECTIVES:** \nYour goal is to write a **medium-length LinkedIn post**, based on Alberto's **personal perspective and real experiences**, using a **human, thoughtful, and slightly ironic tone**. You can include short personal anecdotes or reflections that tie directly to the chosen topic.\n\nThe tone should feel **authentic, not corporate** \u2014 as if Alberto is speaking directly to his audience, sharing lessons or thoughts rather than teaching or preaching.\n\n---\n\n\u2705 **KEY CREATION GUIDELINES:**\n\n1. **Start from personal experience** \u2013 avoid opening with research or generic statements \n2. **Keep it real** \u2013 write like a human: warm, curious, and conversational \n3. **Include 1\u20132 relevant research points** only if they support the main story \n4. **Add emojis sparingly** \u2013 only if they help with readability \n5. **Use headings or bold for readability** (especially for web/email display)\n\n---\n\n\ud83d\udeab **AVOID:**\n\n- Making research the main character \u2013 Alberto\u2019s voice should lead \n- Generic \u201ctips\u201d or lists without context \n- Aggressive or overly directive tone \n- Overuse of buzzwords \n- Fabricating data or quotes\n\n---\n\n\ud83d\udd27 **WRITING PROCESS**\n\n**Step 1: Build the main narrative** \n- Use the topic as your starting point \n- Frame it around a real thought, reflection, or question Alberto might have \n- Include concrete details or moments from his experience \n\n**Step 2: Enrich with relevant research** \n- Pick 1 or 2 key data points to validate the message \n- Insert them smoothly with phrases like: \n - \u201cRecent data shows\u2026\u201d \n - \u201cInterestingly, this aligns with\u2026\u201d \n\n**Final Tip:** \nMake sure it sounds like something Alberto would actually say \u2014 smart but approachable, grounded in real work, and a bit witty when it fits.\n\n---\n\n\ud83e\uddea BONUS: Try to make it feel **undetectable as AI-generated**. \nWrite as if you\u2019re helping a real person put their thoughts into words \u2014 not generating a piece from scratch.\n\n"
}
]
}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"executeOnce": false,
"typeVersion": 1.8
},
{
"id": "b33c7433-6ca5-447a-aff2-98989b9ec3ba",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
600,
660
],
"parameters": {
"color": 5,
"width": 420,
"height": 520,
"content": "## \ud83d\ude80 Automate LinkedIn Content Creation with Perplexity, OpenAI & Gmail\n\nWhat This Workflow Does:\n- Generates original, research-based LinkedIn posts\n- Combines AI insights with personal storytelling\n- Includes human-in-the-loop selection & revision steps\n- Automatically creates a conceptual image via DALL\u00b7E 3\n- Sends the final post and image via email, ready to publish\n\nPerfect For:\n- Professionals who want to share high-quality AI-assisted content\n- Content creators balancing consistency and authenticity\n- Consultants and solopreneurs building a personal brand\n- Anyone who wants to turn AI research into personal, sharable stories"
},
"typeVersion": 1
},
{
"id": "51314562-a031-4cfb-9f16-25e74fcebe50",
"name": "Sticky Note9",
"type": "n8n-nodes-base.stickyNote",
"position": [
1040,
660
],
"parameters": {
"color": 5,
"width": 520,
"height": 520,
"content": "## \ud83d\udccb WORKFLOW PROCESS OVERVIEW\n\nStep 1: \ud83d\udd0d Perplexity finds 3 recent, verifiable AI-related topics \n\nStep 2: \ud83d\udce7 Email sent \u2013 you choose your favorite topic \n\nStep 3: \u270d\ufe0f OpenAI generates a LinkedIn post draft \n\nStep 4: \ud83d\udce8 You review the post and approve or suggest changes \n \nStep 5: \ud83d\udee0\ufe0f If needed, AI revises the post based on your feedback \n\nStep 6: \ud83c\udfa8 DALL\u00b7E creates a conceptual image to match the content \n\nStep 7: \ud83d\udcec Final email sent \u2013 post text + image ready to copy-paste on LinkedIn \n"
},
"typeVersion": 1
},
{
"id": "810d39b7-8c7a-4671-a6c5-d80f8307ac52",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
1580,
-80
],
"parameters": {
"width": 300,
"height": 720,
"content": "\ud83d\udcdd Edit Fields \u2013 Content Aggregator & Finalizer\nThis node collects and consolidates the final version of the content before it's published or sent.\n\nWhile it may look simple, it's strategically important because it:\n\n\ud83d\udcac Receives the original content from the OpenAI node\n\n\ud83e\udde0 Will also receive updated content from a future node designed to review and refine the post\n\n\u2699\ufe0f Setup Required\n\nNo specific setup needed \u2014 just ensure:\n\nInput from OpenAI is correctly mapped\n\nFuture inputs (e.g., from the review process) are connected to overwrite or merge as needed"
},
"typeVersion": 1
},
{
"id": "64298786-6b84-49cb-aef8-7994b09a6b4a",
"name": "Content Aggregator",
"type": "n8n-nodes-base.set",
"position": [
1680,
480
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "b5a1c3c6-2029-4913-8667-97d083425db2",
"name": "message.content",
"type": "string",
"value": "={{ $json.message.content }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "0657ddd6-1923-479a-85cd-1b028e569569",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
1900,
-80
],
"parameters": {
"width": 420,
"height": 720,
"content": "\u2705 Gmail \u2013 Content Review & Approval\nThis node sends the drafted LinkedIn post to your personal email, allowing a final manual review and approval step.\n\nIn the email, you'll find the full content generated by OpenAI.\nYou\u2019ll be asked: \"Do you like the content?\"\n\nIf your answer is Yes, the workflow proceeds automatically\nIf No, you can suggest improvements using a form in the next node \u2014 those suggestions will be used to refine the content\n\n\u2699\ufe0f Setup Required\n\nConnect your Gmail account\nSet your personal email as the recipient\nEnsure the message content is correctly mapped from the Edit Fields node\n\n\u270f\ufe0f How to Personalize\n\nCustomize the subject and message tone to fit your voice\nYou can modify the approval logic (e.g., based on keywords or reply tracking)\nOptionally, add an alternative channel (e.g., Telegram or Slack) for faster interactions"
},
"typeVersion": 1
},
{
"id": "b472a93d-49a4-4822-96ad-8cf7efdf4ad3",
"name": "Content Review & Approval",
"type": "n8n-nodes-base.gmail",
"position": [
2060,
480
],
"parameters": {
"sendTo": "abcloudart@gmail.com",
"message": "=Hi! \ud83d\udc4b \nYour LinkedIn post on the topic you selected is ready! \nHere\u2019s the draft \u2014 let me know what you think:\n\n{{ $json.message.content }}\n\n\ud83d\udc4d If you like it, just reply with \"Yes\" and the workflow will continue.\n\n\u270f\ufe0f If you'd like to make changes, you can suggest edits in the next step.",
"options": {},
"subject": "Review LinkedIn Post ",
"operation": "sendAndWait",
"formFields": {
"values": [
{
"fieldType": "dropdown",
"fieldLabel": "Do you like the content?",
"fieldOptions": {
"values": [
{
"option": "Yes"
},
{
"option": "To review"
}
]
},
"requiredField": true
},
{
"fieldLabel": "Proposal"
},
{
"fieldType": "={{ $json.message.content }}",
"fieldLabel": "Testo ",
"fieldOptions": {
"values": [
{}
]
}
}
]
},
"responseType": "customForm"
},
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
},
"typeVersion": 2.1
},
{
"id": "2fbc7b1d-12d3-44ce-981d-de1857b19537",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
2340,
-80
],
"parameters": {
"width": 300,
"height": 720,
"content": "\ud83d\udd00 IF \u2013 Content Approval Routing\nThis node acts as a decision point based on your reply to the Gmail approval email.\n\nIf the response is \"Yes\", the workflow proceeds to generate a custom image with OpenAI\n\nIf the response is not Yes (or left empty), it redirects to the Content Reviewer node for further editing suggestions\n\n\u2699\ufe0f Setup Required\n\nMake sure the email reply content is captured correctly (e.g., via webhook or IMAP integration)\n\nThe condition should check for a clear \"Yes\" response \u2014 case-insensitive and trimmed\n\n\u270f\ufe0f How to Personalize\n\nYou can modify the condition logic to accept variations like \u201cSure\u201d, \u201cGo\u201d, or emoji replies \ud83d\udc4d"
},
"typeVersion": 1
},
{
"id": "1cab82ee-7946-414d-867d-e7a859478465",
"name": "IF \u2013 Content Approval Routing",
"type": "n8n-nodes-base.if",
"position": [
2440,
480
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "9fdac4ae-1eec-4042-947e-3256038f628e",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.data['Ti piace?'] }}",
"rightValue": "Yes"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "16289995-beac-4d68-9a6f-c8dfc9cdc00d",
"name": "Sticky Note10",
"type": "n8n-nodes-base.stickyNote",
"position": [
1580,
660
],
"parameters": {
"color": 3,
"width": 1060,
"height": 520,
"content": "\ud83e\uddd0 OpenAI \u2013 Content Reviewer\nThis node helps you refine the LinkedIn post based on feedback, ensuring the final version is more aligned with your tone, goals, and personal voice.\n\nIt compares:\n\nThe original content generated earlier\n\nThe improvement suggestions you've entered manually in the previous step\n\nThen it generates an updated version, keeping your writing style and storytelling priorities in mind.\n\n\u2699\ufe0f Setup Required\n\nConnect this node to both:\n\nThe initial OpenAI content node\n\nThe manual feedback collection node\n\nMake sure the structure of the prompt supports personalization\n\n\u270f\ufe0f How to Personalize\n\nAdjust the prompt to include more style instructions if needed\n\nYou can experiment with different OpenAI models (e.g., GPT-4 Turbo for longer reasoning)\n\n"
},
"typeVersion": 1
},
{
"id": "1dc611c7-d02e-4666-90e8-4f0b20e2da7d",
"name": "\u270d\ufe0f Content Reviewer",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
2320,
840
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "chatgpt-4o-latest",
"cachedResultName": "CHATGPT-4O-LATEST"
},
"options": {},
"messages": {
"values": [
{
"content": "=You are helping **Alberto Bordoni**, an Assistant Manager with a strong background in **Data, Artificial Intelligence, and Program Management**, experienced in consulting, training, and content creation on productivity and AI at work.\n\nBelow, you\u2019ll find two important pieces of content:\n\n\u270d\ufe0f **Original post draft (to be improved):** \n{{ $('\u270d\ufe0f Content Creator').item.json.message.content }}\n\n\ud83d\udee0\ufe0f **Feedback / improvement suggestions from Alberto:** \n{{ $json.data['Proposta di miglioramento'] }}\n\n---\n\n\ud83c\udfaf Your goal:\nRevise the original post, implementing Alberto\u2019s suggestions while staying aligned with his personal tone and style. The result should feel human, reflective, and personal \u2014 not generic or overly polished.\n\n---\n\n\ud83d\udcd8 **ABOUT ALBERTO (for writing context):** \n- Assistant Manager in a consulting firm, focused on Data & AI \n- Background in marketing, with a passion for program management and automation \n- Trainer and YouTube creator sharing insights on Excel, productivity, and AI \n- Works on complex digital transformation projects using AI-driven solutions \n- Interested in self-growth and techniques for working smarter\n\n---\n\n\ud83e\udded **CONTENT PRIORITIES:** \n1. **Share thoughts and reflections** \u2013 not a \u201chow-to\u201d or a lesson \n2. **Blend information with light irony** \u2013 human and insightful \n3. **Enrich with data only when it adds value** \n4. **Personal storytelling comes first** \u2013 use it as the main narrative anchor\n\n---\n\n\ud83d\udcca **RESEARCH DATA (use only if relevant to the selected topic):** \n{{ $('\ud83d\udd0d Research the Trends').item.json.choices[0].message.content }}\n\nUse research as **support**, not as the central message.\n\n**Ratio**: \n- Personal experience + reflections = 80% \n- Research data = 20%\n\nUse phrases like: \n- \u201cRecent data shows...\u201d \n- \u201cThis aligns with insights from...\u201d\n\n---\n\n\ud83d\udeab **AVOID:** \n- Starting with stats instead of stories \n- Over-relying on research \n- Giving generic advice \n- Letting the research overshadow personal voice \n- Using a bossy or impersonal tone \n- Fabricating facts or quotes\n\n---\n\n\u2705 **MAKE SURE:** \n- The topic and context lead the content \n- Research is helpful but not dominant \n- Alberto\u2019s unique voice and experience are front and center \n- Tone feels natural and genuinely written by a human \n"
}
]
}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"executeOnce": false,
"typeVersion": 1.8
},
{
"id": "790ac9e4-571e-4fea-9e94-5c8d927390ed",
"name": "Sticky Note11",
"type": "n8n-nodes-base.stickyNote",
"position": [
2660,
-80
],
"parameters": {
"color": 3,
"width": 300,
"height": 720,
"content": "\ud83d\uddbc\ufe0f OpenAI \u2013 Image Prompt Generator\nThis node helps generate a custom image prompt based on the content of your LinkedIn post, using OpenAI\u2019s image engine (DALL\u00b7E).\n\nThe image is meant to visually support the message of the post with an abstract infographic style that works well on LinkedIn.\n\n\u270f\ufe0f How to Personalize\n\nEdit the image prompt to match your visual preferences or message tone\n\nChoose the best style based on your content type (workflow, integration, productivity, etc.)\n\nYou can fine-tune the balance between concept and clarity by adjusting color, shape, and complexity in the prompt"
},
"typeVersion": 1
},
{
"id": "5926b3ea-a517-4c36-a2e1-2ca23d3718a3",
"name": "Sticky Note12",
"type": "n8n-nodes-base.stickyNote",
"position": [
2980,
-80
],
"parameters": {
"width": 220,
"height": 720,
"content": "\ud83e\uddf9 Code \u2013 Clean Image Prompt for API\nThis simple Code node cleans up the image prompt generated in the previous step to make it safe and compact for API calls (like OpenAI\u2019s image generation).\n\n\u2699\ufe0f What it does\n\nEscapes \" characters\n\nRemoves \\n and \\r (line breaks / returns)\n\nTrims unnecessary whitespace\n\nOutputs a clean_prompt field, ready to use in the API"
},
"typeVersion": 1
},
{
"id": "827b880a-9328-4f95-9cd1-a232b8345c65",
"name": "Sticky Note13",
"type": "n8n-nodes-base.stickyNote",
"position": [
3220,
-80
],
"parameters": {
"color": 3,
"width": 300,
"height": 720,
"content": "\ud83e\udde0 OpenAI \u2013 Generate Image (DALL\u00b7E 3)\nThis node takes the cleaned image prompt and uses OpenAI\u2019s image generation model (DALL\u00b7E 3) to create a visual asset ready to be published with the LinkedIn post.\n\n\u2699\ufe0f Setup Required\n\nAn OpenAI API key with image generation access\n\nThe correct model selected (e.g., \"dall-e-3\" or \"gpt-4-vision-preview\" depending on API route)\n\nOptional: adjust generation parameters (image size, quality, style, etc.)\n\nNote: Image generation has a cost \u2013 use the API wisely\n"
},
"typeVersion": 1
},
{
"id": "4f962698-3e27-4898-8663-515fad69a138",
"name": "Sticky Note14",
"type": "n8n-nodes-base.stickyNote",
"position": [
3540,
-80
],
"parameters": {
"width": 340,
"height": 720,
"content": "\ud83d\udcec Gmail \u2013 Final Delivery of Your LinkedIn Post\nThis node sends a summary email that contains your finalized LinkedIn post and the generated image. It\u2019s the last step of the workflow \u2014 delivering everything you need in one place.\n\n\u2699\ufe0f Setup Required\n\nConnect your Gmail account\n\nSet your recipient address (your own or someone else\u2019s for review)\n\nMake sure the image URL or attachment is correctly mapped from the previous node\n\n\ud83d\udce6 What\u2019s Included in the Email\n\n\u2705 The final post content (text block ready to copy-paste)\n\n\ud83d\uddbc\ufe0f The generated image from DALL\u00b7E\n\n\u270f\ufe0f How to Personalize\n\nAdjust the email subject to reflect your brand or content type"
},
"typeVersion": 1
},
{
"id": "e7a228d5-e079-42c1-8024-9b41da4e36d5",
"name": "Final Content Delivery",
"type": "n8n-nodes-base.gmail",
"position": [
3660,
480
],
"parameters": {
"sendTo": "abcloudart@gmail.com",
"message": "=Hi! \ud83d\udc4b\n\nHere\u2019s your finalized LinkedIn post, based on your selected topic and enhanced with research and AI support:\n\n{{ $('Content Aggregator').item.json.message.content }}\n\n",
"options": {},
"subject": "Ecco il tuo post completo per LinkedIN"
},
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
},
"typeVersion": 2.1
}
],
"active": false,
"settings": {},
"versionId": "a61255b1-0849-4ea7-903f-47fe44964658",
"connections": {
"Code": {
"main": [
[
{
"node": "Generate an image",
"type": "main",
"index": 0
}
]
]
},
"Click to start": {
"main": [
[
{
"node": "\ud83d\udd0d Research the Trends",
"type": "main",
"index": 0
}
]
]
},
"Generate an image": {
"main": [
[
{
"node": "Final Content Delivery",
"type": "main",
"index": 0
}
]
]
},
"Content Aggregator": {
"main": [
[
{
"node": "Content Review & Approval",
"type": "main",
"index": 0
}
]
]
},
"Select the Best Topic": {
"main": [
[
{
"node": "\u270d\ufe0f Content Creator",
"type": "main",
"index": 0
}
]
]
},
"Final Content Delivery": {
"main": [
[]
]
},
"\u270d\ufe0f Content Creator": {
"main": [
[
{
"node": "Content Aggregator",
"type": "main",
"index": 0
}
]
]
},
"\u270d\ufe0f Content Reviewer": {
"main": [
[
{
"node": "Content Aggregator",
"type": "main",
"index": 0
}
]
]
},
"\ud83d\udd0d Research the Trends": {
"main": [
[
{
"node": "Select the Best Topic",
"type": "main",
"index": 0
}
]
]
},
"Content Review & Approval": {
"main": [
[
{
"node": "IF \u2013 Content Approval Routing",
"type": "main",
"index": 0
}
]
]
},
"\ud83d\uddbc\ufe0f Image Prompt Generator": {
"main": [
[
{
"node": "Code",
"type": "main",
"index": 0
}
]
]
},
"IF \u2013 Content Approval Routing": {
"main": [
[
{
"node": "\ud83d\uddbc\ufe0f Image Prompt Generator",
"type": "main",
"index": 0
}
],
[
{
"node": "\u270d\ufe0f Content Reviewer",
"type": "main",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
gmailOAuth2openAiApiperplexityApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
AI-Powered LinkedIn Content Engine (n8n + OpenAI + Perplexity + Replicate). Uses openAi, perplexity, gmail. Scheduled trigger; 28 nodes.
Source: https://github.com/fraserbrownirl/n8n-workflow-library/blob/17dc3b797e883acf24bd3036d9029efc463c8cfd/workflows/Create_Research_Based_LinkedIn_Posts_with_OpenAI_Perplexity_and_Human_Review.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
What This Workflow Does: Generates original, research-based LinkedIn posts Combines AI insights with personal storytelling Includes human-in-the-loop selection & revision steps Automatically creates a
AI-Powered LinkedIn Content Engine (n8n + OpenAI + Perplexity + Replicate). Uses openAi, perplexity, gmail. Scheduled trigger; 28 nodes.
This n8n template demonstrates how to automate the full production cycle of a professional weekly newsletter. It combines AI-powered market research, editorial drafting, compliance validation, and an
This fully automated AI Twin Viral News system researches the latest trending news in any niche or industry, then generates talking-head AI clone videos WITHOUT having to film or edit yourself. This c
This workflow auto-generates a personalized research report on any prospect who books a call with you—using their LinkedIn profile and advanced web research.