menu

Glide

🚨🚨🚨 The Glide community forum has moved! Please click the new link below:

Channels
# All channels
view-forward
# General
view-forward
# Announcements
view-forward
# Bugs
view-forward
# Bugs (Fixed)
view-forward
# Feature Requests
view-forward
# Help
view-forward
Team

Audio short story app & multiple file data and YouTube info into sheets

June 1, 2019 at 5:54am

Audio short story app & multiple file data and YouTube info into sheets

June 1, 2019 at 5:54am
https://youtu.be/nOPBpDUvE9o This is an app for listening to short anecdotal tales about New Zealand’s history, places, people and events, based on specific journeys. I am using it as an exercise to manage lots of file uploads to Gooogle Sheets for GlideApps. Glide App : https://roadside.glideapp.io/ Spreadsheet: https://docs.google.com/spreadsheets/d/1bCs4dFqPyKC2ju886GEFLV-CBbQnDxzXZTjLWi-Baqs/edit?usp=sharing // Megann's method of getting files into a spreadsheet. function listFiles() { //Put TAb Name HERE var sheetName="Sheet15"; //Drive Folder ID, put HERE var driveFolderCode = '1kM4Yk5BquRq6u8b4IMPN0LiuJMcU0lzK';
var sheet = SpreadsheetApp.getActive(); //you'll want to paste this code into the script editor of your sheet. See tools > script editor// sheet.setActiveSheet(sheet.getSheetByName(sheetName), true); //change Your Tab to desired tab sheet.getRange('A:F').activate(); //replace A:F with the range you’d like to clear/paste. Make sure it matches the number of calls you're making below// sheet.getActiveRangeList().clearContent();
var folder = DriveApp.getFolderById(driveFolderCode); //replace folderID with yours//
//Logger.log(folder);
var contents = folder.getFiles();
var cnt = 0;
var file;
while (contents.hasNext()) {
file = contents.next();
cnt++;
Logger.log(file);
Logger.log(cnt);
data = [
folder.getName(), //change these accordingly- reference Google Apps Script documentation on different calls you can make//
file.getName(),
file.getUrl(),
file.getDescription(),
file.getDateCreated(),
file.getLastUpdated(),
];
sheet.appendRow(data);
} }
//This gets data from YouTube Playlist ( for general search see Google Sheets YouTube API Tutorial link) function getVideoSearch() {
//Put TAb Name HERE var sheetName="Sheet14";
// PUT ID of Playlist HERE var playListCode = "PL567F3E9E052B6714" ;
var ss = SpreadsheetApp.getActive(); var sheet1=ss.getSheetByName(sheetName); var sr = YouTube.PlaylistItems.list("snippet",{playlistId:playListCode, maxResults:50}); var srFilt=sr.items.filter(function(res){return [res.id.kind === "youtube#video"]}); var s2= srFilt.map(function(v){return[v.snippet.resourceId.videoId,v.snippet.title,v.snippet.description,v.snippet.thumbnails["default"]["url"]]}); sheet1.getRange(2, 1, s2.length, s2[0].length).setValues(s2); var ids=s2.map(function(res){return res[0];}).join(","); var stats=YouTube.Videos.list("statistics",{id:ids}); //Logger.log(stats); var vidStats= stats.items.map(function(res){return [res.id,res.statistics.viewCount,res.statistics.likeCount, res.statistics.dislikeCount,res.statistics.commentCount]}); sheet1.getRange(2, 1, s2.length, s2[0].length).setValues(s2); sheet1.getRange(2, 5, vidStats.length, vidStats[0].length).setValues(vidStats); }
Other information: vid showing Meganns work (about 24 minutes in) https://www.youtube.com/watch?v=2HSTF9gNfSw YouTube Video Information https://www.youtube.com/watch?v=CBl4nBQQ8wU Google Sheets YouTube API Tutorial https://www.youtube.com/watch?v=1e7htEWRpRM
I hope this is of help to you, if so, can you please give a thumbs up for the video. Muchas Gracias

June 1, 2019 at 5:59am
You can text to a New Zealand number text 100 to +64 28 429 7056 to test the process of getting an app link via SMS (just text the number "100" without the quotes). Kind regards
like-fill
1
  • reply
  • like

June 2, 2019 at 2:52pm
Awesome ! Super useful. I shall now refer to you as the "Queen of File Moving" ;)
  • reply
  • like

August 29, 2019 at 9:03pm
Super cool i just used it for an app i am putting together which heavily use someone else youtube videos
  • reply
  • like
private
This channel has been archived