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

Flows don't load user profile when sending mail

I tried to create a Flow which would send an e-mail to the assignee when a task is created on a task list.

 

However no matter ho I approach the problem fields from dynamic contents like "Assigned to - email" or any other like that return a null value... So if I put "Assigned to - email" in the SendMail step as a field "To:" the mail will not be sent because To: field is empty in result.

 

Also: should  the "Get User Profile" step return the whole array of users from my organisation, even though I provide it a single (valid) email address?

 

Also: the step "When a new item is created" returns all the fields from a target task list EXCEPT Assigned to... maybe that is why it will not work? Because the default "Assigned to" field is bugged (not to say the f-word)?!

6 REPLIES 6
Community Support Team
Community Support Team

Re: Flows don't load user profile when sending mail

Hi G_wilczek,

 

I guess you want to create a flow to send an email when an item is created in SharePoint default Task list. And you want to use Assign to field. So I create a similar flow, but I get the same result with you. It seems that there is no Assign to field can be selected.

 

If I understand you correctly, there is a similar issue on another thread. In the similar thread, we know that "Assigned to" does not show up because it is a column type of "People". Currently people/lookup/choice columns are not supported so they will not show up.

 

The thread link for a reference:
https://powerusers.microsoft.com/t5/Flow-Forum/SharePoint-Tasks/m-p/13035/highlight/true#M3107

 

Best regards,
Mabel Mao

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

Re: Flows don't load user profile when sending mail

Hello,

 

 

Yes, your clarifications are correct, however it is not true that people/group columns are not available, as I have also added two custom columns of type Group/People and they were available to use later on in a flow.

 

So I've found a workaround - I used Sharepoint Designer to remove the default "Assigned to" column (I think it's impossible via on-line editing), and instead I am using a custom created column (I also called it "Assigned to" and it works like a charm).

 

I am now off to trying to figure out why the active content fields enabled thanks to "Get user profile" return a syntax error:

'The template language expression 'body('Get_user_profile')?['DisplayName']' cannot be evaluated because property 'DisplayName' cannot be selected. Array elements can only be selected using an integer index. Please see https://aka.ms/logicexpression
Community Support Team
Community Support Team

Re: Flows don't load user profile when sending mail

Hi G_wilczek,

 

About “Get user profile”, I tested this action with two different flows.

 

Flow1 is triggered by “When an item is created” in SharePoint Default Task list. However, when the flow run, I get the same result with you. Below are screenshots of flow configuration and the error message:

profile 1.PNG

profile 2.PNG

 

Flow2 is triggered by “when an item is created” in SharePoint custom list, this flow works properly when an item is created in the list, below is a screenshot of the flow configuration:

profile 3.PNG

profile 4.PNG

 

It seems that we cannot get Email by using the trigger “when an item is created” in SharePoint Task list. I will report this from my side, and try to involve others to look into this issue. I will back if I got any useful information.

Best regards,
Mabel Mao

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

Re: Flows don't load user profile when sending mail

Hi G_wilczek,

 

I have some updates for you. From the run history, we know that value returned for the “Assigned To” field is null. So, when you try to get a single user’s profile, it instead fetches all users profiles and you get the “Invalid Template” error.

 

I guess that the “Assigned To” field is threated in a special way and even if you delete the default “Assigned To” column and add a custom one, it treats it the same way. So I tried to add an extra column called “CustomAssignTo” and was able to get back the value.

Assignto1.PNG

assignto 2.PNG

assignto3.PNG

 

Please try to create a new custom column likes me to see if it works for you.

 

About the feature to support “Assigned to” field, please submit an idea at Flow Ideas Forum at here:
https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas


Best regards,
Mabel Mao

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

Re: Flows don't load user profile when sending mail

Hi,

 

Thanks for your input. Adding a custom column is only a partial solution though - the default Assigned To is also the column defining the ownership of a task and is used by default task list options (e.g. a default notification for a task owner, access rights / priviledges etc.). I will post this to the forum you've mentioned.

 

Thanks for your help.

Community Support Team
Community Support Team

Re: Flows don't load user profile when sending mail

Hi G_wilczek,

 

Thanks for your understanding. I have already reported the feature to support to “Assign to” field of “Task list” from my side. Other partners who have the same requests would also vote your idea.

 

If you have any other questions when using Microsoft flow, please feel free submit your issues here, we are ready to help.

 

Best regards,
Mabel Mao

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

Helpful resources

Announcements
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!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Kudoed Authors (Last 30 Days)
Users online (4,620)