Im having a bit of trouble understanding how i can do this.
I want to create a SharePoint list based on a xml file. I want to parse the XML or have it in a variable in flow so i can edit the title and so on using dynamic content. I can apply it as a template using a runbook but i want to be able input the new title of the list as i will use it as a template to create multiple lists with different names.
Im not sure how i can have a runbook that gets the raw xml input and then creates a list from it. If it's possible to do using Graph or any other solution please let me know
Can you share an example of your XML content?
IN this post, you will find an explanation on how to iterate through certain nodes from an XML. I assume you need to identify the node you want to convert into SP items, iterate throught them with an Apply to Each, inside the Apply to each invoke SP "Create item" action block
Hope this helps
@efialttes Thank you for answering, i created a xml file from a list only.
Step 1: Get-PnPProvisioningTemplate -Handlers Lists -ListsToExtract 'ExtInvite' -Out C:\pnp\list.xml
Step 2: Add-PnPDataRowsToProvisioningTemplate -path 'C:\pnp\list.xml' -List 'ExtInvite' -Query '<view>>/view>'
I can then create a list by doing Apply-PnPProvisioningTemplate -Path C:\pnp\list.xml and it will only create a list, nothing else is applied.
I dont want to create an item in a list i want ot create a list based on a template. The template i have in a xml file format. But i want to be able to manipulate the xml file in flow with dynamic content for example adding a new title of the list and so on.
This basically show what i want to do but without using their flow parts.
I have tried this but i get errors.
$template = Read-PnPProvisioningTemplate -Xml $yourtemplatestring
Apply-PnPProvisioningTemplate -InputInstance $template
Errors i get.
Apply-PnPProvisioningTemplate : Cannot bind parameter 'InputInstance'. Cannot convert value "OfficeDevPnP.Core.Framework.Provisioning.Model.ProvisioningTemplate" to type "OfficeDevPnP.Core.Framework.Provisioning.Model.ProvisioningTemplate". Error: "Cannot convert the "OfficeDevPnP.Core.Framework.Provisioning.Model.ProvisioningTemplate" value of type "Deserialized.OfficeDevPnP.Core.Framework.Provisioning.Model.ProvisioningTemplate" to type "OfficeDevPnP.Core.Framework.Provisioning.Model.ProvisioningTemplate"." At CreateListXMLTemplate:16 char:16 + + CategoryInfo : InvalidArgument: (:) [Apply-PnPProvisioningTemplate], ParameterBindingException + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,SharePointPnP.PowerShell.Commands.Provisioning.Site.ApplyProvisioningTemplate
Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.
Look out for new contribution recognition badges coming SOON!
We've updated and improved the layout and uploading format of the Power Automate Cookbook!
Fill out a quick form to claim your user group badge now!
The top training and networking event across the globe for Microsoft Business Applications