{
  "name": "Summarize YouTube videos in Slack using AssemblyAI transcription and OpenAI",
  "nodes": [
    {
      "id": "80eab980-95ed-4ca7-8aa7-85723625454c",
      "name": "Validate Duration",
      "type": "n8n-nodes-base.code",
      "position": [
        176,
        -1408
      ]
    },
    {
      "id": "a8add185-39be-4621-acde-7949fa79020b",
      "name": "Check Video Duration",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -32,
        -1408
      ]
    },
    {
      "id": "d74f8fbd-92d9-4093-a2aa-fc2e4a089f8b",
      "name": "Receive Slack command",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -656,
        -1296
      ]
    },
    {
      "id": "344e86a2-b00e-4807-9d0d-49d2b4e93d89",
      "name": "Normalize Slack payload",
      "type": "n8n-nodes-base.set",
      "position": [
        -432,
        -1296
      ]
    },
    {
      "id": "4ff81a9d-fb8e-4769-ac03-bd9eaf575c59",
      "name": "Extract YouTube video ID",
      "type": "n8n-nodes-base.code",
      "position": [
        -224,
        -1200
      ]
    },
    {
      "id": "f7802741-e91e-4fc3-bc45-f46ab69688c1",
      "name": "Is video longer than limit?",
      "type": "n8n-nodes-base.if",
      "position": [
        384,
        -1408
      ]
    },
    {
      "id": "1e4eb4ad-7655-4019-801b-020e19987831",
      "name": "Send duration error to Slack",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        608,
        -1552
      ]
    },
    {
      "id": "567176b0-ade8-4002-9142-201e6df651ec",
      "name": "Convert YouTube video to MP3",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        592,
        -1296
      ]
    },
    {
      "id": "414a5058-591f-46c1-8c92-177925539edb",
      "name": "Start transcription job",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        816,
        -1296
      ]
    },
    {
      "id": "07636da5-dfd4-45d4-9ab7-423c4c4d2aa8",
      "name": "Submit audio for transcription",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1056,
        -1296
      ]
    },
    {
      "id": "ef806972-735d-4037-a9d3-8aac803ece57",
      "name": "Wait for transcription processing",
      "type": "n8n-nodes-base.wait",
      "position": [
        1312,
        -1296
      ]
    },
    {
      "id": "5a5cbca2-37e5-4c70-bba2-bff401eadb99",
      "name": "Check transcription status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1504,
        -1296
      ]
    },
    {
      "id": "801a3b5c-984b-412a-bcce-f64105cf5926",
      "name": "Extract transcript text",
      "type": "n8n-nodes-base.code",
      "position": [
        1712,
        -1296
      ]
    },
    {
      "id": "946d3c8b-3bb0-4530-99c2-9da77e5d0a46",
      "name": "Is transcription complete?",
      "type": "n8n-nodes-base.if",
      "position": [
        1904,
        -1296
      ]
    },
    {
      "id": "226a2079-8b1a-4df6-bf69-359826e4bb2b",
      "name": "Generate AI summary",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        2096,
        -1312
      ]
    },
    {
      "id": "21771809-513d-427d-bc64-8d98091b21d9",
      "name": "Post result to Slack",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2384,
        -1312
      ]
    },
    {
      "id": "64e4806a-efd3-49c6-9927-3f64584e6dbd",
      "name": "Sticky Note16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1632,
        -1760
      ],
      "parameters": {
        "width": 896,
        "height": 560,
        "content": "## How it works\n\nThis workflow lets users submit a YouTube link from Slack and receive a clean, AI-generated summary directly in the same Slack channel.\n\nWhen a user invokes the Slack command, the wor"
      }
    },
    {
      "id": "5a70f943-d6b4-455a-8afe-bf7c1c0e7aa8",
      "name": "Sticky Note18",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -32,
        -1584
      ],
      "parameters": {
        "width": null,
        "height": 112,
        "content": "Extracts the YouTube video ID and validates video duration before processing."
      }
    },
    {
      "id": "fec7dfca-e023-4ed8-945f-faaee8bec7b7",
      "name": "Sticky Note19",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        848,
        -1488
      ],
      "parameters": {
        "width": null,
        "height": 96,
        "content": "Converts the video to audio and submits it for transcription."
      }
    },
    {
      "id": "ec8e5fe0-4f64-453b-8fa4-f74c81f66407",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1296,
        -1488
      ],
      "parameters": {
        "width": null,
        "height": 96,
        "content": "Waits for transcription completion and retrieves the final transcript."
      }
    },
    {
      "id": "ea933c45-82c8-4618-8b1b-d4156bb08b61",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2096,
        -1472
      ],
      "parameters": {
        "width": null,
        "height": 80,
        "content": "Generates an AI summary and sends the result back to Slack."
      }
    },
    {
      "id": "c30ff2c3-f052-427a-a429-b26deccf8389",
      "name": "Sticky Note17",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -656,
        -1440
      ],
      "parameters": {
        "width": null,
        "height": 96,
        "content": "Slack command input and payload normalization.\n"
      }
    }
  ],
  "connections": {
    "Validate Duration": {
      "main": [
        [
          {
            "node": "Is video longer than limit?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate AI summary": {
      "main": [
        [
          {
            "node": "Post result to Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Video Duration": {
      "main": [
        [
          {
            "node": "Validate Duration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Receive Slack command": {
      "main": [
        [
          {
            "node": "Normalize Slack payload",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract transcript text": {
      "main": [
        [
          {
            "node": "Is transcription complete?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Slack payload": {
      "main": [
        [
          {
            "node": "Extract YouTube video ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start transcription job": {
      "main": [
        [
          {
            "node": "Submit audio for transcription",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract YouTube video ID": {
      "main": [
        [
          {
            "node": "Check Video Duration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check transcription status": {
      "main": [
        [
          {
            "node": "Extract transcript text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is transcription complete?": {
      "main": [
        [
          {
            "node": "Generate AI summary",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait for transcription processing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is video longer than limit?": {
      "main": [
        [
          {
            "node": "Send duration error to Slack",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Convert YouTube video to MP3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert YouTube video to MP3": {
      "main": [
        [
          {
            "node": "Start transcription job",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send duration error to Slack": {
      "main": [
        []
      ]
    },
    "Submit audio for transcription": {
      "main": [
        [
          {
            "node": "Wait for transcription processing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for transcription processing": {
      "main": [
        [
          {
            "node": "Check transcription status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}