I have a power automate flow which creates a SharePoint subsite. Now once a subsite is created, I want to delete the "News" webpart that is on the SharePoint subsite.
I know to delete a web part we can use send http request to SharePoint site, I was able to delete a webpart using below URI. But this is specific to that particular webpart.
How can I dynamically use below expression so that every time a subsite gets created, it will delete a "News" webpart from the subsite.
Below is the URI I used to delete webpart.
_api/web/getfilebyserverrelativeurl('@{body('Parse_JSON')?['d']?['ServerRelativeUrl']}/SitePages/home.aspx')/webparts(guid'uaf1bc94-d17d-45d0-92ec-bb8e7a772j91')
I have hardcoded value of webpart GUID uaf1bc94-d17d-45d0-92ec-bb8e7a772j91.
Is it possible to use this value dynamically?