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
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

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

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (69,065)