AutomationFlowsSocial Media › Generate Promo Scripts with OpenAI to Sheets

Generate Promo Scripts with OpenAI to Sheets

Original n8n title: Promo: Scripts → Buffer/youtube

Promo: Scripts → Buffer/YouTube. Uses googleSheets, openAi. Manual trigger; 5 nodes.

Manual trigger★★★★☆ complexityAI-powered5 nodesGoogle SheetsOpenAI
Social Media Trigger: Manual Nodes: 5 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow follows the Google Sheets → 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 →

Download .json
{
  "name": "Promo: Scripts \u2192 Buffer/YouTube",
  "nodes": [
    {
      "parameters": {
        "operation": "lookup",
        "sheetId": "REPLACE_SHEET_ID",
        "range": "SKUs!A1:N"
      },
      "id": "readSkus",
      "name": "Read SKUs (live)",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 5,
      "credentials": {
        "googleApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "functionCode": "// Filter live SKUs and craft prompts\nconst rows=$items().map(i=>i.json);\nconst headers=rows.shift();\nconst idxStatus=headers.indexOf('status');\nconst idxName=headers.indexOf('sku_name');\nconst idxLink=headers.indexOf('gumroad_link');\nconst lives=rows.filter(r=> (r[idxStatus]||'').toLowerCase()==='live');\nreturn lives.map(r=>({json:{name:r[idxName], link:r[idxLink]}}));"
      },
      "id": "filterLive",
      "name": "Filter Live",
      "type": "n8n-nodes-base.function",
      "typeVersion": 2
    },
    {
      "parameters": {
        "model": "gpt-4o-mini",
        "messages": "=[{ 'role':'system','content':'Return 10 short scripts as JSON array.' }, { 'role':'user','content': 'Write 10 scripts (20\u201330s) promoting {{ $json.name }}. Each includes: Hook (<=8 words), 3 tips, CTA: Link in bio. Include captions and b-roll cues. Return JSON array.' }]"
      },
      "id": "openai",
      "name": "OpenAI \u2192 10 scripts",
      "type": "n8n-nodes-base.openAi",
      "typeVersion": 4,
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "functionCode": "// Flatten scripts\nconst all=[];\nfor(const item of items){\n  let arr=item.json; if(typeof arr==='string'){ try{arr=JSON.parse(arr)}catch(e){arr=[]} }\n  for(const s of arr){ all.push({json:s}); }\n}\nreturn all;"
      },
      "id": "flatten",
      "name": "Flatten",
      "type": "n8n-nodes-base.function",
      "typeVersion": 2
    },
    {
      "parameters": {
        "operation": "append",
        "sheetId": "REPLACE_SHEET_ID",
        "range": "Content!A2"
      },
      "id": "appendContent",
      "name": "Append to Content",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 5,
      "credentials": {
        "googleApi": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Read SKUs (live)": {
      "main": [
        [
          {
            "node": "Filter Live",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Live": {
      "main": [
        [
          {
            "node": "OpenAI \u2192 10 scripts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI \u2192 10 scripts": {
      "main": [
        [
          {
            "node": "Flatten",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Flatten": {
      "main": [
        [
          {
            "node": "Append to Content",
            "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.

Pro

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

About this workflow

Promo: Scripts → Buffer/YouTube. Uses googleSheets, openAi. Manual trigger; 5 nodes.

Source: https://github.com/theonlydidi/ai-passive-starter/blob/d8985b409effb3fc87b1666adda583dfd54a0e79/workflows/n8n/promo.json — original creator credit. Request a take-down →

More Social Media workflows → · Browse all categories →

Related workflows

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

Social Media

Content creators, digital marketers, and social media managers who want to automate the creation of short-form videos for platforms like TikTok, YouTube Shorts, and Instagram Reels without extensive v

HTTP Request, OpenAI, Google Drive +2
Social Media

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

@Blotato/N8N Nodes Blotato, Google Sheets, OpenAI +8
Social Media

AI Automated TikTok/Youtube Shorts/Reels Generator. Uses httpRequest, openAi, googleDrive, discord. Scheduled trigger; 41 nodes.

HTTP Request, OpenAI, Google Drive +2
Social Media

AI Automation Mentor TikTok Pipeline. Uses telegramTrigger, perplexity, openAi, httpRequest. Event-driven trigger; 32 nodes.

Telegram Trigger, Perplexity, OpenAI +5
Social Media

Anubis TikTok Videos with VEED.io AI Avatars, ElevenLabs & GPT-4. Uses telegramTrigger, perplexity, openAi, httpRequest. Event-driven trigger; 31 nodes.

Telegram Trigger, Perplexity, OpenAI +5