cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper IV
Helper IV

get file content using file system failed

Hi

I have esatblished connection to my file server

I am using a File system trigger when a file is created.

in second step i try to use get file content and i point out List of file names from trigger action

When flow hits trigger action completes succesfulty but get file content fails with error message:

here is no file with name 'aaa.xlsx' located in '' on your file system. Verify the file exists or create it before trying to access it.
clientRequestId: 66e5741f-15a7-4958-821e-d9dd2f64c2fb.

 

Very strange because it find file name but says it does not find.

 

My goal when files will be created in that folder flow takes the files then substracts first 3 letters from the file name in this case aaa and then i will send these files as attachment to users aaa@companyname.com for each user individualy

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: get file content using file system failed

@jja 

Something like so... obviously you'll be using different actions to get the file metadata and content (File system actions) but the principles are the same.

1.png

 

HTH

Jay

-------------------------------------------------------------------------

If I have answered your question, please mark your post as Solved.

If you like my response, please give it a Thumbs Up

View solution in original post

6 REPLIES 6
Highlighted
Super User
Super User

Re: get file content using file system failed

Hi @jja 

Could you please share your Flow to enable us to review please?

I'd expect your Flow needs to do the following:

1. Fire when a new file is added

2. Retrieve the 'document content' using the identifiers from the trigger action

3. Retrieve the 'document metadata' using the identifiers from the trigger action

4. Send the email

4.a.  Attachment name: Use an expression to pass in the 'filename' obtained from step 3 and rename as required.

4.a.  Attachment content: Pass the file content obtained from step 2

HTH

Jay

-------------------------------------------------------------------------

If I have answered your question, please mark your post as Solved.

If you like my response, please give it a Thumbs Up

 

Highlighted
Helper IV
Helper IV

Re: get file content using file system failed

Hi @Jay-Encodian 

I have already achieved by getting metadata and content using identifiers.

 

Now i am stuck how to make correct file send to correct recipient

lets say i have file aaa.xlsx and bbb.xlsx of cource later it will be like 50 files with this unique letters that represent users email.

 

How do i send file aaa.xlsx to aaa@company.com and bbb.xlsx to bbb@company.com

Highlighted
Super User
Super User

Re: get file content using file system failed

Hey @jja 

Here you go:

Expression: concat(split(variables('Filename'),'.')[0],variables('DomainName'))

Obviously you'll need to change the variables you pass in as needed

1.png

 

3.png

 

HTH

Jay

-------------------------------------------------------------------------

If I have answered your question, please mark your post as Solved.

If you like my response, please give it a Thumbs Up

Highlighted
Helper IV
Helper IV

Re: get file content using file system failed

Hi @Jay-Encodian 

 

Thanks and what about send email action.

how this step should look like?

Highlighted
Super User
Super User

Re: get file content using file system failed

@jja 

Something like so... obviously you'll be using different actions to get the file metadata and content (File system actions) but the principles are the same.

1.png

 

HTH

Jay

-------------------------------------------------------------------------

If I have answered your question, please mark your post as Solved.

If you like my response, please give it a Thumbs Up

View solution in original post

Highlighted
Helper IV
Helper IV

Re: get file content using file system failed

Hi @Jay-Encodian 

Thankns it works. First i was confused that it reads only one file but i see it runs a separate flow for each file created

Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Users online (11,205)