Dynamically appending input field in Google Forms - google-apps-script

I was making this form collecting information about team members of participant teams associated with a competition. The number of members in the team is not fixed. So, I want google form to load number of name fields equivalent to the number of members specified by the user. Is it possible to do it by using App Script or is there any pre-developed add-on which can be used for the same?

Related

Google Username from Email

Lets suppose, I have a list of Gmail accounts:-
bobcharles#gmail.com
randomuser#gmail.com
Can we extract the names of the users using these mails? Like for the first mail, the user might have the name Bob Charles. Can we find a way to extract these names in bulk without using google sign in.
Please share how to do this. I am using this for finding the usernames of the university students whose emails are known. This is for a website where university students might interact with students who will make an account later on, but their ids must be known right now.

Is there a way to get Group Guests using the calendar service in Google Apps Script?

I am writing a tool in Google Sheets to analyze my work calendar and I just noticed that if I invite a "Group" (of 23 people) it only shows up as a single guest in the calendar data. Is there a way to get access to the e-mails of the people in the group?
From my research I know there is a Groups service but I'm not sure how to even recognize that it's a group. It looks like a normal e-mail address in the calendar: "management_team#gmail.com". (I could search for that specific group name, but I'm looking for a universal solution, so I can share this tool with others.)
Any suggestions will be appreciated. Thank you.
To verify either an email is a group and to retrieve its members you need to use the Admin SDK method Groups:get
But in order to use the Admin SDK you need to be a domain admin.
Each person who uses my tool will need their own copy and they will have to enter their calendar e-mail address. (The first time they run the tool there's a rather scary permissions message, but I will only be sharing this with some office mates so that should be okay.)
When my program runs I'll use this command:
var groups = GroupsApp.getGroups();
... to get a list of all the groups to which that person belongs. (I'll also have arrays for the members of each group.) Then I'll just compare the group names against the meeting guest names. If there's a match I can pretty easily retrieve the whole list.

How can I show the logged-in user in Power Apps Portal what their form submissions are?

The setup
I have a Power Apps Portal with the following pages:
Prequalification page. This has an entity form embedded inside it. The entity form is linked to the custom entity SupplierPrequal. When the user fills in and submits that form, they are redirected to the next page.
Submission List page. This has a List embedded inside it. The list should show each of the logged-in user's form submissions.
Submission Edit page. This has an entity form embedded inside it. The entity form is linked to the same custom entity SupplierPrequal and lets them attach files to a previous submission.
The problem I am facing
On the Submission List page, it shows submissions of users other than the logged in user. Here is a screenshot. You can see that the metadata for fields like [Created By] does not identify the user who submitted the form.
I was able to autopopulate the field [00_lkp_UserSubmittingForm] with the logged in username. Unfortunately this is not a unique identifier, and is also editable by the user.
I see these potential solutions, and would appreciate your advice
Change the metadata so that instead of recording the field [Created By] as "SYSTEM", it will record the logged-in user's unique identifier. Then change the view's filtering conditions, so [Created By] equals the current user.
Change the metadata so that a new field such as [00_lkp_UserSubmittingForm] will be autopopulated with the logged-in user's unique identifier. Then change the view's filtering conditions, so that new field equals the current user.
I suspect that both these approaches will require a lookup of the [External Identity] entity's field [Username]. They will probably involve configuring the entity form's tabs "Entity Reference" and "Entity Form Metadata" in Portal Management.
What I've researched
This link describes a similar problem, although the solution is for a CRM Portal, not a Power Apps Portal.
This link addresses the issue for a Canvas App, not a Portal App
This link apparently got it working, although I am still trying to understand what I need to configure.
If I understand your problem statement you wish to filter out Entity List, in your case Submission List page based on your logged in user.
As you might now, every user in Portals is a Contact record in CRM.
If I see your createdby, modifiedby and owner fields, I believe you have some background logic which runs under System (user) and does the required.
You have 2 way to solve your issue:
Either change your background logic to run under the context of running user. This will createdby, modifiedby and owner as running user and not System.
or you create a lookup field 00_lkp_UserSubmittingForm I say lookup and not plain text field. This lookup field will have relationship with contact. So you can autofill this field (lookup) with contact as user. In this way you get unique value in your 00_lkp_UserSubmittingForm field. Because it has unique guid for each user (in turn a contact)
Now with above any method what you get is current user (unique).
Then you can follow any of the below article to solve your issue.
List item
In Entity List itself, there is one option to add Filter Condition. Please check below:
Article Ref
Or follow this article

Gmail add-on to pull data from many URLs

We are writing a Gmail add-on for synching the user's work schedule into his/her Google calendar. This requires logging into the the employer's workforce management application and fetching data from it. Every different employer is a different customer with a different URL. So, for every customer who wants its employees to be able to use this, we have to add another URL to urlFetchWhitelist and openLinkUrlPrefixes in appsscript.json. We could potentially have hundreds of customers using it. Is there a limit to how many URLs we can put into urlFetchWhitelist and openLinkUrlPrefixes? Or is there another way to solve this?

Is there any way to get a information on activities performed by a specific box user through box api?

Say I want to know what all operation a box user "x" has performed in last week. Is there any way to acheive this via box api??
Or for that matter given a file id can we get a list of all the activities performed.??
If you are the administrator of a Box enterprise and the user is within your enterprise, you can do one of two things:
Fetch all events in the enterprise within your timespan of interest and manually filter them to the particular user using the event.created_by.login. You can filter to a particular file using the event.source.id property.
Fetch the particular user's events using the On Behalf Of API.
Otherwise, you can only fetch events for the user represented by the Bearer token.