{
  "nodes": [
    {
      "id": "ad955b17-8c17-4b3e-941d-d61c4d349caf",
      "name": "Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "width": 524,
        "height": 948,
        "content": "## Podcast to Blog Post Generator\n\nFor content teams, podcasters, and marketers who want to automatically turn any podcast or YouTube video into a structured blog post without manual writing. Submit a video URL via the form. WayinVideo extracts the AI summary and key highlights. An OpenAI GPT agent reads those highlights and writes a 550\u2013700 word blog post with a title and subheadings. The finished blog post, summary, highlights, and tags are saved as a new row in your Google Sheet automatically.\n\n## How it works\n- **1. Form \u2014 Podcast URL + Brand Name** collects the video URL and brand or show name\n- **2. WayinVideo \u2014 Submit Summary Request** sends the video to WayinVideo for AI summarization\n- **3. Wait \u2014 40 Seconds** pauses to allow WayinVideo time to start processing\n- **4. WayinVideo \u2014 Get Summary Result** fetches the AI-generated summary, highlights, and tags\n- **5. IF \u2014 Highlights Ready?** checks if highlights exist \u2014 retries every 40 seconds if not\n- **6. AI Agent \u2014 Generate Blog Post** reads the highlights and writes a structured blog post\n- **8. Google Sheets \u2014 Save Blog Content** saves the blog title, content, summary, highlights, and tags\n\n## Set up steps\n1. In **2. WayinVideo \u2014 Submit Summary Request** \u2014 replace YOUR_WAYINVIDEO_API_KEY in the Authorization header\n2. In **4. WayinVideo \u2014 Get Summary Result** \u2014 replace YOUR_WAYINVIDEO_API_KEY in the Authorization header\n3. In **7. OpenAI \u2014 GPT Chat Model** \u2014 connect your OpenAI credential\n4. In **8. Google Sheets \u2014 Save Blog Content** \u2014 replace YOUR_GOOGLE_SHEET_URL and connect your Google Sheets credential\n5. Activate the workflow and share the Form URL with your team"
      },
      "typeVersion": 1
    },
    {
      "id": "13c9750b-1825-446a-bf6a-5d80e807fd4c",
      "name": "Note \u2014 Infinite Loop Risk",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1104,
        544
      ],
      "parameters": {
        "color": 3,
        "width": 788,
        "content": "## \u26a0\ufe0f Infinite Loop Risk\nIf WayinVideo never returns highlights \u2014 due to an invalid URL, private video, or API error \u2014 this workflow loops between nodes 3 and 5 indefinitely. Add a retry counter and a second IF node to stop after 8 to 10 retries and send an error notification instead."
      },
      "typeVersion": 1
    },
    {
      "id": "871e9343-3b49-4671-9bc5-9d11e6711d4f",
      "name": "Section \u2014 Form Input1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        560,
        80
      ],
      "parameters": {
        "color": 5,
        "width": 288,
        "height": 340,
        "content": "## Form Input\nUser submits a podcast or YouTube video URL and their brand or show name via the hosted n8n form."
      },
      "typeVersion": 1
    },
    {
      "id": "17cb17d3-8c79-4136-87fd-3d68496f0067",
      "name": "Section \u2014 Video Summarization1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        864,
        80
      ],
      "parameters": {
        "color": 6,
        "width": 692,
        "height": 340,
        "content": "## Video Summarization\nSends the video URL to WayinVideo. Waits 40 seconds for processing, then fetches the AI-generated summary, highlights, and tags."
      },
      "typeVersion": 1
    },
    {
      "id": "8da4404b-d662-4283-b495-f6f3c15bc679",
      "name": "Section \u2014 Readiness Check1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1632,
        80
      ],
      "parameters": {
        "color": 6,
        "width": 288,
        "height": 336,
        "content": "## Readiness Check\nChecks if highlights were returned. If not ready yet, loops back to wait 40 more seconds and retries automatically."
      },
      "typeVersion": 1
    },
    {
      "id": "6734fb3e-f455-437a-9b75-373a45960000",
      "name": "Section \u2014 AI Blog Writing1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2016,
        80
      ],
      "parameters": {
        "color": 6,
        "width": 388,
        "height": 596,
        "content": "## AI Blog Writing\nAI Agent reads the video summary and highlights, then writes a structured 550\u2013700 word blog post with a title and clear subheadings."
      },
      "typeVersion": 1
    },
    {
      "id": "57c5231c-c19f-431f-af45-1a7a5bcb45d0",
      "name": "Section \u2014 Output Storage1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2448,
        80
      ],
      "parameters": {
        "color": 4,
        "width": 288,
        "height": 356,
        "content": "## Output Storage\nSaves the blog title, blog content, key summary, highlights, and tags as a new row in your Google Sheet."
      },
      "typeVersion": 1
    },
    {
      "id": "8efef162-a3fc-44b6-8dcb-f742e9c3a865",
      "name": "1. Form \u2014 Podcast URL + Brand Name1",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        624,
        240
      ],
      "parameters": {
        "options": {},
        "formTitle": "\ud83c\udf99\ufe0f Podcast to Blog & Social Content",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Podcast / Video URL",
              "placeholder": "https://www.youtube.com/watch?v=xxxxxxx",
              "requiredField": true
            },
            {
              "fieldLabel": "Brand / Show Name",
              "placeholder": "e.g. Raj Shamani Clips, The Ranveer Show",
              "requiredField": true
            }
          ]
        },
        "formDescription": "Paste your podcast or video URL \u2014 AI will write a blog post and save it to your Google Sheet automatically."
      },
      "typeVersion": 2.2
    },
    {
      "id": "04662748-6dde-4dc9-9c5d-40fa852f7449",
      "name": "2. WayinVideo \u2014 Submit Summary Request1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        928,
        240
      ],
      "parameters": {
        "url": "https://wayinvideo-api.wayin.ai/api/v2/summaries",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"video_url\": \"{{ $json['Podcast / Video URL'] }}\",\n  \"target_lang\": \"en\"\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_TOKEN_HERE"
            },
            {
              "name": "x-wayinvideo-api-version",
              "value": "v2"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "1f7a8dc5-3db7-4995-8f46-1b67af533043",
      "name": "3. Wait \u2014 40 Seconds1",
      "type": "n8n-nodes-base.wait",
      "position": [
        1184,
        240
      ],
      "parameters": {
        "amount": 40
      },
      "typeVersion": 1.1
    },
    {
      "id": "c4b3a5c9-f828-4daf-9d10-66671362ce63",
      "name": "4. WayinVideo \u2014 Get Summary Result1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1408,
        240
      ],
      "parameters": {
        "url": "=https://wayinvideo-api.wayin.ai/api/v2/summaries/results/{{ $('2. WayinVideo \u2014 Submit Summary Request1').item.json.data.id }}",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_TOKEN_HERE"
            },
            {
              "name": "x-wayinvideo-api-version",
              "value": "v2"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "dd87028c-c5ee-474e-a8c7-c5d9fa5a29b6",
      "name": "5. IF \u2014 Highlights Ready?1",
      "type": "n8n-nodes-base.if",
      "position": [
        1728,
        240
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "7862da0a-43fd-49dd-813d-522170e09a80",
              "operator": {
                "type": "array",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.data.highlights }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "02262944-0801-401e-a252-937f1abd6b43",
      "name": "6. AI Agent \u2014 Generate Blog Post1",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2080,
        224
      ],
      "parameters": {
        "text": "=You are a professional content writer who specializes in writing engaging, human-sounding blog posts for digital audiences.\n\nYour writing style is:\n- Clear and easy to understand (no jargon)\n- Warm, story-driven, and emotionally engaging\n- Structured with short paragraphs and clear subheadings\n- Never robotic, never listicle-heavy\n- Always providing real value to the reader\n\nBlog requirements:\n- Length: 550\u2013700 words\n- Format: Title \u2192 Hook \u2192 2-3 subheaded sections \u2192 Conclusion\n- Tone: Conversational but credible\n- Every sentence must add value \u2014 no filler\n- Use specific facts, numbers, and real examples from the input data\n- End with a thought-provoking insight or call to reflection\n\nOutput ONLY the blog post. No preamble, no explanation, no meta-commentary.\n\nWrite a blog post based on the following video content data:\n\nVIDEO TITLE:\n{{ $('4. WayinVideo \u2014 Get Summary Result1').item.json.data.title }}\n\nVIDEO SUMMARY:\n{{ $('4. WayinVideo \u2014 Get Summary Result1').item.json.data.summary }}\n\nCONTENT TAGS:\n{{ $('4. WayinVideo \u2014 Get Summary Result1').item.json.data.tags.join(', ') }}\n\nKEY HIGHLIGHTS FROM VIDEO:\n{{\n  $('4. WayinVideo \u2014 Get Summary Result1').item.json.data.highlights\n    .map(h => h.desc + ': ' + h.events.map(e => e.desc).join(' | '))\n    .join('\\n\\n')\n}}\n\n---\n\nInstructions:\n- Focus on the most interesting and human angle from the highlights\n- Use specific facts and real stories from the highlights\n- Make the reader feel the urgency and importance of the topic\n- The blog should feel like it was written by a thoughtful human journalist, not AI\n- Mention real names and real numbers where available",
        "options": {},
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3.1
    },
    {
      "id": "5e7d0f64-b103-464f-9a43-80ea4f858137",
      "name": "7. OpenAI \u2014 GPT Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        2080,
        416
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {},
        "builtInTools": {}
      },
      "typeVersion": 1.3
    },
    {
      "id": "1d94a3f8-9cce-4db2-94a9-3c9f57844f97",
      "name": "8. Google Sheets \u2014 Save Blog Content1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2560,
        224
      ],
      "parameters": {
        "columns": {
          "value": {
            "Blog": "={{ $json.output.blog_content }}",
            "Tags": "={{ $('4. WayinVideo \u2014 Get Summary Result1').item.json.data.tags }}",
            "Video URL": "={{ $('1. Form \u2014 Podcast URL + Brand Name1').item.json['Podcast / Video URL'] }}",
            "Blog Title": "={{ $json.output.blog_title }}",
            "Highlights": "={{ $('4. WayinVideo \u2014 Get Summary Result1').item.json.data.highlights }}",
            "Key Summary": "={{ $('4. WayinVideo \u2014 Get Summary Result1').item.json.data.summary }}"
          },
          "schema": [
            {
              "id": "Video URL",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Video URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Blog Title",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Blog Title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Blog",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Blog",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Key Summary",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Key Summary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Highlights",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Highlights",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Tags",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Tags",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_SHEET_GID",
          "cachedResultUrl": "YOUR_GOOGLE_SHEET_URL",
          "cachedResultName": "Sheet2"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": "YOUR_GOOGLE_SHEET_URL"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "921a164e-b406-4089-b204-e8e53b892572",
      "name": "9. Parser \u2014 Structured Blog Output1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        2224,
        528
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"blog_title\": \"Every Startup Should Do This \u2014 Build GoodOps for Humanitarian Impact\",\n  \"blog_content\": \"Hook paragraph goes here.\\n\\n## Subheading One\\n\\nFirst section body goes here with real facts and stories.\\n\\n## Subheading Two\\n\\nSecond section body continues the narrative.\\n\\n## Subheading Three\\n\\nThird section deepens the insight.\\n\\nClosing thought goes here.\"\n}"
      },
      "typeVersion": 1.3
    }
  ],
  "connections": {
    "3. Wait \u2014 40 Seconds1": {
      "main": [
        [
          {
            "node": "4. WayinVideo \u2014 Get Summary Result1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5. IF \u2014 Highlights Ready?1": {
      "main": [
        [
          {
            "node": "6. AI Agent \u2014 Generate Blog Post1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "3. Wait \u2014 40 Seconds1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7. OpenAI \u2014 GPT Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "6. AI Agent \u2014 Generate Blog Post1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "6. AI Agent \u2014 Generate Blog Post1": {
      "main": [
        [
          {
            "node": "8. Google Sheets \u2014 Save Blog Content1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1. Form \u2014 Podcast URL + Brand Name1": {
      "main": [
        [
          {
            "node": "2. WayinVideo \u2014 Submit Summary Request1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4. WayinVideo \u2014 Get Summary Result1": {
      "main": [
        [
          {
            "node": "5. IF \u2014 Highlights Ready?1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "9. Parser \u2014 Structured Blog Output1": {
      "ai_outputParser": [
        [
          {
            "node": "6. AI Agent \u2014 Generate Blog Post1",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "2. WayinVideo \u2014 Submit Summary Request1": {
      "main": [
        [
          {
            "node": "3. Wait \u2014 40 Seconds1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}