Apps Script: Turn a file ID into an Image

  Рет қаралды 11,252

Jordan Rhea

Jordan Rhea

Күн бұрын

Пікірлер: 6
@jayasri-ft8040
@jayasri-ft8040 4 жыл бұрын
Excellent bro. Hands of you sir.
@dornescu.lucian
@dornescu.lucian 2 жыл бұрын
Hello, Thank you for your tutorial! I have this situation: - one google doc template where I have a variable called {{logo}} - one google spreadsheet with one cell where can I select a logo from a list of images (text) - same google spreadsheet with a cell named "logo" (named range), where shows the ID of the logo previous selected (vlookup formula) - a list of logos IDs (saved in google drive) Question: what lines of code sould I write in order to create a PDF from doc template with info from google docs :) Thank you!
@centrodeinvestigacionfe7053
@centrodeinvestigacionfe7053 2 жыл бұрын
Great! I have a question: what if the id has the whole url. What would you do then?
@jonathanwhispers
@jonathanwhispers 6 жыл бұрын
This is great! Does it only work for images? Is it possible to modify it to get the thumbnail image of a Google Doc? I'm trying but haven't quite figured out how to get the thumbnail URL using appscript. Thanks for all of your helpful videos!
@JordanRhea
@JordanRhea 6 жыл бұрын
Thanks! This is a really basic implementation. If you want to get document thumbnails you need to look into the advanced drive service.
@jonathanwhispers
@jonathanwhispers 6 жыл бұрын
I'm sort of trying that, I think! Still very new to it. I tried the function below, and then I used that return value to generate a simple =image('URL') spreadsheet formula to show the thumbnail picture in a spreadsheet cell... but for some odd reason, it would only show a thumbnail if the original file was already an image. For some reason, if the file was a Google Doc then the thumbnail didn't show. However, copying and pasting the generated url from the generated formula of that blank cell did link to the correct thumbnail. I'm assuming it's a read permissions issue and I don't know how to correct it. Thanks for pointing me toward the Drive service. I do believe the solution is there. I just can't figure it out, yet! If you have any suggestions, I'm open to researching them. function getThumbNailLink(fileId) { var file = Drive.Files.get(fileId); return file.thumbnailLink; }
Apps Script: Multiple Choice Randomizer
13:28
Jordan Rhea
Рет қаралды 1,3 М.
Google Apps Script - Google Drive Tutorial, Files, Folders, Copy Files, DriveApp, Iterator - Part 15
29:31
Learn Google Sheets & Excel Spreadsheets
Рет қаралды 133 М.
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 47 МЛН
1% vs 100% #beatbox #tiktok
01:10
BeatboxJCOP
Рет қаралды 56 МЛН
Apps Script: HTML Templating
17:06
Jordan Rhea
Рет қаралды 32 М.
Introduction to Google Apps Script
35:40
Jordan Rhea
Рет қаралды 131 М.
Display images in google sheet cell  by using file urls from google drive  -2021
16:41
PDFs from Spreadsheet Data and Google Docs Template - Google Sheets
32:38
Learn Google Sheets & Excel Spreadsheets
Рет қаралды 225 М.
Google Apps Script Fast Loop
10:27
The Excel Cave
Рет қаралды 5 М.
Google Forms to PDF & Email while storing data in Google Sheets
27:02
Learn Google Sheets & Excel Spreadsheets
Рет қаралды 171 М.