{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "main-sticky-note-001",
      "name": "Sticky Note Main",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1200,
        -96
      ],
      "parameters": {
        "width": 400,
        "height": 520,
        "content": "# YouTube to Notion Workflow\n\nMonitor YouTube channels and create AI-generated video summaries in Notion.\n\n### How it works\n1. RSS trigger monitors YouTube channel for new videos\n2. Video uploaded to VideoDB for processing\n3. Spoken words indexed and transcript generated\n4. AI creates engaging digest notes from content\n5. New Notion database page created with summary\n\n### Setup steps\n1. Add **VideoDB API** credentials\n2. Configure **Notion** API and database ID\n3. Update RSS feed URL for your target channel\n4. Activate workflow to start monitoring"
      },
      "typeVersion": 1
    },
    {
      "id": "424ae67e-e3af-4b1e-8fc6-89d96dc9638b",
      "name": "Watch YouTube RSS Feed",
      "type": "n8n-nodes-base.rssFeedReadTrigger",
      "position": [
        -672,
        64
      ],
      "parameters": {
        "feedUrl": "",
        "pollTimes": {
          "item": [
            {}
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "f1f5903d-548a-496e-803b-1c087d60e6eb",
      "name": "Upload Video to VideoDB",
      "type": "@videodb/n8n-nodes-videodb.videoDb",
      "position": [
        -448,
        64
      ],
      "parameters": {
        "url": "={{ $json.link }}",
        "name": "={{ $json.title }}",
        "operation": "upload",
        "description": "={{ $json.author }}",
        "collection_id": ""
      },
      "credentials": {
        "videoDBApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "607fb77d-eaf1-4f34-8dd4-23ae8b5da049",
      "name": "Wait Before Upload Status Check",
      "type": "n8n-nodes-base.wait",
      "position": [
        -224,
        64
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "76a5aef6-f23c-4b15-9b42-4e87fd09feb7",
      "name": "Poll Upload Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        0,
        0
      ],
      "parameters": {
        "url": "={{ $('Upload Video to VideoDB').item.json.data.output_url }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "4b85cd35-d207-416c-89b6-e8df74d3f899",
      "name": "Is Upload Complete",
      "type": "n8n-nodes-base.if",
      "position": [
        224,
        64
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "f2f3e478-d5cd-4cde-8b86-372f164fc722",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status }}",
              "rightValue": "complete"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "f212bc25-b9d0-4799-9b4f-26b46602d03b",
      "name": "Index Spoken Words",
      "type": "@videodb/n8n-nodes-videodb.videoDb",
      "position": [
        448,
        64
      ],
      "parameters": {
        "video_id": "={{ $json.response.data.id }}",
        "operation": "indexSpokenWords",
        "collection_id": "={{ $json.response.data.collection_id }}"
      },
      "credentials": {
        "videoDBApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "74d1c47b-dfef-4fab-bfa3-7dce2474ae22",
      "name": "Wait Before Indexing Status Check",
      "type": "n8n-nodes-base.wait",
      "position": [
        672,
        64
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "f71a8c34-d001-43c7-a8f8-84c3089c9ec0",
      "name": "Poll Indexing Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        896,
        0
      ],
      "parameters": {
        "url": "={{ $('Index Spoken Words').item.json.data.output_url }}",
        "options": {},
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "videoDBApi"
      },
      "credentials": {
        "videoDBApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "367d3c2a-c4e9-450e-b070-b33523f48261",
      "name": "Is Indexing Complete",
      "type": "n8n-nodes-base.if",
      "position": [
        1120,
        64
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "f2f3e478-d5cd-4cde-8b86-372f164fc722",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status }}",
              "rightValue": "done"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "6d5760ab-11b2-4a27-abda-aea0e640a475",
      "name": "Get Video Transcript",
      "type": "@videodb/n8n-nodes-videodb.videoDb",
      "position": [
        1344,
        64
      ],
      "parameters": {
        "video_id": "={{ $('Is Upload Complete').item.json.response.data.id }}",
        "operation": "getTranscript",
        "collection_id": "={{ $('Is Upload Complete').item.json.response.data.collection_id }}"
      },
      "credentials": {
        "videoDBApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "184cd194-55ee-49e8-beb9-a0dc13fe3ba8",
      "name": "Generate AI Digest",
      "type": "@videodb/n8n-nodes-videodb.videoDb",
      "position": [
        1568,
        64
      ],
      "parameters": {
        "prompt": "=Your task is to analyze the following raw transcript of a discussion, identify the core topics, and create quick, engaging, and highly readable digest notes. **Write the output as a finished, professional article, not as a summary or report about the original transcript.** The content must focus entirely on the subject matter and key takeaways for the reader.\n\n**Content Requirements:**\n1.  **Focus:** Extract the main concepts, key arguments, and central conclusions on the topic discussed. **The digest must be written directly about the topics** (e.g., \"The future of X is Y\"), **avoiding phrases that refer back to the speaker or source** (e.g., \"The speaker mentioned X\").\n2.  **Style:** Use clear, concise, and understandable language. The digest must start with a brief, engaging introduction and present the core findings using **bolded bullet points** for maximum readability.\n3.  **Readability:** The final digest notes must be highly engaging and easy to absorb quickly.\n\n**Final Output Format:**\nYour final output MUST be a single, clean JSON object. Do not include any explanations, greetings, or introductory text outside of this JSON structure.\n\nThe JSON object must contain only two fields:\n* `title`: A relevant headline (must be under 80 characters).\n* `text`: The complete, fully-formatted digest content. **(must be under 2000 characters)**\n\nThe Transcript: {{ $json.data.text }}",
        "operation": "generateText",
        "model_name": "ultra",
        "collection_id": "",
        "response_type": "json"
      },
      "credentials": {
        "videoDBApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "f55813db-0b31-4823-aacc-799b6466c1c3",
      "name": "Wait Before Digest Status Check",
      "type": "n8n-nodes-base.wait",
      "position": [
        1792,
        64
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "e8049e98-62d2-41e4-b3b0-fcc52509ab3a",
      "name": "Poll Digest Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2016,
        0
      ],
      "parameters": {
        "url": "={{ $('Generate AI Digest').item.json.data.output_url }}",
        "options": {},
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "videoDBApi"
      },
      "credentials": {
        "videoDBApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "e19a937c-f904-41b4-8c66-241f1b365db6",
      "name": "Is Digest Ready",
      "type": "n8n-nodes-base.if",
      "position": [
        2240,
        64
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "f2f3e478-d5cd-4cde-8b86-372f164fc722",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status }}",
              "rightValue": "complete"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "e7ae1f70-54c1-4bad-af8a-ec1dd033481d",
      "name": "Create Notion Page",
      "type": "n8n-nodes-base.notion",
      "position": [
        2480,
        48
      ],
      "parameters": {
        "title": "={{ $json.response.data.output.title }}",
        "blockUi": {
          "blockValues": [
            {
              "text": {
                "text": [
                  {
                    "text": "={{ $json.response.data.output.text }}",
                    "annotationUi": {}
                  }
                ]
              },
              "richText": true
            }
          ]
        },
        "options": {},
        "resource": "databasePage",
        "databaseId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "https://www.notion.so/YOUR_NOTION_PAGE_ID",
          "cachedResultName": "Notes"
        }
      },
      "credentials": {
        "notionApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "ac39e0cc-828c-4cf7-9982-b1f8d8aea013",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        -96
      ],
      "parameters": {
        "color": 7,
        "width": 1104,
        "height": 416,
        "content": "## Fetching the latest Youtube video from RSS feed and uploading it to VideoDB"
      },
      "typeVersion": 1
    },
    {
      "id": "228d1016-237c-4f59-b9f3-907459140879",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        -96
      ],
      "parameters": {
        "color": 7,
        "width": 1104,
        "height": 416,
        "content": "## Indexing the spoken words in the video and fetching the transcript"
      },
      "typeVersion": 1
    },
    {
      "id": "e5768c1c-7186-4e7d-b194-7ee1e81a4b32",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1520,
        -96
      ],
      "parameters": {
        "color": 7,
        "width": 1136,
        "height": 416,
        "content": "## Generating digest notes from the transcript and sending it to Notion"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Is Digest Ready": {
      "main": [
        [
          {
            "node": "Create Notion Page",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait Before Digest Status Check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate AI Digest": {
      "main": [
        [
          {
            "node": "Wait Before Digest Status Check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Index Spoken Words": {
      "main": [
        [
          {
            "node": "Wait Before Indexing Status Check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Upload Complete": {
      "main": [
        [
          {
            "node": "Index Spoken Words",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait Before Upload Status Check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Poll Digest Status": {
      "main": [
        [
          {
            "node": "Is Digest Ready",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Poll Upload Status": {
      "main": [
        [
          {
            "node": "Is Upload Complete",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Video Transcript": {
      "main": [
        [
          {
            "node": "Generate AI Digest",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Indexing Complete": {
      "main": [
        [
          {
            "node": "Get Video Transcript",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait Before Indexing Status Check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Poll Indexing Status": {
      "main": [
        [
          {
            "node": "Is Indexing Complete",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Watch YouTube RSS Feed": {
      "main": [
        [
          {
            "node": "Upload Video to VideoDB",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Video to VideoDB": {
      "main": [
        [
          {
            "node": "Wait Before Upload Status Check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait Before Digest Status Check": {
      "main": [
        [
          {
            "node": "Poll Digest Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait Before Upload Status Check": {
      "main": [
        [
          {
            "node": "Poll Upload Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait Before Indexing Status Check": {
      "main": [
        [
          {
            "node": "Poll Indexing Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}