AutomationFlowsAI & RAG › AI Newsletter Content Generator

AI Newsletter Content Generator

Original n8n title: Newsletter Agent

Newsletter Agent. Uses httpRequest. Event-driven trigger; 5 nodes.

Event trigger★★★★☆ complexity5 nodesHTTP Request
AI & RAG Trigger: Event Nodes: 5 Complexity: ★★★★☆ Added:

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
{
  "name": "Newsletter Agent",
  "nodes": [
    {
      "parameters": {},
      "id": "5f1cd3f3-4e55-460a-9e3f-bd81d4b2afd6",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        220,
        320
      ]
    },
    {
      "parameters": {
        "keepOnlySet": true,
        "values": {
          "string": [
            {
              "name": "agent_slug",
              "value": "newsletter-agent"
            },
            {
              "name": "agent_title",
              "value": "Newsletter Agent"
            },
            {
              "name": "agent_description",
              "value": "Schreibt Newsletter mit klarer Struktur, Storyline und CTA."
            },
            {
              "name": "system_prompt",
              "value": "Du bist ein hochspezialisierter Business-Agent. Arbeite pr\u00e4zise, strukturiert, umsetzungsorientiert und ohne Halluzinationen. Nutze ausschlie\u00dflich die bereitgestellten Eingaben. Wenn Daten fehlen oder unsicher sind, markiere sie explizit als offen. Antworte standardm\u00e4\u00dfig auf Deutsch, au\u00dfer die Eingabe verlangt etwas anderes. Liefere Ergebnisse so, dass ein Team sie direkt weiterverwenden kann.\n\nRolle: Newsletter Agent. Aufgabe: Schreibt Newsletter mit klarer Struktur, Storyline und CTA. Arbeite immer in diesem Output-Rahmen: Subject lines, Opening, Main body, CTA, PS."
            },
            {
              "name": "task",
              "value": "Erstelle einen Newsletter-Entwurf zum gegebenen Thema."
            },
            {
              "name": "goal",
              "value": "\u00d6ffnungsrate, Lesedauer und CTA-Klicks verbessern."
            },
            {
              "name": "context",
              "value": "B2B Audience interessiert an AI, Automatisierung und Wachstum."
            },
            {
              "name": "input_data",
              "value": "{\n  \"topic\": \"Warum AI Agents 2026 kein Nice-to-have mehr sind\",\n  \"audience\": \"KMU Gesch\u00e4ftsf\u00fchrer\",\n  \"core_message\": \"Wer repetitive Kommunikation nicht automatisiert, verliert Marge und Geschwindigkeit.\",\n  \"cta\": \"Strategiegespr\u00e4ch buchen\"\n}"
            },
            {
              "name": "output_format",
              "value": "Markdown mit klaren \u00dcberschriften und Bulletpoints"
            },
            {
              "name": "output_schema",
              "value": "\n- Subject lines\n- Opening\n- Main body\n- CTA\n- PS"
            },
            {
              "name": "extra_rules",
              "value": "Klar, intelligent, nicht zu lang."
            },
            {
              "name": "sample_customer_value",
              "value": "Dieser Agent erstellt klare B2B-Newsletter mit CTA."
            }
          ]
        }
      },
      "id": "e3bd715b-565e-4523-b328-924a7b6c72f8",
      "name": "Set Agent Input",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        480,
        320
      ]
    },
    {
      "parameters": {
        "jsCode": "const user_message = `Aufgabe: ${$json.task}\n\nZiel: ${$json.goal}\n\nKontext: ${$json.context}\n\nEingabedaten (JSON oder Text):\n${$json.input_data}\n\nErwartete Ausgabebausteine:\n${$json.output_schema}\n\nZusatzregeln:\n${$json.extra_rules}`;\n\nreturn [{\n  json: {\n    ...$json,\n    user_message,\n    import_note: 'Nach dem Import nur OPENAI_API_KEY bzw. HTTP Credential und optional OPENAI_MODEL anpassen.'\n  }\n}];"
      },
      "id": "f3cfdeaf-6f54-4308-a1d2-633ca2c16eb1",
      "name": "Build Prompt",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        760,
        320
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.openai.com/v1/responses",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{$env.OPENAI_API_KEY}}"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ model: $env.OPENAI_MODEL || 'gpt-4.1', instructions: $json.system_prompt, input: $json.user_message }) }}",
        "options": {}
      },
      "id": "7ff6cc5a-06b9-4ee5-a87c-ce3466a4ffa1",
      "name": "Call OpenAI Responses API",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1040,
        320
      ]
    },
    {
      "parameters": {
        "jsCode": "const body = $json;\n                let text = '';\n                if (Array.isArray(body.output)) {\n                  for (const item of body.output) {\n                    if (Array.isArray(item.content)) {\n                      for (const c of item.content) {\n                        if (c.type === 'output_text' && c.text) text += c.text + '\n';\n                      }\n                    }\n                  }\n                }\n                return [{\n                  json: {\n                    agent: $('Set Agent Input').first().json.agent_title,\n                    result: text.trim(),\n                    raw_response: body\n                  }\n                }];"
      },
      "id": "32fba313-4506-47b0-ba2b-36f90fe90215",
      "name": "Extract Result",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1300,
        320
      ]
    }
  ],
  "connections": {
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Set Agent Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Agent Input": {
      "main": [
        [
          {
            "node": "Build Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Prompt": {
      "main": [
        [
          {
            "node": "Call OpenAI Responses API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call OpenAI Responses API": {
      "main": [
        [
          {
            "node": "Extract Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "active": false,
  "versionId": "167c0dcc-44f1-4289-912c-e3053feaa24e",
  "id": "6e7f0ca9-99bf-4afe-8b23-5b7a62a24407",
  "tags": [
    "ai",
    "template",
    "newsletter-agent"
  ]
}
Pro

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

About this workflow

Newsletter Agent. Uses httpRequest. Event-driven trigger; 5 nodes.

Source: https://github.com/kitz-labs/agent-templates-de/blob/1f4f4a5be56b818bda297731135696542f4907d5/newsletter-agent/n8n/newsletter-agent.n8n.json — 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 is for SaaS founders, agency owners, and Sales Ops managers who use HubSpot but are tired of "toe-stepping." If your BDRs are accidentally emailing your AE’s active deals, or Marketing is blastin

Data Table, HTTP Request
AI & RAG

Inquiry-Agent. Uses @digitalocean/n8n-nodes-digitalocean-gradient-serverless-inference, stopAndError, googleDocs, gmail. Event-driven trigger; 59 nodes.

@Digitalocean/N8N Nodes Digitalocean Gradient Serverless Inference, Stop And Error, Google Docs +4
AI & RAG

AI Social Media Automation for Multiple Platforms using Blotato. Uses telegramTrigger, @blotato/n8n-nodes-blotato, telegram, httpRequest. Event-driven trigger; 52 nodes.

Telegram Trigger, @Blotato/N8N Nodes Blotato, Telegram +1
AI & RAG

CLEAN Agent - Manual Trigger. Uses googleDrive, googleSheets, httpRequest. Event-driven trigger; 49 nodes.

Google Drive, Google Sheets, HTTP Request
AI & RAG

🤖🧑‍💻 AI Agent for Top n8n Creators Leaderboard Reporting. Uses httpRequest, executeWorkflowTrigger, readWriteFile, googleDrive. Event-driven trigger; 49 nodes.

HTTP Request, Execute Workflow Trigger, Read Write File +3