cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Alex2
Regular Visitor

moved file trigger

Hey Guys!

 

I have a problem with a flow we created.

The idea is the following: Every time we move a file (in our case its invoices as .pdf) to a specific folder (lets say "Incoming Invoices"), this file shall be sent via e-mail to an email-address (it's the upload email address for our accounting software),.

 

The flow looks like this:

Alex2_0-1620754829846.png

 

The problem is: Not all moved-in files in the folder are detected by the trigger. And it seems to be completely random. Sometimes it detected all files, even if I'm moving 10 invoices at once into the folder, sometimes its doesn't detect it at all. I've checked the history, and it checks the folder every 5 mins and just simply oversees the new files in the folder. There is no error, therefore i can only guess what's the problem is.
It's not the file size, it's not the file name, it's not who moved the filed. I have absolutely no idea.

 

Maybe someone had the same problem or has a more reliable solution for my problem.

 

FYI: I'm managing the incoming invoices for several entities in our company. And in order to easy upload them to our accounting software, i've created a folder for every entity (12 folders) and set up the, from the accounting software, provided upload email address for every entity so its uploaded correctly to our accounting software.

1 ACCEPTED SOLUTION

Accepted Solutions

@Alex2  you can configure the flow as shown in below screenshot:

 

1. Add Recurrence trigger, schedule it to run hourly or daily. Then add Get Files action and configure site, library name and filter query to get only those items which are not sent to accounting, here you will need to provide column name and whatever value you are setting in the column. Here my column name is SentToAccounting and i am setting value to Yes once file is sent to accounting, so i am getting files which dont value value Yes.

 

annajhaveri_0-1620828414662.png

 

2. Then add apply to each action to loop through value (list of items) from Get Files. Inside apply to get use Get File Content to get the file, and then add Send email to send the file as attachment to accounting, in the attachment parameters of Send Email, use file content from Get File Content action and use file name from Get Files action

annajhaveri_1-1620828548083.png

 

3. Then add "Update file properties" action to update the value of column SentToAccounting to Yes

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

View solution in original post

6 REPLIES 6
annajhaveri
Super User
Super User

@Alex2  Looks like you are facing the similar limitation as described here https://docs.microsoft.com/en-us/sharepoint/dev/business-apps/power-automate/sharepoint-connector-ac...

 

As alternate solution, you can create a flow with recurrence trigger, which gets the files which are not sent to accounting system. You can do that by adding separate column to library, which will set to value Yes after it is sent to accounting email in the flow. 

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.
Alex2
Regular Visitor

Hey @annajhaveri,

Thanks for your response!
I'm testing right now, but I think it might have something to do with the mentioned limitation for moving files.

Can you maybe provide a link to a guide on how to set up a recurrence trigger?
Nonetheless, big thank you!

@Alex2  you can configure the flow as shown in below screenshot:

 

1. Add Recurrence trigger, schedule it to run hourly or daily. Then add Get Files action and configure site, library name and filter query to get only those items which are not sent to accounting, here you will need to provide column name and whatever value you are setting in the column. Here my column name is SentToAccounting and i am setting value to Yes once file is sent to accounting, so i am getting files which dont value value Yes.

 

annajhaveri_0-1620828414662.png

 

2. Then add apply to each action to loop through value (list of items) from Get Files. Inside apply to get use Get File Content to get the file, and then add Send email to send the file as attachment to accounting, in the attachment parameters of Send Email, use file content from Get File Content action and use file name from Get Files action

annajhaveri_1-1620828548083.png

 

3. Then add "Update file properties" action to update the value of column SentToAccounting to Yes

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

View solution in original post

Alex2
Regular Visitor

Hey @annajhaveri 

 

I've tried your guide on Wednesday and I got actually to the point, where emails were sent. Unfortunately, it sent all files, not only the ones labels without "yes".
I tried to finish the flow today, but now it's not even detecting the files. 

 

Alex2_0-1621442111855.png

 

The flow itself is set up properly (ive skipped the filtering for now):

Alex2_1-1621442183619.png

 

I've read in the forum that it might be a permission issue, but I haven't changed anything on my permissions since Wednesday.
Maybe you know what to check, otherwise I'm going to check everything now.
Thanks in advance!  

@Alex2  from your screenshot it looks like Get Files, isnt getting any files from the library, can you please double check the site, document library and folder configured in Get Files is correct? 

If it had been permissions issue, then you would get error in flow run, but i see the flow has successfully run.

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.
Alex2
Regular Visitor

Hey @annajhaveri 

 

I've never found out what the actual problem was. I still think the connection somehow didn't work.

 

But, after I changed "Included Nested Items" in the Get Files (properties only)-action to "No", it somehow worked. 

 

Thats what it looks now:

 

Alex2_0-1621936894784.png

 

Now every time I move a file, it gets send via mail to our accounting software with no files missing or send double.

I've reached my goal thanks to you!

Best,
Alex

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,664)