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.
Related
I do not have any experience with apps script. Something I am trying to learn currently and this is my first project that I will be working towards.
My company that I work for use a mundane spreadsheet which is used as our purchase document. I have translated it to a Google Sheet that looks like this: https://docs.google.com/spreadsheets/d/1mZlzeu9-9Mb0B1VmlNSJDfCxELqci4KRc_HFbRt3NwM/edit?usp=sharing
Currently, anyone that makes a purchase needs to fill out this spreadsheet and send along a copy of the receipt of the purchase via email to our billing person.
The Google Form I want to create to streamline this will contain basic information like the name of the person filling it out and an email address. I would add some of the items below along with a Google Drive Upload so that the person can upload a picture of the receipt(s).
What I would want to have happen is on a Google Form response, I would like apps script to do the following, in this order:
Create a copy of the spreadsheet linked above and Title it as "[Team Name] [Date] Credit Card Request"
Fill it with the information that is needed:
Date of Transaction
Amount Request
Vendor Name
Program Name (I think this can be done away with because of Team)
Team
When the spreadsheet is filled out, I would like to then email the billing person a completed XLSX copy along with the file attachments that were uploaded for that response.
3a. Sending a copy of the same email to the person filling out the form originally would be a plus.
Because of the format of this spreadsheet, when the team is specified, I am hoping I can have the Apps Script set the value of the corresponding cell for that team (a checkbox) to TRUE.
I may ask for some assistance with this later on, but I am wondering, **is this possible to do? **
My apologies, I do not have any script experience, not sure where to even start.
I am trying to create a log for all the PDIR reports that are generated in our company. For this purpose, I have written an apps script code that brings forth a format from our master sheet when a product part no. is typed. After filling in the information it allows the user to press the submit button that transfers this PDIR to a PDIR database where all the PDIRs are being stored. Now, what I want to do is, add a feature to the submit button that automatically creates a log for the PDIR report. I have attached the format here for reference. I want to find a way to extract the URL of a particular sheet and add the link in the log next to the invoice, so my employees do not have to waste time finding different invoices and can just search for the invoice no. and have a link ready to take them to it.
Long story short, I want to find a way to get a URL of a sheet from a different spreadsheet using 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
I currently have a google form which appends responses to an Excel format file. I have also attached a script to it which parses the response and emails the results...
Building on that, how would I do the following additional steps:
Keep the current behavior which appends responses to the default EXCEL spreadsheet format file.
Convert the default EXCEL spreadsheet format file to a file called allresonses.txt (CSV format)
Saves the current responses as mytest.txt (CSV format) and have this emailed as an attachment. (Currently I am able to only add them to an email using my script)
Any help would be appreciated
Thank you
The solution is to use scripts , I check the google forms script examples.
Quick walk through:
1. Just create a form in google forms and add your questions.
2. Create a script on the add script page (of course google for the correct script or check the developer forum examples)
3. While the default is a spreadsheet format you can select one of the supported types (again I check the google developer examples,they're somewhat dated but do still work.)
All sorted now.
Thank you
I have a script that turns a submitted form into a PDF and emails it automatically but I can't seem to get my head around if it is possible to implement a function i would like: -
User fills in Google form
Submits form
This creates entirely new spreadsheet based on same headers from the form
Emails thie spreadsheet as an .xlsx attachment automatically to a specific email address
Is this possible? I feel like I am missing a simple way to do this but I am having a moment of noobishness! :-)
1, 2, 3 - all quite possible.
4 - Not as such. There's no support in Google Apps Script for converting a Sheet to Excel format. However you could produce a CSV file which would be understood by Excel or any other spreadsheet program, and email that as an attachment.
Generating a CSV is covered in one of the Apps Script tutorials. See Saving a selected Range to a CSV file from Tutorial: Interacting With Your Docs List.
An example of attaching files from Drive is provided in the documentation for MailApp.sendEmail().