Hi @Anonymous ,
Do you want to send the uploaded attachment files within your CDS Entity along with an email?
Do you want to use MS Flow to achieve your needs?
If you want to use MS Flow to receive the passed Attachment file name and Attachment file content, then send an email/create a file in OneDrive folder, I afraid that Microsoft Flow could not achieve your needs.
The result (appres://blobmanager/8964d785a7b04ba89466245be0619629/2) the First(DataCardValue4_1.Attachments).value formula returns is not valid Binary data, which could be used as the File content within the "Create file" action of your flow.
Actually, if you want to send an email with the uploaded file as attachment, you could achieve your needs within your app directly.
When you attach a file to a record using Attachments control within your app, when you edit the record, the uploaded file would be displayed within the Attachments Data card.
I have made a test on my side, please take a try with the following workaround (send an email along with the uploaded file😞
within your Edit screen, add a "Send Email" button, set the OnSelect property to following:
Office365.SendEmail(
"Test1@xxxxxx.onmicrosoft.com", /* <-- Email , type your own email address here */
"PowerApps test", /* <-- Subject */
"This is a test", /* <-- Email Body */
{
Attachments: Table({Name: First(DataCardValue9.Attachments).Name, ContentBytes: First(DataCardValue9.Attachments).Value, '@odata.type':""})
}
)
On your side, you should type:
Office365.SendEmail(
"Test1@xxxxxx.onmicrosoft.com", /* <-- Email , type your own email address here */
"PowerApps test", /* <-- Subject */
"This is a test", /* <-- Email Body */
{
Attachments: Table({Name: First(DataCardValue4_1.Attachments).Name, ContentBytes: First(DataCardValue4_1.Attachments).Value, '@odata.type':""})
}
)
If you want to create a file in your OneDrive folder based on the uploaded attachment file, I think you could consider take a try to create a custom connector to achieve your needs.
Please check and see if the following blog video would help in your scenario:
https://repointtechnologies.com/saving-images-from-powerapps-to-sharepoint/
https://www.youtube.com/watch?v=mp-8B1fLrqs&feature=youtu.be
Note: The output format of Add Picture control is same with that of Attachments control, so you could use above solution to achieve your needs.
Best regards,