haha, don’t sweat. I’m a Certified Expert when it comes to putting my foot in my mouth, so you’ve got a ways to go yet
Code BOOK - Desktop
share cool CSS, scripts and links
haha, don’t sweat. I’m a Certified Expert when it comes to putting my foot in my mouth, so you’ve got a ways to go yet
Thank you for this.
Actually I was asking if Document Studio will work upon Glide Form submission.
Does for us. Document Studio just takes whatever column/data from your Google sheet that you need formatted and modifies it into PDF. Glide allows us to deposit the data, Document Studio allows us to create PDF’s out of the deposited data.
Thank you for the response. That is good to know.
Does Glide Form submission triggers Document Studio automatically or you will have to do it manually in GSheet?
My requirement is, I want Document Studio to start its work as soon as Glide Form submission is done. As far as I know, it is not possible except for Time Trigger of 1 hour or 30 min?
Can you help me with this?
Yeah no problem!
To be honest, we haven’t tried it for immediate action-based triggers yet such as your use case. We use it to send out monthly reporting and invoices to clients, so I’m not sure I’d be any help (sorry!).
I know they have some extensive videos on how to use the add-ons, have you tried watching those?
I am regular user of Autocrat (since last 3-4 years) but I guess, all such add-on either has time trigger or Gform submit trigger. Additionally time trigger has a time interval of minimum 1 hour or something which does not fulfill y requirements.
This thread helped me to achieve this. Thanks to all contributors.
This solution is without interfering with google sheets. Also, it’ll trigger by clicking a button(webhook action)
Hi,
I opened a new topic and was referred here.
I am looking for a solution to export data from GS to a printable PDF template.
Some of the data contains URL images (Quickchart.il) and HTML+CSS Tables stored as template columns.
I know I will have to write the template scripts to a new row to capture the data.
I know that Document Studio give a solution for mapping columns in a word template but not sure it supports HTML or URLS.
Any Ideas?
Is all of the data you want in the PDF in GS or is some of it still in Glide?
some is in Glide but that’s not a problem, I guess I will “add row” to a new sheet that will write the data to GS before creating the PDF
I jump into this thread just because i am finding the way to get the file link using the Folder name and file name in Google Drive and @Luther recommend this thread.
I understand the script doing:
That’s all i currently using.
But another crucial part is how can i get that File Link to placed on google sheet so people can straightway open in Glideapps ?
I mean like which part of the script had return this part:
var url = pdf.getUrl();
The @Uzo 's script one?
No var url = pdf.getUrl();
let me know if any questions… sorry for the late response… still hungover after the new year party LOL
// (c) StructureArt DIGITAL
function savePdf() {
var sourceSpreadsheet = SpreadsheetApp.getActive();
var sheets = sourceSpreadsheet.getSheets();
var sheetName = sourceSpreadsheet.getActiveSheet().getName();
var sourceSheet = sourceSpreadsheet.getSheetByName(sheetName);
var pdfName = "PDF 1"; //replace with generated unique name
var folder = DriveApp.getFolderById("FOLDER ID"); //replace with your public folder ID
// Copy spreadsheet.
var destSpreadsheet = SpreadsheetApp.open(DriveApp.getFileById(sourceSpreadsheet.getId()).makeCopy("tmp_convert_to_pdf", folder))
// Delete redundant sheets.
var sheets = destSpreadsheet.getSheets();
for (i = 0; i < sheets.length; i++) {
if (sheets[i].getSheetName() != sheetName){
destSpreadsheet.deleteSheet(sheets[i]);
}
}
var destSheet = destSpreadsheet.getSheets()[0];
// Repace cell values with text (to avoid broken references).
var sourceRange = sourceSheet.getRange(1,1,sourceSheet.getMaxRows(),sourceSheet.getMaxColumns());
var sourcevalues = sourceRange.getValues();
var destRange = destSheet.getRange(1, 1, destSheet.getMaxRows(), destSheet.getMaxColumns());
destRange.setValues(sourcevalues);
// Save to pdf.
var theBlob = destSpreadsheet.getBlob().getAs('application/pdf').setName(pdfName);
var newFile = folder.createFile(theBlob);
// Delete the temporary sheet.
DriveApp.getFileById(destSpreadsheet.getId()).setTrashed(true);
// Create file URL
var filename = encodeURI(pdfName);
var files = DriveApp.getFilesByName(pdfName);
while (files.hasNext()) {
var file = files.next();
if (file) {
var fileUrl = file.getUrl();
};
};
Logger.log(fileUrl);
}
share cool CSS, scripts and links
@biha simply set value…
sourceSheet.getRange(“A2”).setValue(fileUrl) // change A2 to your cell
Stuck on step 3 where I need a GCP project number. Does this cost extra because I need to make a google cloud account? I got it working with a google sheet earlier, but I’d like to use this more direct approach with only a google doc. I have yet to connect to glide.