Can't access a page PromotedState via powerautomate

%3CLINGO-SUB%20id%3D%22lingo-sub-3103298%22%20slang%3D%22en-US%22%3ECan't%20access%20a%20page%20PromotedState%20via%20powerautomate%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3103298%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20everyone!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20created%20a%20flow%20to%20manage%20the%20approval%20of%20pages.%3C%2FP%3E%3CP%3EI%20want%20it%20to%20auto-approve%20when%20it%20is%20a%20news%20page(PromotedState%3D2)%3C%2FP%3E%3CP%3E%3CSTRONG%3EBut%20I%20just%20cant%20figure%20out%20how%20I%20can%20access%20this%20field%20in%20a%20flow.%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20read%20this%20-%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcollab365.com%2Fusing-flow-sharepoint-news-notifications%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fcollab365.com%2Fusing-flow-sharepoint-news-notifications%2F%3C%2FA%3E%3C%2FP%3E%3CP%3EBut%20in%20my%20flow%20there%20is%20no%20PromotedState%20available....%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3103298%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPower%20Automate%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPower%20Automate%20Approvals%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPromoted%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3104475%22%20slang%3D%22en-US%22%3ERe%3A%20Can't%20access%20a%20page%20PromotedState%20via%20powerautomate%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3104475%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1276163%22%20target%3D%22_blank%22%3E%40Alon24%3C%2FA%3E%26nbsp%3Bfirst%20get%20your%20pages%20-%20we%20use%20the%20Get%20items%20list%20action%20and%20set%20the%20list%20to%20the%20cusatom%20value%20of%20Site%20Pages.%20If%20you%20are%20looking%20for%20a%20specific%20Promoted%20State%20then%20add%20it%20into%20the%20filter%20query%20as%20Promoted%20State%20eq%200%20(published%20normal%20page)%2C%201%20(draft)%20or%202%20(published%20news%20page).%20You%20can%20of%20course%20filter%20it%20down%20further%20to%20get%20just%20a%20single%20page.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou'll%20then%20get%20the%20apply%20to%20each.%26nbsp%3B%20Add%20a%20Compose%20action%20and%20from%20the%20dynamic%20content%20box%20you'll%20see%20that%20Promoted%20State%20is%20now%20available%20and%20the%20outputs%20of%20the%20Compose%20action%2C%20i.e.%20the%20Promoted%20State%20value%20can%20be%20used%20in%20follow-on%20actions.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20my%20example%20we%20use%20this%20to%20review%20intranet%20pages%20and%20for%20that%20we%20don't%20want%20the%20published%20news%20pages%2C%20so%20the%20filter%20query%20is%20set%20to%200.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%221-Flow.png%22%20style%3D%22width%3A%20783px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F344543iF84B58FF1D77E8B5%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%221-Flow.png%22%20alt%3D%221-Flow.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%222-Flow.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F344544i330E8F78BCA5727C%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%222-Flow.png%22%20alt%3D%222-Flow.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERob%3CBR%20%2F%3ELos%20Gallardos%3CBR%20%2F%3E%3CFONT%20size%3D%222%22%20color%3D%22%23006400%22%3EMicrosoft%20Power%20Automate%20Community%20Super%20User%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi everyone!

 

I've created a flow to manage the approval of pages.

I want it to auto-approve when it is a news page(PromotedState=2)

But I just cant figure out how I can access this field in a flow.

 

I've read this - https://collab365.com/using-flow-sharepoint-news-notifications/

But in my flow there is no PromotedState available....

 

Thanks :)

 

 

1 Reply

@Alon24 first get your pages - we use the Get items list action and set the list name to the custom value of Site Pages. If you are looking for a specific Promoted State then add it into the filter query as PromotedState eq 0 (published normal page), 1 (draft) or 2 (published news page). You can of course filter it down further to get just a single page.

 

You'll then get the apply to each.  Add a Compose action and from the dynamic content box you'll see that Promoted State is now available and the outputs of the Compose action, i.e. the Promoted State value can be used in follow-on actions.

 

In my example we use this to review intranet pages and for that we don't want the published news pages, so the filter query is set to 0.

 

1-Flow.png

 

2-Flow.png

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User