cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Juliet
Frequent Visitor

Send email once X number of files are uploaded to a folder

I have a workflow that requires me to send 20 files to my client each month. Throughout the month users will be uploading files to the appropriate folders. What I would like to do is have my flow count the number of files in the folder and once it reaches 20 send me an email so I know it's ready to go to the client.

 

I'm very new to flows and I don't really even know how to start this off. Any assistnace would be appreciated.

3 REPLIES 3
RezaDorrani
Dual Super User II
Dual Super User II

Hi @Juliet 

 

Use the list folder action in MS Flow to get all items within the list

 

then use the length expression to check the count

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Thanks, I've created the flow, however, when I test I'm getting an error:

InvalidTemplate. Unable to process template language expressions in action 'List_folder' inputs at line '1' and column '2646': 'The template language function 'length' expects its parameter to be an array or a string. The provided value is of type 'Integer'. Please see https://aka.ms/logicexpressions#length for usage details.'.

 

Here's what I've done so far... the length expression is set to length(20)

Capture.PNG

yashag2255
Dual Super User II
Dual Super User II

Hi @Juliet 

 

You can use the List folder action to list all the files present in a particular folder. You then need to count the list and then perform the further actions. Please see the flow below: ddf.PNG

 

You need to have the folder addresses same as highlighted on the screenshot above.

 

Expression: 

length(body('List_folder'))

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (30,222)