I do normally try to stay off
@WarrenBelz 's posts unless I really feel the need to add something.
My guess is you are sending the email from the App because you want the email to go out as the user. This is not easy to do if you send the email from Power Automate because you either have to use Delegation and Graph API (which is a pain) or grant the person who created the connection in the flow, Send rights to every person who might send an email or use Shared Mailboxes.
If you can use a Shared Mailbox then you can do as Warren mentioned and it would technically be easier, but for tracking purposes you would lose all of that due to the user not being the one who sent the email.
My guess is this is why you want to attach it to the Send Email in the flow so that it will be the same as the individual correct?
I'd like to validate, that this is something you attached to an item in SharePoint and not a Document library as there is a difference and an important validation part.
As for attaching the email, first you need to bytes, so either
1) send the data back
2) if the record you are creating is based on a Form, you can use the attachment control
3) pass back the Item ID of the Item you attached to and the attachment identifier to your canvas app
Then use that to grab the attachment and attach it to the email.
There are examples of how to do that so I'm not going to write one but you can look at some
If you do not care about who sends the email, meaning it can always go out as the Connection owner, then I would follow what
@WarrenBelz said and look at just doing it all from the Flow.
P.S. depending on how you store (attachment versus document library you can also just send a link). And in your Item, instead of attaching, map the Document Id to the Item row with a column (not a lookup). then grab the URl of the document via that and add the link to the outgoing email versus attachments.
Cheers
If these suggestions help resolve your issue, Please consider Marking the answer as such and also maybe a like.
Thank you!
Sincerely, Michael Gernaey