I tried to make some sample code and idk if this will help but its the start I have
// Airtable Script to Find a File in a Table and Upload it using Fetch API
let table = base.getTable("upload");
let query = await table.selectRecordsAsync();
// Find the file record in the "upload" table with the video file attachment
let record = query.records.find(record => record.getCellValue("Video") !== null);
// Check if a file record was found
if (record) {
// Get the file contents from the attachment field
let attachment = record.getCellValue("Video");
let url = attachment[0].url;
// Set the headers and request options for the fetch API
let myHeaders = new Headers();
myHeaders.append("Content-Type", "video/mp4");
let requestOptions = {
method: 'PUT',
headers: myHeaders,
body: await fetch(url).then(response => response.blob()),
redirect: 'follow'
};
// Make the fetch request to upload the video file to YouTube
fetch("https://www.googleapis.com/upload/youtube/v3/videos", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
}
else {
console.log("No file record found in the 'upload' table with a video attachment.");
}