Hello,
I have a Powerapps where people add their expenses of the month. When the user submit this, it triggers a flow that will send and email asking the approval from his/her superior.
There are 2 major expenses that the user will submit. Because of the difference of the content, i have 2 list in sharepoint that are update. Each type of expense, in the app, are in different pages, and different collections too.
After submiting their expenses and before sending an email to the superior. For each temporary collection created from the use information i have a flow that creates a CSV file, so i always have 2 CSV files for each user (but the names of each file is the same, independently of the user)
Until this part im ok.
But now is where is tricky for me.
In the approval email i want to send this 2 CSV files attached... im looking and i don't find anywhere how can i send an email from powerapps.
This is what i got:
What do i put on the field "attachment name" and "attachements Content"?
Can anyone help me? Thank you
Solved! Go to Solution.
Hi @VGoncalves ,
Try to use 'Find files in folder' action to search a find by its FileName, and then in the File field of 'Get File Content' action, use the following expression to get the file identifier.
body('Find_files_in_folder')?[0]['Id']
Hope this helps.
Sik
Hi @VGoncalves ,
Where are CSV files stored?
If they are stored in SharePoint or OneDrive storage, just use appropriate Actions to get the file contents.
For instance, if the file is stored in SharePoint Library, the flow steps are as follows.
First, use 'Get file properties' step in order to get the file identifier and File name, notice that Id should be passed from PowerApps in your case.
Second, 'Get file content' based on file identifier.
Third, Put 'File Name with Extension' and File Content into the Attachment field.
get file content from SharePoint Library
If you have to attach multiple files, find more information from here.
Hope this helps.
Sik
My file is storage on OneDrive.
I see on the actions of OneDrive the "Get file Content", but dont have the "Get file properties", what would be the actions on One Drive?
On the OneDrive i was seeing the action Create a share link, and put the link on the email as a workaround 😅.
But would prefer put it fisically on the email.
Thank you for the help 🙂
Hi @VGoncalves ,
Try to use 'Find files in folder' action to search a find by its FileName, and then in the File field of 'Get File Content' action, use the following expression to get the file identifier.
body('Find_files_in_folder')?[0]['Id']
Hope this helps.
Sik
Check out new user group experience and if you are a leader please create your group
See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
49 | |
42 | |
42 | |
41 | |
38 |
User | Count |
---|---|
81 | |
79 | |
69 | |
50 | |
50 |