Hi, I am trying to get the content of the file in the previous step but no matter which approach I take the flow errors at this point. What is the correct way to read in the file content from the previous step without statically using a filename. This flow operates on a number of file names so I need it to remain dynamic.
Solved! Go to Solution.
As I understand by your screenshot, you are creating files in SharePoint based on email attachments. So you could get the file content from the attachments, and not from the SharePoint item. Apart from that, you're copying a file from one SharePoint site to another, but this could be done by creating the same file in two different sites. Am I right?
You can use the "Id" output of the Create file action in the "Get File Content".
Please make sure you select the same site address in the Get File Content action that you have used in the Create file.
I did a test and it worked for me.
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!
Could you explain in more detail which is the idea of the flow? I mean, you receive some txt files in an email, and want to save them in a SharePoint library with 2 different extensions (txt and csv)? Am I right?
Lots of great suggestions and questions so let me go a bit further on this.
That's correct. The saving of the txt attachment is fine. I am trying to extend that process now to rename the file. The rename option is limited to a boolean which is correctly set but it won't take file extension parameters. What I have determined is that I need to continue to save the attachment as .txt then read in the file content to copy out to a new file name with the .csv extension. The flow fires on multiple emails, with differently named attachments. Therefore the flow needs to be able to use the ID of from the previous step.
When using the Id the error is:
The destination path cannot be the same as the source object itself.
When using the Path it errors saying path not found even though the debug output is pointing to it.
Hi @AK-47 ,
I believe you're trying to use variables and use them in the subsequent steps.
Thanks for everyone's help. I worked it out. I was overcomplicating it. Marking @v-litu-msft answer as correct since it was the correct part that was missing/wrong once I removed the junk out it.
Check out how to claim yours today!
Check out new user group experience and if you are a leader please create your group
Test your skills now with the Cloud Skill Challenge.