Google Form - collect username from multiple domain - google-apps-script

I have two question as i am creating a form to collect some responses:
Q1:
When creating a form using app-script, how to default the date in the google form say, tomorrow's date ?
Q2:
I want to share the form to email addresses across various domains (hosted using gmail app) and want to collect the username in the response. The form is restricting me only to share and collect across a particular domain from which I have created.
Is there a way to configure with 'Require login to view this form' and 'Automatically collect respondent's email address'
I tried to search for the past 1 hour and couldn't get any useful result.

Q1: When creating a form using app-script, how to default the date in the google form say, tomorrow's date?
You can pre-populate the responses for a Google Form by generating a "pre-filled URL" for respondents to use to open the form. For example, if the link to the form is presented on a web page, the href could be formatted with tomorrow's date as the answer to one of the questions.
Q2: I want to share the form to email addresses across various domains (hosted using gmail app) and want to collect the username in the response. The form is restricting me only to share and collect across a particular domain from which I have created.
That seems to be a reasonable security restriction on Google's part. You could duplicate the form in each domain, and use back-end scripting to combine results.

Related

Trying to disable google form questions if user from a certain whitelisted domain accesses it

I have two whitelisted domains in my organization, and I have a form that should not be fillable by any user in one of those domains. The form automatically collects the full address of the user. So... anybody#domain1.com should be able to open the form, fill it out, and submit it. everyone#domain2.com should be blocked in some way from filling and sending the form. Remember, they're not entering an e-mail address; the address is simply auto-filled via normal GForm rules.
I'm starting to look into using Google script to do this somehow, but am unfamiliar with it - thought dropping a question here while I look would be beneficial.

Finding Gmail Snooze dates in API

Is it possible to access the date of a Gmail snooze through the API? I came accross a hack in stackoverflow that allows users to search for which emails are snoozed via a secret label search “label:snoozed”, but lables dont normally have an associated date, especially one that will return to the inbox in the future.
Im trying to create a web routine that syncs a todo list with emails and want to the due date to automatically update with when the snoozed email will re-appear.
Is this possible with any API or developer resources google offers?
No, you can’t retrieve the date of a Gmail snooze using the API.
There is a Feature Request already reported for this behavior on Issue tracker:
https://issuetracker.google.com/issues/109952618
At the moment you can only list them and retrieve the messages that has this label ‘snoozed’ active on them:
GET https://www.googleapis.com/gmail/v1/users/me/messages?q=label%3Asnoozed

Limit form responses to once per person....without login?

I am designing a test, I want people to only respond to test once, but without making them log in via Google. Is there any way I can retrieve IP addresses and/or use a cookie to limit their responses?
no, nonexof your wishes are possible currently with Google forms. in fact forms do not support running any code during form fill.
your only options are to either host the google form in your own domain and add custom javascript (not officially supported but google it) or to somehow filter out those responses later (onFormSubmit and such based on other unique data in form fields)

Google Apps Script: Access the form key that allows user to edit their responses

With a Google Apps for Education domain, we can create forms that allows users to edit their response.
This sends a link to the submitter with the url that they can use to edit their response. Essentially this is the url of the form with a unique key at the end.
At the time of submission, I would like to be able to collect this key and store it with the form data for each user.
We are creating an Alumni website (where all users will be authenticated to our domain), and we'd like to have an update my profile page. This would be blank the first time the user submits. But then when they come back, I'd like a script to search the username against submitted entries, and if the user is found, direct them to the link that allows them to update their profile.
At the time of first submission, Google automatically sends the url to the user. However, t is unlikely that years later, they will stil have this email, so if we could provide the link for them, it would be far easier for the user.
I have similar problem. One way to solve, is to implement a Gmail plugin(if all users are gmail users). The plugin can parse the message (extractor), and get the key/or the whole URL. But you need to saveit on some database, in order to have acccess later.
If we got some way to list form keys, it should be much better!

How do I store my site user's email addresses in both Aweber my MySQL database?

My web site has an opt-in form for user's email addresses. The form will have fields such as name, email and phone number.
Upon submission, I would like the data to also be inserted into my MySQL database.
However, I would also like the email address to be added to an AWeber email subscriber list.
Is this possible?
Yes, it is posible to store the data in a database.
Posting data via a 3rd party script is against Awebers Terms of Service. So it is necessary to take another route.
The way to do it is to allow your user to submit their information to Aweber via the JavaScript form, but choose the setting to request that Aweber send the user information back to you, via your thank you page.
You can use the thank you page to store the user data in your database.