Google Sheets Script access searching contacts dialog - google-apps-script

Is it possible to access my Google contacts from Google Sheets? I've created a simple spread sheet where I enter information for my drivers. Once the data on a row is entered it may be modified by other users that access the same sheet, but eventually - one of the users will need to send the data in that row to a specific driver via email. I currently accomplish this by using a Google Sheets Script to take the row values and build a mailto: hyperlink onEdit() in the last cell:
var emailtoString = '=HYPERLINK("mailto:changethis#address.com?&subject=' + subjectData + '&body=' + formatedData + '", "send email")';
e.source.getActiveSheet().getRange(row,9).setValue(emailtoString);
Which is working as expected and allows for whatever users is clicking the hyperlink to open the preformated gmail in their account - they can then delete the "changethis#address.com" email address that is allowing the hyperlink formula to create and then they have access to their contacts in the to: field - so if they start typing a user name, a selection list displays to let them select the contact.
This works, but separates the process of sending the email from the sheets script - just to get access to the drop down contacts list. If I could access that TO: dialog directly from the sheet cell - so the user sending the email is really just selecting an address from their contacts, then I could use the sheets script to just send the email message without having to open a gmail message and I could further flag another cell as "Message sent to emailaddress". By using the hyperlink it is making it difficult for me to figure out how to set a flag letting other users know an email has already been sent to this driver. So I am wondering if its possible avoid all this hyperlink creation and instead, just present the user(s) of the spread sheet with a selection dialog from the user accessing the sheets personal contacts so they can select someone to send the email and I can script sending the email rather than building the Hyperlink to open Gmail.

From the question
Is it possible to access my Google contacts from Google Sheets?
Yes it's possible. Use the Contacts Service (ContactApp)
Reference
https://developers.google.com/apps-script/reference/contacts
Related
Create a Contact Group via Google Spreadsheet

Related

Google Spreadsheet conditional email notification script

I am studying Google Spreadsheet script coding but not working for me. I am trying to create a conditional automatic email notification script
I have a lead sheet and the first column of this is named as lead owner and I have given few names in dropdown in this column... I want that when I select a name from dropdown menu then this Google spreadsheet sends an email to that person's email id that you've assigned a new lead.
Can you please help me in this.
I have used IMPORTRANGE formula too which copy and paste that lead to a different sheet named to that particular lead owner.
I am stuck on this email notification. tried few add-ons but not successful. Please help.

How to get current user name (mail id) in app script

How can I get the current user's email address using Google Apps Script?
For example, if my Google Sheet is shared among different users and multiple users are accessing the same sheet concurrently.
I'd like to capture the individual user name for whoever has modified text in Column A and record it in column Z.
I've tried using:
Session.getActiveUser().getEmail();
However this isn't working, it returns nothing.

sending automatic emails by google script

I am trying to set up an automatic email notification system in google spreadsheet.
I would like to send these emails from a specific sheet, name is "contacts".
How can I set up a script what is using this sheet instead of the first sheet?
Thanks
I use a sheets Add-on called formMule. You can select the sheet from which you want to send your emails. Go to the Add-ons menu, and search for "formMule".
FormMule allows you to select the sheet, send on a condition, send up to 12 different email templates. You can send at a specific time as well.
I use it all the time. Let me know if you have any questions about how to use it.

Google app script import CSVs

Okay. Multiple people use the scanpet app to create csv files of 3 columns [uniformly structured, no headers in csv].
I'd like them to email the created file to a gmail account, then go to a google form. I realize for this to work it's have to be done after each email submitted and that is okay... please read to end.
I'd like to make a google form with only one option, just to enter a record to trigger an event. Link the form to a google sheet. I'd like this sheet to house the script I'm asking help for in the script editor, and the google sheet to then have two other tabs named Transfer and MailOrder each with the same 3 columns as the csv files.
After the employee sends the file he completes the google form.
script triggers on form submit, and will grab the the latest csv attachment from gmail and depending on the subject line of the email (Mail Order or Transfer) add the values to the existing data entries under the tab with the same name as the subject line.

Display the result of a calculation in Google Sheet to the user after he sent a Google Form

I created a Google Form that send its results to a Google Sheet for further calculations. Therefore, I'd like to display the results of those calculations to the user once he has sent the Google Form (either instantly or via email).
How can I achieve this ? Should I use a module ? Or a Google Apps Script ?
Thanks for your time
Considering that, You are collecting data from multiple user into the spread sheet collect their email Id's as well along with other data,
How to get email Id column in spreadsheet?
Go inside google form edit mode -> see the settings icon from the right corner of the page > click on that -> check the Collect email addresses checkbox -> Save.
Now, you will have Email Address column in the spreadsheet.
Lets suppose you are receiving the marks of 3 subject, calculate the sum of those these 3 values, same for each users records(row) in loop or use VLOOKUP/ formula to calculate sum, get email address from the same row of the respective user and send mail to that user using MailApp api and add sum inside email body with some text formatting.
Perhaps, check out two addons for Google sheets, autoCract and Docotpus. We use them all the time to get and send student's results. They are very helpful.