cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
welshiv
Level: Powered On

Get my Profile vs Get User Profile

So I thought I had a fully working series of workflows - they finally tested great...most of the time. Then when I tried real world, I realized Get My Profile meant the owner of the flow not the person triggering. So...I found the option of Get User Profile - however when I choose that, I don't get the option in Dynamic Content to pick any kind of user fields for the UPN field - only gives me some field ones. 

 

I thought what I was trying to do was simple, and had it working. Basically this is what I'm trying to get accomplished and now I'm under the gun, so I would really appreciate some expertise.

 

1. User uploads a file into Sharepoint Document Library (Submissions).

2. Submitting user receives email confirming their file was uploaded.

3. Approver receives email stating a file, filename.docx has been uploaded and requires their review.

4. Approver clicks link in email and takes appropriate action, Approve or Deny.

5. If Deny, submitter receives email stating submission was denied and description as to why.

6. If Approve, the file is copied over to One Drive and converted to pdf and deposited into Approvals folder in Sharepoint. (this part I have down I think)

7. Once converted to pdf, the approver and the submitter both receive notifications that the file has been approved, converted to pdf and available to download from Approvals folder.

 

I had this all working with 3 workflows, but the notifications are what's tripping me up. Every example I see where I try to edit it, the action steps provide different dynamic content options for me than what pictured. Can attach screenshots of the flows I have if that would help, but think this is one fo those times I just need to start from scratch with some expert help. Thanks in advance for your help.

16 REPLIES 16
Dual Super User
Dual Super User

Re: Get my Profile vs Get User Profile

What you need is the UPN (email address) of the user who's profile you want to retrieve.  Depending on the trigger you are using you could get that from the metadata of the trigger. For example, the modified By property can get you the email of the user.  Sometimes these complex values don't show up in dynamic data because they are objects and its looking for a string. The way to work around that is to create a variable and store the email just after the trigger fires.  Then use the variable to get the profile.  Post some screenshots or ask additional questions if you need more help.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
welshiv
Level: Powered On

Re: Get my Profile vs Get User Profile

Ok - I'm attaching screen grabs of all 3 workflows - first, this is the first one - the submission and approval process.Screen Shot 2019-12-17 at 3.12.43 PM.pngScreen Shot 2019-12-17 at 3.13.27 PM.pngScreen Shot 2019-12-17 at 3.14.39 PM.png

welshiv
Level: Powered On

Re: Get my Profile vs Get User Profile

Second - the pdf process

 

Screen Shot 2019-12-17 at 3.10.19 PM.pngScreen Shot 2019-12-17 at 3.11.06 PM.png

welshiv
Level: Powered On

Re: Get my Profile vs Get User Profile

And last - the notification at end.

Screen Shot 2019-12-17 at 3.07.47 PM.png

welshiv
Level: Powered On

Re: Get my Profile vs Get User Profile

Thanks for the reply Pstork1

However, I have no idea how to "create a variable and store the email just after the trigger fires.  Then use the variable to get the profile."

welshiv
Level: Powered On

Re: Get my Profile vs Get User Profile

Even the templates - such as :

 

https://us.flow.microsoft.com/en-us/galleries/public/templates/d62b2527bb5343d689d5107b0922e57b/star...

 

Use the Get my Profile, which is why I am confused

Community Support Team
Community Support Team

Re: Get my Profile vs Get User Profile

 

Hi @welshiv ,

 

As you described, Get my profile action is to get the user info of the Flow Owner, or the user corresponding to the connection selected by this action.

 

The Get user profile action is used to obtain the info of any user in the tenant, as long as the UPN is provided.

 

If you want to get the info of the user who triggered the Flow, then you should use the Get user profile action.

 

Like this:

190.PNG191.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Dual Super User
Dual Super User

Re: Get my Profile vs Get User Profile

You can use an Initialize Variable action to create a string variable and store the email for use later in the workflow.  It looks to me like the email you want is for the person who originally uploaded the file.  But I'm not sure why you want the profile for that person.  Their email address and display name are available as properties of the Created By field.  



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Dual Super User
Dual Super User

Re: Get my Profile vs Get User Profile

Templates are examples that cover one situation.  That template is not a perfect match for what you are trying to do.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
welshiv
Level: Powered On

Re: Get my Profile vs Get User Profile

Thanks @v-bacao-msft - what would then be the next step in the flow after the Get User Profile and pulling the Created by Email?

welshiv
Level: Powered On

Re: Get my Profile vs Get User Profile

@v-bacao-msft 

 

Ok - I went with Send an email as the next step

 

Screen Shot 2019-12-18 at 10.18.33 AM.png

and the email notification works, it send the email for approval. However, if you notice I no longer have the Start an Approval action - I instead had a Start and wait for an approval, so I chose that one. And then when I go to add the Condition - I no longer have Response - i now have Responses. When I run the test, it works, however, it's meeting the Approve condition as False, so it stops there, even though I do approve the file. Please see below:

Screen Shot 2019-12-18 at 10.24.52 AM.png

Dual Super User
Dual Super User

Re: Get my Profile vs Get User Profile

You want Outcome, not Response.  REsponse was used in the original version of the Approval Action. But that has been discontinued.  The current version uses Outcome.  Repsonses is a collection that contains all the responses, comments, approver names, etc.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
welshiv
Level: Powered On

Re: Get my Profile vs Get User Profile

Thanks!! @Pstork1 that worked for the first flow - thank you. However, now the Convert to PDF flow does not work- I simply did a Save As, new name and changed the folders in the flow - when I run the old one, works no problem - the copy creates the file on the One Drive but fails on the actual conversion - gives a BadGateway error. The only difference between the two is where the files are - 2 different folders, same root.

Screen Shot 2019-12-18 at 1.30.14 PM.png

Dual Super User
Dual Super User

Re: Get my Profile vs Get User Profile

If you did a save as you may have to re-edit your dynamic data.  It looks from your screenshot like something is wrong with the dynamic data being input as the filename when doing the file conversion.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Community Support Team
Community Support Team

Re: Get my Profile vs Get User Profile

 

Hi @welshiv ,

 

Please try this configuration:

210.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
welshiv
Level: Powered On

Re: Get my Profile vs Get User Profile

First - thanks for the help!

 

However, the convert to pdf portion of this is so random - sometimes it works, most times it doesn't - no changes to flow, just seems completely arbitrary. I can't figure this out!

 

I'm getting Bad gateway everytime I test

 

Screen Shot 2020-01-07 at 6.04.36 PM.png

Helpful resources

Announcements
firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (5,213)