AutomationFlowsAI & RAG › Automate Research-based Newsletters with Perplexity, Gpt-4, and Image Generation

Automate Research-based Newsletters with Perplexity, Gpt-4, and Image Generation

ByTianyi @muzi on n8n.io

This n8n workflow automates the process of creating and sending high-quality newsletters with images generated by a GPT image generator. It is triggered on a schedule. 1 n8n workflow (json) 1 Setup tutorial doc 1 video guidance on how to connect n8n with all Google products 1…

Cron / scheduled trigger★★★★☆ complexityAI-powered29 nodesOutput Parser StructuredOpenAI ChatGoogle Cloud StorageGoogle SheetsHTTP RequestAgentGmailHTTP Request Tool
AI & RAG Trigger: Cron / scheduled Nodes: 29 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #3862 — we link there as the canonical source.

This workflow follows the Agent → Gmail 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 →

Download .json
{
  "id": "P720ebAZOgIrZJgN",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "The Ultimate AI Newsletter Automation [Public]",
  "tags": [
    {
      "id": "Hf04AVlu1zr8nTpB",
      "name": "GPT",
      "createdAt": "2025-04-24T18:16:56.636Z",
      "updatedAt": "2025-04-24T18:16:56.636Z"
    },
    {
      "id": "OObaiVGBXNLx59MY",
      "name": "Perplexity",
      "createdAt": "2025-05-04T14:54:47.515Z",
      "updatedAt": "2025-05-04T14:54:47.515Z"
    }
  ],
  "nodes": [
    {
      "id": "e169608e-b2a7-470c-b877-bee45c485471",
      "name": "Input",
      "type": "n8n-nodes-base.set",
      "position": [
        -1380,
        260
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "4e5e5e7a-4c92-424f-a157-a31ac2f5b58d",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1720,
        -160
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "6da73264-2d97-497b-8342-ad1786bd6e93",
      "name": "Sticky Note20",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3020,
        -960
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "58edfd76-0e0f-460f-bcf3-6ac5d45aaaff",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -2880,
        260
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "b607663f-1263-4632-aeaf-8f4575e4e7b9",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3020,
        -160
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "96cae626-1871-481d-9fa0-88ae708f686e",
      "name": "Structured Output Parser1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -320,
        480
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "da19e96b-9a95-4ab2-8a2a-79dcf89d85ff",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -780,
        500
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "7c097fcc-ffcd-482b-9faf-3dbdd1e33ada",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -860,
        -160
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "60fb32cf-7945-40cd-9aee-a2f481bdbdf4",
      "name": "Sticky Note15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -180,
        -160
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "46d68eec-7859-4dfb-b08a-2055306c6f9a",
      "name": "Sticky Note19",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        140,
        -160
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "2531e413-f100-428d-9e0e-ad74ddf08c20",
      "name": "SetImageURL1",
      "type": "n8n-nodes-base.set",
      "position": [
        820,
        -60
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "1e98df7b-b93a-487f-99c9-d8606bb10dcd",
      "name": "Google Cloud Storage 2",
      "type": "n8n-nodes-base.googleCloudStorage",
      "maxTries": 2,
      "position": [
        580,
        -60
      ],
      "parameters": {},
      "retryOnFail": true,
      "typeVersion": 1
    },
    {
      "id": "57ff49c1-4ea5-46fb-ac7a-b27d00c296d8",
      "name": "Sticky Note21",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        -160
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "652f1157-c2dc-4aaf-96ea-6bf8ceb00afa",
      "name": "GetClientList",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        720,
        460
      ],
      "parameters": {},
      "typeVersion": 4.5
    },
    {
      "id": "fbd85884-fb7c-4393-aff5-dba4506608f8",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        1140,
        200
      ],
      "parameters": {},
      "typeVersion": 3.1
    },
    {
      "id": "01af3ab0-0fac-4157-b387-85d5d98eb10e",
      "name": "GetNewsletterTopic",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -2540,
        260
      ],
      "parameters": {},
      "typeVersion": 4.5
    },
    {
      "id": "26cdf01c-59f8-49f2-a945-be9213beac74",
      "name": "UpdateStatus",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -2000,
        260
      ],
      "parameters": {},
      "typeVersion": 4.5
    },
    {
      "id": "23218309-46e4-4a0f-a4e3-88c3b58c8af7",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2640,
        -160
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "83f66b82-9e8a-4a61-957e-3acd34b9c1ae",
      "name": "GetFirstTopic",
      "type": "n8n-nodes-base.limit",
      "position": [
        -2260,
        260
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "df4b4eb9-35d5-48f7-96ef-7122349d8d11",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1080,
        -160
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "1ce76004-fa4d-40d7-b8ef-e87f24e37e39",
      "name": "GPT Image Generation",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -80,
        260
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "6d3487cc-b429-4b6b-bc9e-11978eefdca8",
      "name": "Convert to Binary File",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        220,
        260
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "72d3360a-e356-4e64-8b23-cdb9339f595b",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        220
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "fca76fc6-b899-4c5d-9c11-65b3d0a54887",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -660,
        440
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "7b0b3de2-1e8f-47b0-a010-4d11dba2675d",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -660,
        260
      ],
      "parameters": {},
      "typeVersion": 1.9
    },
    {
      "id": "fdfb5bae-c5fc-4361-a4d1-b16432d04db9",
      "name": "SendNewsletter",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1340,
        200
      ],
      "parameters": {},
      "typeVersion": 2.1
    },
    {
      "id": "975cebdf-8fa4-4ad9-9269-fe84452b27ed",
      "name": "Perplexity Search",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        -540,
        540
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "a40df2aa-dfb9-48b5-bd84-1ecb24e85244",
      "name": "Tavily WebSearch",
      "type": "n8n-nodes-base.httpRequestTool",
      "disabled": true,
      "position": [
        -540,
        900
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "dbe7b40e-e291-49e8-b82e-4e770f676c9b",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -660,
        720
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "timezone": "Europe/London",
    "callerPolicy": "workflowsFromSameOwner",
    "errorWorkflow": "DmAbBBIenIBq7D7F",
    "executionOrder": "v1"
  },
  "versionId": "23c4c84f-b713-4280-867f-856c198ec883",
  "connections": {
    "Input": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "SendNewsletter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "GPT Image Generation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SetImageURL1": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "UpdateStatus": {
      "main": [
        [
          {
            "node": "Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GetClientList": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "GetFirstTopic": {
      "main": [
        [
          {
            "node": "UpdateStatus",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SendNewsletter": {
      "main": [
        []
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "GetNewsletterTopic",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Tavily WebSearch": {
      "ai_tool": [
        []
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Perplexity Search": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "GetNewsletterTopic": {
      "main": [
        [
          {
            "node": "GetFirstTopic",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GPT Image Generation": {
      "main": [
        [
          {
            "node": "Convert to Binary File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to Binary File": {
      "main": [
        [
          {
            "node": "GetClientList",
            "type": "main",
            "index": 0
          },
          {
            "node": "Google Cloud Storage 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Cloud Storage 2": {
      "main": [
        [
          {
            "node": "SetImageURL1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This n8n workflow automates the process of creating and sending high-quality newsletters with images generated by a GPT image generator. It is triggered on a schedule. 1 n8n workflow (json) 1 Setup tutorial doc 1 video guidance on how to connect n8n with all Google products 1…

Source: https://n8n.io/workflows/3862/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This n8n automation workflow automates the creation, scripting, production, and posting of YouTube videos. It leverages AI (OpenAI), image generation (PIAPI), video rendering (Shotstack), and platform

Agent, OpenAI Chat, Airtable Tool +7
AI & RAG

Created by: Peyton Leveillee Last updated: October 2025

OpenAI Chat, Google Sheets, HTTP Request +5
AI & RAG

SEO Blog Article Generation Workflow. Uses outputParserStructured, httpRequest, agent, lmChatOpenAi. Scheduled trigger; 56 nodes.

Output Parser Structured, HTTP Request, Agent +4
AI & RAG

This workflow was born out of a very real problem.

Output Parser Structured, OpenAI Chat, Memory Buffer Window +11
AI & RAG

This n8n workflow revolutionizes Instagram content creation by automating everything from idea input to publishing high-quality, AI-generated posts with realistic images or infographics. Whether you'r

OpenAI Chat, Facebook Graph Api, Agent +5