cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
leolsdn
Helper I
Helper I

Publishing SharePoint pages via PowerAutomate

Hello guys,

 

I'm trying to publish a number of SharePoint pages using PowerAutomate.

The pages are located under the "Site Pages" library in SharePoint.

So here is the flow I made so far:

 

Flow1.png

Flow2.png

 

My flow fails on the get item part:

 

err1.png

ERR2.png

 

I only need to get the value of the ID field, so I can use it in the following call:

 

_api/sitepages/pages('ID')/publish

 

This call should be made against all the IDs present in the Site Pages library.

 

Could you give me any ideas on how to achieve this?

 

Thanks. 

 

1 ACCEPTED SOLUTION

Accepted Solutions
rsaikrishna
Dual Super User
Dual Super User

@leolsdn 

 

In the Get Item action under Apply to each loop, for ID column you should place following expression:

items('Apply_to_each')?['ID']

 

Current Item - Gets all the attributes of the item. You need only ID value. 

 

Give a try and update here if you need further help.

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

View solution in original post

2 REPLIES 2
rsaikrishna
Dual Super User
Dual Super User

@leolsdn 

 

In the Get Item action under Apply to each loop, for ID column you should place following expression:

items('Apply_to_each')?['ID']

 

Current Item - Gets all the attributes of the item. You need only ID value. 

 

Give a try and update here if you need further help.

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

View solution in original post

thanks @rsaikrishna .

That worked!!!

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (62,533)