Hello,
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?
Thanks.
Hi @leolsdn
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.
Cheers
Manuel
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.
Hi manuelstgomes,
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:
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
Could you guys give me some help with populating this field ?
Thanks
@CFernandes and @manuelstgomes
@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!
@CFernandes : it's a list with no attachments. not a document library.
Let's not mix things.
Any other idea ?
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>
@leolsdn Very strange. Can you open a ticket with Office 365 SharePoint Team and show them the problem.
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 ?
Thanks.
OK, so researched a bit more:
If in the request body you use: 'Site_x0020_OwnerId':6,
example:
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....
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
19 | |
15 | |
10 | |
10 | |
9 |