@WarrenBelz thanks so much for your answer - I had to tweak it a bit to get where I wanted to but it worked for the most part. I am just trying to complete the loop so I don't know if you could help me with one more question?
There are 2 different types of emails that are being sent from the power app - lets call them Basic Email and Special Emal. Both have the same configuration but Special Email has an HTML table that gets added to the email that goes from the shared mailbox. Both sets of emails worked perfectly with their configurations as is prior to trying to add the attachment. However, currently I can only get the Basic Email to work. The other one fails in Power Automate with this error:
Unable to process template language expressions in action 'Send_an_email_from_a_shared_mailbox_(V2)_2' inputs at line '0' and column '0': 'The template language expression 'triggerBody()['file']['name']' cannot be evaluated because property 'file' doesn't exist, available properties are 'email, text, text_1, text_2, boolean, text_3'. Please see https://aka.ms/logicexpressions for usage details.'.
This is the code in Power Apps - and as mentioned for the Basic Email this all works perfectly with the attachment, so what is causing the error for the Special email?
If(
EmailTypeDropdown.Selected.Value = "Special Email",
ForAll(
AttachmentControl.Attachments,
‘Special-EmailResponseForm-Mymailbox'.Run(
CustomerEmailInput.Text,
CustomerGreetingInput.Text,
IDInput.Text,
HtmlText2.HtmlText,
Checkbox.Value,
Dropdown.Selected.Value,
{
contentBytes: Value,
name: Name
}
)
),
ForAll(
AttachmentControl.Attachments,
‘PersonalDetails-EmailResponseForm-MyMailbox'.Run(
CustomerEmailInput.Text,
DateReqRcvd.SelectedDate,
CustomerGreetingInput.Text,
IDInput.Text,
Checkbox.Value,
Dropdown.Selected.Value,
{
contentBytes: Value,
name: Name
}
)
);
Clear(Collection1);
Reset(CustomerEmailInput);
Reset(CustomerGreetingInput);
Reset(IDInput);
Reset(Date);
Reset(EmailTypeDropdown);
Reset(DateReqRcvd);
Reset(Checkbox);
Reset(AttachmentControl);
Set(isNotConfirmed, false);
Set(isSubmitted, true);
Reset(Dropdown);
Navigate(DataEntryScreen);
Set(CustomerEmail, "");
Set(CustomerGreeting, "");
Set(ID, "");
Set(RequestReceived, Blank())
)
And this is in my flow for both of the emails but the Special one has the HTML table input below.

