نصوص إعلانية متعددة بالذكاء الاصطناعي لكل منتج

شغّلها مرة واحدة واحصل على أربعة إعلانات بالعربية والإنجليزية لكل منتج في جدولك، جاهزة للتجربة.

سهل توفّر ~6 ساعة شهريًا التسويقبواسطة فريق Flowngn

تعمل مع n8n · Make · Zapier

كيف تعمل

المشغّل: يدوي — تضغط تشغيل
  1. اقرأ جدول Products (المنتج، السعر، المزايا).
  2. يكتب الذكاء الاصطناعي 4 إعلانات لكل منتج من زوايا مختلفة، اثنان بالعربية واثنان بالإنجليزية.
  3. احفظ كل إعلان كصف في جدول Ad copy.

المخطط

▶Run manuallyManual TriggerGRead productsGoogle SheetsWrite ad variationsBasic LLM ChainClaude modelAnthropic Chat Mo…{ }One row per adCodeGSave to Ad copy she…Google Sheets
مشغّل تطبيق كود ذكاء اصطناعي

الكود

كود JavaScript المستخدم في خطوات Code، وهو مضمَّن بالفعل في القالب بالأسفل.

One row per ad · عقدة Code
// Reads the AI's JSON for each product and turns every ad variation into its own row.
const out = [];
for (const item of $input.all()) {
  const raw = item.json.text || "";
  const data = JSON.parse(raw.slice(raw.indexOf("{"), raw.lastIndexOf("}") + 1));
  (data.ads || []).forEach((ad, i) => out.push({
    json: {
      product: data.product,
      variation: i + 1,
      angle: ad.angle,
      language: ad.language,
      headline: ad.headline,
      primary_text: ad.text,
      status: "draft",
    },
  }));
}
return out;

ابنِها بأداتك

اختر أداتك — نفس الأتمتة، خطوة بخطوة.

انسخه والصقه مباشرة في مساحة عمل n8n (Ctrl+V)، أو حمّله واستخدم Import from File. بعد ذلك اربط حساباتك واستبدل كل قيمة تبدأ بـ YOUR_. خطوات الذكاء الاصطناعي تستخدم نموذج Claude، ويمكنك استبداله بـ OpenAI أو Gemini أو Ollama.

ملف Workflow JSON
عرض الكود (193 سطر)
{
  "name": "نصوص إعلانية متعددة بالذكاء الاصطناعي لكل منتج (Flowngn)",
  "nodes": [
    {
      "parameters": {
        "content": "## نصوص إعلانية متعددة بالذكاء الاصطناعي لكل منتج\nشغّلها مرة واحدة واحصل على أربعة إعلانات بالعربية والإنجليزية لكل منتج في جدولك، جاهزة للتجربة.\n\n**Setup**\n1. Open each node and connect your own credentials.\n2. Replace every YOUR_… placeholder.\n3. Test once, then activate.\n\nFree template from Flowngn",
        "height": 260,
        "width": 340
      },
      "id": "292cf932-28a7-4af9-a243-d7e34e3e3b58",
      "name": "Setup notes",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -420,
        -60
      ]
    },
    {
      "parameters": {},
      "id": "292cf932-28a7-4af9-a243-d7e34e3e3b58",
      "name": "Run manually",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "operation": "read",
        "documentId": {
          "__rl": true,
          "value": "YOUR_SPREADSHEET_ID",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "Products",
          "mode": "name"
        },
        "options": {}
      },
      "id": "292cf932-28a7-4af9-a243-d7e34e3e3b58",
      "name": "Read products",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        300,
        0
      ]
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=You write Facebook and Instagram ads for YOUR_BRAND. Audience: YOUR_AUDIENCE.\nProduct: {{ $json.product }}\nPrice: {{ $json.price }}\nKey benefits: {{ $json.benefits }}\n\nWrite 4 ad variations, each from a different angle (problem, benefit, social proof, offer). Two in Arabic, two in English. Headline under 40 characters, text under 125 characters. Never invent discounts, reviews or claims that aren't above.\nReply ONLY with JSON: {\"product\": \"{{ $json.product }}\", \"ads\": [{\"angle\": \"\", \"language\": \"ar|en\", \"headline\": \"\", \"text\": \"\"}]}"
      },
      "id": "292cf932-28a7-4af9-a243-d7e34e3e3b58",
      "name": "Write ad variations",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.5,
      "position": [
        600,
        0
      ]
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "claude-sonnet-5",
          "mode": "list"
        },
        "options": {}
      },
      "id": "292cf932-28a7-4af9-a243-d7e34e3e3b58",
      "name": "Claude model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1.3,
      "position": [
        600,
        220
      ]
    },
    {
      "parameters": {
        "jsCode": "// Reads the AI's JSON for each product and turns every ad variation into its own row.\nconst out = [];\nfor (const item of $input.all()) {\n  const raw = item.json.text || \"\";\n  const data = JSON.parse(raw.slice(raw.indexOf(\"{\"), raw.lastIndexOf(\"}\") + 1));\n  (data.ads || []).forEach((ad, i) => out.push({\n    json: {\n      product: data.product,\n      variation: i + 1,\n      angle: ad.angle,\n      language: ad.language,\n      headline: ad.headline,\n      primary_text: ad.text,\n      status: \"draft\",\n    },\n  }));\n}\nreturn out;"
      },
      "id": "292cf932-28a7-4af9-a243-d7e34e3e3b58",
      "name": "One row per ad",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        900,
        0
      ]
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "YOUR_SPREADSHEET_ID",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "Ad copy",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "autoMapInputData",
          "value": {}
        },
        "options": {}
      },
      "id": "292cf932-28a7-4af9-a243-d7e34e3e3b58",
      "name": "Save to Ad copy sheet",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        1200,
        0
      ]
    }
  ],
  "connections": {
    "Run manually": {
      "main": [
        [
          {
            "node": "Read products",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read products": {
      "main": [
        [
          {
            "node": "Write ad variations",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write ad variations": {
      "main": [
        [
          {
            "node": "One row per ad",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "One row per ad": {
      "main": [
        [
          {
            "node": "Save to Ad copy sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Claude model": {
      "ai_languageModel": [
        [
          {
            "node": "Write ad variations",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}

← افتحها في ساحة التجربة لتعديلها

نصائح

  • اكتب مزايا حقيقية في الجدول؛ الذكاء الاصطناعي مُوجَّه بألا يخترع ادعاءات.

أتمتات مشابهة