Forum Discussion
Sending an email via Power Automate when a news post is created
Dickie1305 what trigger are you using? If it's the when a file is created or modified (properties only) then it will trigger whatever the Promoted State of the news post is. For your info there are 3 possible promoted state values: 0 for a site page, 1 for a draft/scheduled news post and 2 for a published news post:
A screenshot of your flow might help us to work out what is causing the behaviour you are experiencing.
Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP UK (and classic 1967 Morris Traveller driver)
Hi Rob_Elliott,
The trigger I'm using is when an item is created or modified (below)
There are also a couple of conditions we've introduced, such as checking if the item is already published:
AND
Checking that page details contains a Front Door ID (from our front door for communications requests) and that Send requestor notification and Send audience notification are set to "Yes" and that the Promoted state is at "2".
It's this promoted state which I think is tripping me up as until the scheduled article is published, it appears as "1" so the flow runs and fails because all the other conditions (front door ID, requestor and audience notifications) are correct, except the promoted state which at the time the flow runs, is set to "1" until the item is published, when it changes to "2". But at that time the flow has already ran and doesn't run again.
Any ideas would be appreciated.
Thanks
- Rob_ElliottNov 13, 2023Bronze Contributor
Dickie1305 there is clearly a bug somewhere when a scheduled news post goes to published. In my tests today it appears that Power Automate is not picking up that the Promoted State or First Published Date have changed and it's not even consistently picking up that the Modified column has changed.
I'll do some more testing and hopefully come up with a solution.
Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP UK (and classic 1967 Morris Traveller driver)- Dickie1305Nov 13, 2023Copper Contributor
- Dickie1305Dec 18, 2023Copper Contributor