Official Site

Konstantinos Boutsioulis

Microsoft Most Valuable Professional M365 Apps & Services

Microsoft Most Valuable Professional Business Applications

Consultant & Sr Cloud Solution Architect Modern Wokrplace

Free Material

Find hereMore than 150 Articles about Microsoft Technologies on Modern Workplace

Count Items in SharePoint List and send email Using Power Automate

28 June 2024

In today's article, we will see how we can count items in SharePoint List and then send an email to someone to inform about the total items number using Power Automate.

First, we need an active M365 subscription. We need to log in to the service and then select Power Automate from the available apps. On the Power Automate homepage, we select instant cloud flow.

In the next step, we need to name our automate, select manually trigger flow as the trigger action, and select create.

As you can see, we have 4 actions in our automate. First, we have the manually trigger flow where we need to specify the condition for triggering our flow.

In the next action, which is of type get items, we select the list we want to count the items for, and to do this, we select the site hosting the list under the site address as well as the list we want in the list name.

In the next step, we will use an action of type compose to create the variable that will count the number of entries in the list, and this is done by entering length(outputs('Get_items')?['body/value']).

The last action is of type send an email v2 where we need to enter the recipient as well as a subject for our mail. In the body of the message, we will have a combination of our own input as well as the output of the compose we have above, which is our counter.

In the next step, we save our automate and select manually trigger flow for testing.

We select run flow to execute our automate.

The automate executes successfully.

Finally, as you can see, it has sent an email and did not detect any entries in the automate, so it set the counter to 0.

Indeed, if we check our list, we will see that there are no entries.

#ModerWork #M365_Apps_Services #BusinessApps #SharePoint #PowerAutomate #technology #microsoft #digitaltransformation #cloud #mvpbuzz #m365