I have a workflow to get a video and thumbnail from trello, and I wish to upload it to youtube, using the card title and description. I wish to use the thumbnail as well, but I figure I can update the thumbnail after I am able to upload the video.
There are no errors showing on the zapier front, and I am able to verify the video and thumbnail do exist via manual checking.
youtube gives a success response and gives a link to the video.
the video is not showing with a 'not available' error. I have tried multiple youtube accounts and checked any and all permissions I could find.
this is a recording of all the steps I've walked through :
this is the javascript code to seperate the video and thumbnail urls.
// Access the 'files' field from the inputData
const fileUrl = inputData['files']; // The 'files' field contains the two URLs separated by a comma
// Log the input to verify the value of 'files'
console.log('Input file_url:', fileUrl);
// Check if fileUrl is defined and not empty
if (fileUrl && typeof fileUrl === 'string') {
// Split the fileUrl string into an array based on the comma
const urls = fileUrl.split(',');
// Log the split results to see the URLs
console.log('Split URLs:', urls);
// Assume the first URL is the thumbnail, and the second URL is the video
const thumbnailUrl = urls[0].trim(); // Thumbnail URL is the first item
const videoUrl = urls[1] ? urls[1].trim() : ''; // Video URL is the second item, if present
// Log the video and thumbnail URLs
console.log('Thumbnail URL:', thumbnailUrl);
console.log('Video URL:', videoUrl);
// Output the result
output = {
video_url: videoUrl,
thumbnail_url: thumbnailUrl
};
} else {
// If 'files' is undefined or empty, set output to empty values and log the error
console.log('No valid file_url input found.');
output = {
video_url: '',
thumbnail_url: ''
};
}
Please feel free to ask any questions that may clarify the problem at hand.