Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

330
Views
How to upload a video from google drive to YouTube using google apps script?

I found a code to upload a Video to YouTube with Google apps script. But with this i can only upload a file from a URL, not from google drive. Now, how can i upload a file from Google Drive using Google Apps Script?

That's the Code i found to upload a Video from a URL to YouTube:

function upload(url, title, description, topics) {
    try {
        var video = UrlFetchApp.fetch(url);
        YouTube.Videos.insert({
            snippet: {
                title: title,
                description: description,
                tags: topics
            },
            status: {
                privacyStatus: "public",
            },
        }, "snippet,status", video);
        return ContentService.createTextOutput("done")
    } catch (err) {
        return ContentService.createTextOutput(err.message)
    }
}
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You cant upload videos to YouTube directly from Google drive. That is not how things work.

Files are uploaded from the machine running the code via a file stream.

Videos private from comments.

Check the top of the documentation for video.insert

enter image description here

Videos uploaded via the YouTube API in a project that has not yet been verified are set to private automatically you need to go though the verification process.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!