Thanks Darren.
2:00:03 PM
2:18:49 PM
Error
Exception: Failed to send email: no recipient
Twilio
@ Code.gs:51
This is the error shown.
Thanks Darren.
2:00:03 PM
2:18:49 PM
Error
Exception: Failed to send email: no recipient
Twilio
@ Code.gs:51
This is the error shown.
Okay, so that error is pretty obvious.
In the code you posted, you have the following function definintion:
But you donāt show how that function is called.
Find the line in your code that calls that function, and check the value of to
at that point.
I think this code is a knock out. Check it out.
Very very useful code.
Here is a sample spreadsheet you can test and see how it would work
Please change the status in order to see the results.
Please note in the sample sheet. you wont have the email function. Instead click on the link down
Please make a copy of this sheet. And enjoy the magic.
Where do you put the scripts for working?
You put them there and work on Glide?
Iām not sure I understand your question.
Scripts are generally used to extend the capabilities of Glide, or fill in the gaps to do things that Glide cannot do.
For example, there is no current way to execute time-based actions with Glide, so scripts can be used for this. There are many other examples where scripts might be used.
oh perfect. Thanks!
Found this very useful. A script that adds a function to search for coordinates based on an address:
/**
Returns latitude and longitude values for given address using the Google Maps Geocoder.
@param {string} address - The address you get the latitude and longitude for.
@customfunction
*/
function GEOCODE_GOOGLE(address) {
if (address.map) {
return address.map(GEOCODE_GOOGLE)
} else {
var r = Maps.newGeocoder().geocode(address)
for (var i = 0; i < r.results.length; i++) {
var res = r.results[i]
return res.geometry.location.lat + ", " + res.geometry.location.lng
}
}
}
i found this veryā¦very helpful since iām doing an App with huge data base.
this code will take all the files from G drive folder and create a G spreadsheet with links and file names of all the files in that folder. Then all you have to do is crate some formula to arrange them the way you need⦠and is ready to copy and paste to Glide G sheet.
This Google Apps script produces a new Google sheet containing the list of files in a Google Drive folder, along with their URLs on Google Drive. Such a file is helpful for creating a datalinks manifest for importing datalinks into an ortext.
Steps for installing and running the Google Apps script:
The Google Apps script code for listing a folder with URLs to a new Google Sheet:
// replace your-folder below with the folder for which you want a listing
function listFolderContents() {
var foldername = 'your-folder';
var folderlisting = 'listing of folder ' + foldername;
var folders = DriveApp.getFoldersByName(foldername)
var folder = folders.next();
var contents = folder.getFiles();
var ss = SpreadsheetApp.create(folderlisting);
var sheet = ss.getActiveSheet();
sheet.appendRow( ['name', 'link'] );
var file;
var name;
var link;
var row;
while(contents.hasNext()) {
file = contents.next();
name = file.getName();
link = file.getUrl();
sheet.appendRow( [name, link] );
}
};
I did updated Code BOOK with this code.
isnāt such a simple but complex code??? lol⦠and what a time saver!
Hello @Uzo
good
it may be a good idea to add an ID of the files.
In my application, I reconstruct the address from an ID to find a file.
example for: webview pdf
.......
sheet.appendRow( ['name', 'link', 'ID'] );
var file;
var name;
var link;
var id;
while(contents.hasNext()) {
file = contents.next();
name = file.getName();
link = file.getUrl();
id = file.getId();
sheet.appendRow( [name, link, id] );
}
in my case i did not need ID for Glide⦠but always⦠more data is more money! lol
Nice idea, gives you the ability to embed
@Drearystate Does anyone know how Google designates who used what amount of app script run time?
Does the runtime quota go against the creator of the workbook or the account who added the trigger?
I ask because I initially setup Glide with a free gmail account. (Iām using a paid account to add the triggers) Should I be looking to migrate my apps to a glide account owned by a paid google workspace account?
The last row āTriggers total runtimeā is what Iām concerned about.
I have a reasonably active system with a combo of GS and GT (Glide tables).
I have several scripts running to do all kinds of fun things in Google Sheets (the GS bit).
28K executions (they are busy things)
It does depend on your use case though
I am using the same account for multiple workbooks / apps. (Could start using different accounts to set the triggers??)
Iām probably using around 10x the amount of executions as yourself⦠and I plan/ hope to expand.
At a certain point you might thing about whether your app / service is architected in the right way, and whether it is worth the hit to rewrite things.
Personally I do not care about sunk cost. It is what it is. I am also quite happy to trash what I have if I can get something that fits better. It might cost something to redevelop, but if it saves time or creates a better service, then sure.
One thing I recommend is paying for an hour of an expertās time to walk through your app and your approach. My app changed completely when I worked with @gvalero to go through my app⦠and he pointed out all the āweaknessesā with Google Sheets that I would hit with my then approach. Basically, he saved my project, as it would have been a total disaster.
And that is just one small example
Thanks for your note Mark!
Itās a pleasure to help friends.
Feliz dĆa.