cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GeraldDahl
Helper I
Helper I

Google Contacts and Power Apps

My employer is tied to Google Contacts because of the voice activated features that platform allows him to access. I'm hoping that my employer will demonstrate more interest in Power Apps if I can show that it has the ability to list, edit and create Google Contacts. The best reference I've found is in this document but I'm having trouble applying it and am hoping to find a tutorial or video.

 

I can get my Google Contacts to present themselves in a gallery and I can also associate a form with the Google Contacts connector/datasource as shown below:

error message show for form associated with Google Contacts connectorerror message show for form associated with Google Contacts connector

 

I have tried to create custom cards for the form and can successfully identify them with the datasource and with a selected item from a gallery connected to the Google Contacts datasource however the error message 'the form isn't connected to data yet' persists.

 

I want to fill in a form in order to edit an existing contact or launch a new form to create a new Google Contact and then submit the form, but none of this will work unless I connect the form to the datasource properly, if that is even possible.

 

Alternately, I have a sense that the solution that might involve adding code to a button [ie, see p.871 in the document linked above or see here: GoogleContacts.CreateContact (CreateContactParameterBody body) ]. I tried to experiment with the preceding syntax along with some intellisense clues from Power Apps and concluded that my code wasn't working because JSON scripting was necessary. I've had a touch of JSON experience from Flow and from Shane Young's video on saving an attachment via flow into a Sharepoint document library, however none of my efforts, including reading up on the Power Apps documentation for JSON is getting me anywhere.

 

Thanks to any and all who can assist me further with this ambition of mine to use Power Apps to manage Google Contacts.

 

GERALD DAHL

1 ACCEPTED SOLUTION

Accepted Solutions
kbilakanti
Resolver II
Resolver II

@GeraldDahl  We don't an operation within google connector to update an existing google contact. Perhaps we can only List the contacts and create new contact using google connection within either power apps/ Power Automate. I tried in both ways, i found only these two options (List contacts and Create Contact).

View solution in original post

3 REPLIES 3
kbilakanti
Resolver II
Resolver II

@GeraldDahl  We don't an operation within google connector to update an existing google contact. Perhaps we can only List the contacts and create new contact using google connection within either power apps/ Power Automate. I tried in both ways, i found only these two options (List contacts and Create Contact).

View solution in original post

Thanks for your reply @kbilakanti.


I experimented a bit and had more success when I put this code on my gallery:

If(varSort=true,Sort(GoogleContacts.ListContactsV2().value,'gd$name'.'gd$givenName'.'$t',Ascending),Sort(GoogleContacts.ListContactsV2().value,'gd$name'.'gd$givenName'.'$t',Descending))

 

Outside of the gallery I had a button to set varSort, of course, and, I also had a button to create a new Google Contact with this code in it:

 

GoogleContacts.PeopleApiCreateContactV2("aaa").name.givenName

 

I noticed that when I edited the contact from within Google Contacts and pressed the sort button on my Power App in order to refresh the gallery the edited contact would appear.

 

I guess I'm still hoping for a solution that will allow a person to edit the Google Contact directly from Power Apps. I don't know enough about either JSON or patch to know if a button (from within the gallery I am using in Power Apps to show the Google contacts) that had syntax in it to identify the record that needed changing could in fact achieve the desired result of editing the Google contact from within Power Apps.  I've checked the options in Flow but they only seem to have to do with Google contacts and Outlook contacts.

 

Hopefully a solution will develop.

GERALD DAHL

 

@GeraldDahl  Excellent! What you have done absolutely works, because those are the only two operations that are supported by google contacts connector as i mentioned before as well. If you want to update any existing google contact using gallery or any other approach. I am worried, I don't see it is available. 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (45,457)