I created new Flow for the Sharepoint site, which should send an email when new post is Published.
But it doesn't send an email if the post is in the Draft state already. As I understand my Flow already triggered, when the new post swtched to the Draft state and after that when I press publish button it doesn't trigger.
It does work when a post still isn't in the Draft state.
Could you plese tell me how can I fix it?
The only real difference between a draft and published is that the published version is a major version and the minor version is draft. Taht means the when a file is created won't fire when the page is published. YOu'll need to change your flow to fire when the files is created or modified and then check to see if the version is a major version or not.
The problem is I don't know any way to retrieve the current version number of the document. So I don't know how you determine whether this is a major published version or not.
Here are two workarounds that should work.
I suspect #2 is the better choice but it means creating and running the Flow with a different user context that has lessor permissions to the site. Not sure if that's convenient. #1 will also work but it requires changing the trigger and will lead to more Flow runs.
Thank you for your answer. I've tried to get the file's version from HTTP request but it wasn't successful.
Could you please tell me what is wrong in this request:
Take a look at John Liu's blog post on getting the version number.
I played around with it a little since John's post is for List items. Here's the right REST call
Two changes from yours.
I'm very sorry for the delay.
I've got another important task and have to complete it.
After that I'll try to do that You adviced me.
Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.
Check out the new Power Platform Community Connections gallery!
Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.