Hi I have a shared google sheet where everyone will put values. I need some mechanism that will trigger a popup notification in chrome even if the sheet is not open. This will trigger when a particular cell/column/row value changes.
i searched the web vigorously for some ad dons or script but couldn't find one. everyone i found will send email but i don't need 100, 1000 email. i need just popup/push notification.
i have no background in coding i'm trying to teach myself step by step so elaborated answer will be very appreciated.
so after a lot of searching i found a way, though not working 100% correctly all the time but it can , have to just polish some values and conditions.
there is a service called www.integromat.com they have a great way to almost integrate anything with anything. and this solved the problem.but they are expensive.
they has add on for sheet as well as chrome which can talk to each other with super easy dashboard.
though this is a third party dependent solution i would like to know if it is possible within gsuit and or sheet.
Related
Does anyone know if there is a way to use the Google Sheets API to get the email address of a people chip? It seems like the only values it will give me are the person's full name as displayed in the cell.
While trying to figure this out I discovered that the name turns into an email address if you use "Format > Clear Formatting". I hoped I could hack this by copying the value into a hidden sheet, clearing the formatting, and then get the email address there. But though Google Apps Script has a function for executing that on a cell, I have found no way to do it with the Sheets API. I tried clearing all the possible formats I could via batchUpdate with an updateCellsRequest but that isn't turning the people chip into an email address.
I'm at the point where if I really want to automate this, I will need to use the scripts API as well, to deploy and execute a tiny Apps Script just to run clearFormat on a cell. I'd like to avoid this much complication, especially since Apps Script doesn't work for service accounts.
As Tanaike mentioned this is not possible at the moment but there is already a feature request in the Google Issue tracker related to adding the people chips to the Sheets API. You can check the request here.
I would suggest posting a comment on it and explain why you are interested in this feature. Or if you think your request has a different approach you can also submit a new feature request for the Sheets API here.
I’ve created a Google Sheet – kind of like an app – using script. It’s a number of blank cells where once added some information, it creates a string with that information in the right order. I created this to help some colleagues. We are using free accounts.
I face 2 problems:
The app is supposed to be used by only one person at a time, but I’m sure at some point two or more people will want to use it at the same time. Is there a way to allow this without they interfering with each other? I’ve read you can share a link that creates copies of your doc, but that wouldn’t work in this case because I intend to keep updating it regularly.
The changes people make to the sheet will stay there. Right now I have a onOpen function that just rewrites everything, but if someone accesses the document while someone is using it they’ll rewrite everything and ruin their work.
Any ideas on how to solve these two problems? Thank you so much in advance!
I think that you have to find another way to implement your "app" because Google Sheets not a good tool for limiting that only one user edit a spreadsheet a time, but if for any reason you decide to keep with it,...
... you need to implement a workflow like the following
Save the active user email on PropertiesService.getUserProperties().
This should be done by each user by running a script themselves. The most user-friendly will be by using a macro, custom menu or button (a drawing with an assigned Google Apps Script function). You might use an open installable trigger to validate that the active user have already done this.
You might have to make the function that clears the data a "smart" function.
You might have to consider additional cases, like if the owner of the spreadsheet opens it when there is an editor working on the spreadsheet.
Use installable triggers to manage the sharing settings.
Use an open trigger to remove all the editors except the active user
Use a time-driven trigger to add again the editors. To make this work effectively should define how the time-driven trigger will know that the last editor have finished their session, i.e. you might use DriveApp.getFileById(SpreadsheetApp.getActiveSpreadsheet().getId()).getLastUpdated()
The above should help you with both problems, as long you as the owner do not open the spreadsheet as is used by someone else.
Other alternatives that might work better is to create an add-on or a web application.
Related
Determine current user in Apps Script
Last modified date in Google App Script GAS sheets
So, here at the company I work for we usually manage the workforce weekends schedules in a very manual way using Excel, and then upload a pdf version of the sheet in our intranet so everyone can see their own schedule for the rest of the month and look up for swaps if they need to.
The problem is that the workforce recently has grown up a lot and we're spending a lot of time validating and reuploading the schedule everytime we need to do the shift swaps. So I decided to start a project using Google Sheets and Google Forms, so we could just show iFrame of the sheet in the view mode, and their supervisors could make their swaps via a google form, which would update the sheet and they could see it happening on-the-fly, I guess.
Now that I gave you some context, what I really need is to discover if there's actually a way to accomplish what I'm trying to, because I already stuck once realizing that the script running from a Google Sheet only works with edit permissions (I need to no one have permission to change manually the sheet and preferably not even needing to link account to Google), but now I realized even when scripting inside of the form it doesn't run when people are answering to the form, but only in the edit mode, which I think it's useless for me since questions should be dynamic (the form would look for the available weekends and employees in the sheet using some validations).
For example, the code below runs when I open the form in Edit mode, but not when I open the shared link:
function onOpen() {
var ui = FormApp.getUi();
ui.alert('test');
}
So, my question is if this project is possible using Google Scripts and the suite, if there's some kind of option or permission I'm missing to make it work, or if it's worth I try to do it using an not inbound countainer script, or maybe HTML Service, or if I should forget Google and look for another tools for this job.
Thanks.
I'm very new at this and I think I'm trying to do something a little complicated. Ultimately I'm looking to do the following: I would like to have a spreadsheet that upon a submit button does the following, sends spreadsheet to a specified email address, then increases a specified cell number by 1, then clears data that was entered in specific cells.
I have figured out how to increase a cell on a button push that's as far as I have gotten. Any chance someone would be able to point me in the right direction?
For your emailing you want to use MailApp.sendEmail()
The PDF conversion mentioned in the subject line is also pretty easy to use Spreadsheet.getBlob() or if you want to be a bit more verbose Spreadsheet.getAs('application/pdf')
Generally the GoogleAPI is pretty good at explaining a lot of the detail on how to connect to the google libraries
I've made a simple script in Google Apps Script. The script builds forms based on a spreadsheet, the script itself is part of the spreadsheet. It adds a menu item. People would like to use it. They are non-technical people, so I would like to make the installation of my script as easy as possible. With 'installation' I mean a way to 'import' my script into their spreadsheet and automatically set up the needed triggers so the menu item becomes visible. It should be possible for anyone to install it.
I've been thinking of the following solutions:
Publishing as an add-on: my script wouldn't qualify, and even then I can't wait for Google's approval.
Copy-paste. I don't like this, it's way too complicated.
I've looked at this question: https://stackoverflow.com/questions/5334751/how-do-i-share-a-script-i-wrote-with-my-co-workers-on-the-same-google-apps-accou, but the people wanting to install it are not on the same domain in my case. The question is also 3 years old.
EDIT: As it turns out, there doesn't seem to be a solution. I've filed a feature request here: https://code.google.com/p/google-apps-script-issues/issues/detail?id=4122&thanks=4122&ts=1403949074
If your Google Account administrator allows you, you can share scripts/spreadsheets outside your organisation either by sharing directly with another person with a Google Account (Gmail or Google Apps) or by making it public (share with a link or published online).
https://support.google.com/drive/answer/2494822?hl=en
Keep in mind that if you use the Script Properties to store values, each time someone uses the shared script it will overwrite the values. In a shared context it is best to use User Properties instead. This way each user can store their own values.
https://developers.google.com/apps-script/guides/properties
There is no way to import a script in an existing spreadsheet , the "normal" workflow is , in a way, the reverse process, that's to say create a sheet from an existing template that already has the script in it and start to work with that copy.
From your description I'm not sure this method could be useable but I'm afraid there is no other way if you want people who will be using it should not go into the script editor at all.
There would be a couple of functions to write that should run at install time and would create the triggers (if needed) and trigger the authorization process.
I made such a SS some time ago that needed authorizations and I added an "install" menu that made its use quite simple (example here on a friendly hosting site).
I know this is probably not the answer you were expecting but it was definitely too long to fit in a comment anyway.