I have successfully created a flow that works basically like the following.
- When an item is created (in a SharePoint list)
- Get User Profile
- Update Item (in the same SharePoint List)
- Get Manager
- Send an Email
- Post Message (to Yammer)
I am working on a second flow that will follow a similar pattern but in the second flow the Update Item step is failing with this error:
Unable to process template language expressions in action 'Update_item' inputs at line '1' and column '2116': 'The template language expression 'body('Get_user_profile')?['OfficeLocation']' cannot be evaluated because property 'OfficeLocation' cannot be selected. Array elements can only be selected using an integer index. Please see https://aka.ms/logicexpressions for usage details.'.
What I am trying to do is update a column on the SharePoint list that is a single line of text called Location. I want to pull the Office Location from the User Profile then inset this data into the locations column for the new item that was just created. Would anyone know why this "update list" step would work with one flow but not with another? Both lists are on the same Office 365 site. From what I can tell both flows are set up exactly the same way. Why would one flow succeed only to have a second flow fail at this step?