Hey everyone,
I previously posted about an issue where YouTube videos uploaded via N8N were stuck in "Pending" and didn’t process correctly. After troubleshooting, I finally figured out the solution! 🚀
If you're facing the same issue, here’s the exact step-by-step fix:
Step 1: Initiate the Upload Session
Instead of using the built-in YouTube Upload Node, send an HTTP request to:
📌 URL:
plaintext
Copy
Edit
📌 Method: POST
📌 Headers:
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json
📌 Body (JSON Format):
json
Copy
Edit
{
"snippet": {
"title": "Your Video Title",
"description": "Your Video Description",
"categoryId": "22" // Adjust based on category
},
"status": {
"privacyStatus": "private", // Or "public", "unlisted"
"madeForKids": false
}
}
📌 Response:
If successful, this request will return a "Location" URL in the response headers. This is where you will upload the video file in Step 2.
Step 2: Upload the Video File
Now, use another HTTP Node to upload the actual video file to the URL you received in Step 1.
📌 Method: PUT
📌 URL: Use the "Location" URL returned from Step 1
📌 Headers:
Content-Type: video/* (e.g., video/mp4)
Authorization: Bearer YOUR_ACCESS_TOKEN
📌 Body:
Attach the video file as the request body.
Once this request is sent, your video will be uploaded successfully to YouTube without getting stuck in "Pending"! 🎉
Why This Works:
✅ It bypasses the N8N YouTube node, which seems to have issues.
✅ It uses the official YouTube resumable upload process, ensuring reliable uploads.
✅ It allows full control over the metadata and video status.
If you're struggling with YouTube uploads in N8N, try this method! Let me know if you need help setting it up. Hope this helps someone else save time! 🙌