I have the following issue when trying to create a list item with PowerAutomate.
Here are the details:
- I have a SharePoint list with a column called "Site Collection URL" (type: single line of text)
From here I initialize a variable named SiteColURL:
Here comes the error part:
In the Create Item action, if I select the Site Address and the List Name, everything works fine:
But when I try to use the site address from the variable, everything crashes.
What can I do to pass the values dynamically?
When you see the "item/...." it means that when you created the Power Automate, you had those columns, and Power Automate mapped them, but at some point, they were removed. But since there are fields present in those columns, Power Automate signals this as "item/...". Can you please check if the schema of that list is updated and map to the current columns?
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
As per my understand( I might be wrong) you cannot pass the SharePoint 'Site Address' in the 'create item' as a dynamic variable(screenshot below).
SharePoint URL is a drop down
You need to create logic in your Power Automate solution perhaps using a 'Switch case' and create the item in correct site-collection.
I hope it helps.
This doesn't help at all.
As I said, when using variables with the site collection and URL nothing works anymore.
Not trying to be impolite, but your post doesn't really help.
Could you please explain exactly what is required?
Here's the whole flow:
If I do a get items with the same variables, all works fine, so your statement makes no logic to me.
@CFernandes : then why does create site works and create list item doesn't?
I agree it's a POST request that doesn't rely much on PowerAutomate....
@leolsdn Just a though
Can you try to 'Create List item' using the SharePoint 'Send an HTTP request to SharePoint' action. Reference - https://www.c-sharpcorner.com/article/sharepoint-rest-api-in-power-automate-ms-flow/
Finally, this is what I did.
Here's the logic:
Now the only thing that I'm stuck on is how to populate a filed of type: "Person or Group".
The column name appears as: _layouts/15/FldEditEx.aspx?List=%7BE67E4271-5C06-466B-B965-0DBA6B316FB7%7D&Field=Site_x0020_Owner so it should be Site_x0020_Owner.
The weird thing is that if I do a REST call from the browser:
I don't get this field, but instead Site_x0020_OwnerId of type Edm.Int32 and Site_xx0020_OwnerStringId
Could you guys give me some help with populating this field ?
@leolsdn I see that you are using the REST API approach as I suggested in my previous update.
What happens when you try to use the SharePoint Action, 'Get File Properties' action, does that return you the column.
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Running out of ideas.
The SharePoint HTTP workaround has helped me get across most of the problems but in your case
"You mentioned - The weird thing is that if I do a REST call from the browser: https://andreir4040.sharepoint.com/sites/NTTDATA1/_api/web/lists/getbytitle('Site%20Index')/Items - I don't get this field, but instead Site_x0020_OwnerId of type Edm.Int32 and Site_xx0020_OwnerStringId"
This is really getting tricky as you cannot find the field. Maybe the column is corrupted in SharePoint? Can you try deleting the column and recreating it.
Deleted the column, recreated it. Same behavior.
You can only find:
d:Site_x0020_OwnerId m:null="true" /><d:Site_x0020_OwnerStringId m:null="true" />
<d:Site_x0020_OwnerId m:null="true" /><d:Site_x0020_OwnerStringId m:null="true" /></m:properties>
You're kidding 🙂
They will just say it's developer support and close the case.
Trust me, it happens.
Support for SPO is the worst possible.
@gamoraes , as you managed to delete the field in this post: https://powerusers.microsoft.com/t5/General-Power-Automate/How-to-clear-SharePoint-quot-Person-or-gr...
Could you help us figure out how to populate the field ?
OK, so researched a bit more:
If in the request body you use: 'Site_x0020_OwnerId':6,
You will basically get the user with ID 6 from the userinfo list of the site (e.g. https://andreir4040.sharepoint.com/sites/NTTDATA2/_catalogs/users/detail.aspx)
Still did not find a way to inject a UPN there....
@manuelstgomes What it the column does exist in the list you have yet it's not visible in the Create Item section in your Power Automate Create Item.
Do you have any ideas how to solve this.
At the beginning the columns was not visible in my SharePoint list, i made it visible but it seems that's not the problem?!!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Join us on June 28 for our monthly User Group leader call!
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!