Hi Everyone!
I have a flow on a SharePoint list with social media content articles list. Some of these articles are published (column Status = Published) others are not (column Status = Planned). All articles have a PublishedOn date field filled.
My flow sends everyday at 15:00 a reminder when an article is on the list to be Published on the next 2 days. Everything works great but I need to make this work only for items that Status field is equal to Planned.
I would appreciate your assistance.
Solved! Go to Solution.
Hi @ThimiosSp,
There is still a small error in your configuration. Like I mentioned in step 2 in my previous response, the email notification has to be outside of the apply to each loop. But make sure it's still within the If No box.
Hi @ThimiosSp,
For the has failed scenario you could use the run after setting
1. Click the ... on the Couldn't send a reminder action and click configure run after
2. Only select the has failed option.
Hi @ThimiosSp,
You have two options. I have created two examples below. Replace the Status column name by your column name.
Option 1. Use a filter query in your Get Items action
Status eq 'Planned'
Option 2. Add a row to your Condition action
Thank you @Expiscornovus
1. For option 1, Status is not available to choose from the Dymanic content. How could it be inserted in the filter query shown below?
2. I do not understand how this row can be added. Can you pls send that in more details?
Thank you!
Hi @ThimiosSp,
If you already have a filter query option 2 is probably easier.
1. Click on the Add button, click add row
2. In the new row that appears select the left column and click add Dynamic content. Select your status field.
3. Select your operator (Is equal to) and type the value in the right column you want to compare it to, in this case Planned
Hey @Expiscornovus ,
I'm probably making your life hard with that, but the only filter I have, does not allow for adding a row.
Hi @ThimiosSp,
Can you switch the condition action to basic mode?
Hi @ThimiosSp,
Sorry, apologies. I now see you are still using the older interface with doesn't have the add rows.
Probably an easier alternative approach is to add a new condition action right before the append to string variable action within the apply to each loop.
Configure that action to use the Status is equal to Planned condition.
Hi @ThimiosSp,
Yes, that was what I was suggesting 🙂
Hi @ThimiosSp,
No worries, we will figure it out together 🙂
Looks like you have two items in your list. The condition we have added will check the condition for every item from the Get items list.
Can you navigate to the second item (via the next button) and see if for that item the expression result is false?
Hi @Expiscornovus,
Both these items satisfy the condition (Status = Planned).
Here is a part of my SharePoint list.
Hi @ThimiosSp,
Thanks for sharing that screenshot. I now see that you are using a column of type choice. With a choice field it works a bit differently. The structure of a Choice field value normally looks a bit like this.
{
"@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
"Id": 0,
"Value": "Planned"
}
So in your example we want to use the value of the Status field in your condition. We can achieve this by using an expression instead of the status field.
items('Apply_to_each')?['Status/value']
Thank you @Expiscornovus,
I've replaced the condition as per your suggestion but I still get the same issue.
Hi @ThimiosSp,
Can you share a screenshot of your current configuration of the Condition 2 action, just to double check?
I also noticed a small typo in one of your earlier screenshots. It says Planner instead of Planned.
Hi @Expiscornovus,
1. What an eye, that was a typo.
2. After fixing the typo, I get 2 email notifications:
- Reminder with all posts regardless Status
- Reminder for 1 Planned post and one Published post (right now there are 2 Planned and on Published posts within the next 2 day period).
I'm attaching the whole thing for you.
Hi @ThimiosSp,
Based on the screenshots of your SharePoint list earlier and the configuration I would expect 2 email notification messages from the send me an email notification action, one for each planned item. That's currently happening, correct?
In regards to the content of the notification messages, can you show us how you configured those and can you also tell us what you are expecting as the end result?
Hi @Expiscornovus ,
Original flow (which is used as a template) sends one notification email including all posts selected. Why would you expect 2 email messages?
Message should be the following, with the right posts filtered ;). Are you covered?
Hi @ThimiosSp,
Thanks for clarifiying. I thought you wanted a reminder for each individual item. But you want a summary e-mail 🙂
I believe when the new condition was added some of the actions got rearranged.
1. Try and move the append to array action within the No section of your Condition 2 action
2. Move the send an email reminder to just below the yes/no. Make sure it's outside of the apply to each, but within the No of your first condition action.
User | Count |
---|---|
88 | |
37 | |
25 | |
13 | |
13 |
User | Count |
---|---|
121 | |
55 | |
36 | |
24 | |
21 |