Sending Apps Script Results to Google Sheet

46 views
Skip to first unread message

Kevin Grayson

unread,
Feb 25, 2021, 3:20:02 PM2/25/21
to Google Apps Script Community

Hello -


I was looking to utilize an Apps Script within a Google Sheet (attached above) to see if I could generate a list of Video IDs + Video Titles directly from the YouTube Data API (which looks to have worked). Unfortunately, I’m a little stuck on how to get those script results into the corresponding Google Sheet itself. Would greatly appreciate any insight on how to add that function into the existing script above!


Thanks in advance for any help,

Kevin



YouTube Data API Script for Video Details.txt
Image of Script Results Being Generated.JPG

Jean-Luc Vanhulst

unread,
Feb 25, 2021, 3:27:29 PM2/25/21
to google-apps-sc...@googlegroups.com
you could do add 

var sheet = SpreadsheetApp.getActive();
and replace/add the Logger.log with 
sheet.appendRow( [playListId, maxResults ] ); 

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/71ffa5c9-73fb-4fb9-afb2-89736b9609fdo%40googlegroups.com.

dimud...@gmail.com

unread,
Feb 25, 2021, 4:01:55 PM2/25/21
to Google Apps Script Community
@jlvan Or better yet, use the BetterLog library:

Reply all
Reply to author
Forward
0 new messages