web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Save contact to Outloo...
Power Apps
Unanswered

Save contact to Outlook from PowerApps

(0) ShareShare
ReportReport
Posted on by 242

I use the PowerApps Contact template. I wanted to add a function to save the selected contact to Outlook.  So i created a flow with a PowerApp trigger. Then i try to Create a contact. But is not possible tot select the given name or an e-mail address. 

 

In the app i have a button with the following code: What am i doing wrong?

 

SaveContactinOutlook.Run(First(EmployeeProfile).Id, First(EmployeeProfile).GivenName; Notify("Contact saved successfully in Outlook contact list "))

 

 

Categories:
I have the same question (0)
  • alaabitar Profile Picture
    1,503 Super User 2024 Season 1 on at

    Hello,

    You can send the email address or the email as a parameter in the trigger so that you can save it from power automate.

     

    Best regards,

    Alaa

  • Mirtemir Profile Picture
    242 on at

    Hi, could you give me an example maybe?

  • v-yujincui-msft Profile Picture
    on at

    Hi @Mirtemir ,

     

    Do you want to Save contact to Outlook from PowerApps?

     

    I have made a test for your reference.

    1.Create a flow.

    json(outputs('Compose'))
    Schema:
    
    {
    
     "type": "object",
    
     "properties": {
    
     "AccountEnabled": {
    
     "type": "boolean"
    
     },
    
     "BusinessPhones": {
    
     "type": "array"
    
     },
    
     "City": {},
    
     "CompanyName": {},
    
     "Country": {},
    
     "Department": {},
    
     "DisplayName": {
    
     "type": "string"
    
     },
    
     "GivenName": {
    
     "type": "string"
    
     },
    
     "Id": {
    
     "type": "string"
    
     },
    
     "JobTitle": {
    
     "type": "string"
    
     },
    
     "Mail": {
    
     "type": "string"
    
     },
    
     "MailNickname": {
    
     "type": "string"
    
     },
    
     "OfficeLocation": {},
    
     "PostalCode": {},
    
     "Surname": {
    
     "type": "string"
    
     },
    
     "TelephoneNumber": {},
    
     "UserPrincipalName": {
    
     "type": "string"
    
     },
    
     "mobilePhone": {}
    
     }
    
    }
    

    vyujincuimsft_0-1641982310504.png

     

    vyujincuimsft_1-1641982310514.png

     

    2.Create a app.

    SaveContactinOutlook.Run(JSON(Office365Users.MyProfile()))

    vyujincuimsft_2-1641982310515.png

     

    Best Regards,

    Charlie Choi

  • Mirtemir Profile Picture
    242 on at

    Hi thanks very much. The flow works. However, it saves the data of the logged in user that presses the button in Powerapp instead of the data of the collected user in the app. Is there a way to change that?

  • Mirtemir Profile Picture
    242 on at

    Hi thanks very much. The flow works. However, it saves the data of the logged in user that presses the button in Powerapp instead of the data of the collected office365 user in the app. Is there a way to change that?

     

     

  • Verified answer
    v-yujincui-msft Profile Picture
    on at

    Hi @Mirtemir ,

     

    You can put single or multiple users' data into a collection and then pass the collection to Flow.

     

    1. Here is my SharePoint list.

    vyujincuimsft_1-1642648516068.png

    2. Add a Check Box Control in the Gallery Template and apply the following formula on its OnCheck property as:

     

    Collect(yourcollectionname,{displayname:ThisItem.personcolumnname.DisplayName,email:ThisItem.personcolumnname.Email,phone:ThisItem.phone})

     

    3. Select the Check Box Control and apply the following formula on its OnUnCheck property as:

     

    RemoveIf(yourcollectionname,ThisItem.personcolumnname.Email=email)

     

    4. Add a Button Control and apply the following formula on its OnSelect property as:

     

    YourFlowName.Run(JSON(yourcollectionname))

     

    vyujincuimsft_5-1642649228432.png

    5. Create a Flow.

    vyujincuimsft_2-1642648933040.png

    vyujincuimsft_4-1642649153824.png

     

    Best Regards,

    Charlie Choi

     

  • Mirtemir Profile Picture
    242 on at

    Thanks!!! I used the collection and adjusted the flow to your example. And it works!! The JSON schema is now:

    {
     "type": "array",
     "items": {
     "type": "object",
     "properties": {
     "AccountEnabled": {
     "type": "boolean"
     },
     "BusinessPhones": {
     "type": "array"
     },
     "Department": {},
     "DisplayName": {
     "type": "string"
     },
     "GivenName": {
     "type": "string"
     },
     "Id": {
     "type": "string"
     },
     "Mail": {
     "type": "string"
     },
     "MailNickname": {
     "type": "string"
     },
     "Surname": {
     "type": "string"
     },
     "TelephoneNumber": {},
     "UserPrincipalName": {
     "type": "string"
     },
     "mobilePhone": {},
     "JobTitle": {
     "type": "string"
     }
     }
     }
    }




  • Mirtemir Profile Picture
    242 on at

    Hi @v-yujincui-msft , i was a bit too early. The flow works because it creates a contact in Outlook from the Collectiondata. However, the Automateflow is created by user "Appmaker" and the PowerApp is used by everyone in the organization. Whenever someone saves the contact, the contact is saved in the contactfolder of "Appmaker" instead of the user that wants to save it. How can i change that?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard