I was quite successful at sending an email from within Power Apps that had as attachments the pen image and camera photo. I created a collection with both images using
Office365Outlook.SendEmailV2("larry@techevents.com","HTML Test",HtmlText1.HtmlText,
{Attachments:
Table(
{Name:"deliveryphoto.jpg",ContentBytes: Camera1_1.Photo,'@odata.type':""},
{Name:"signature.jpg",ContentBytes: penSignature.Image,'@odata.type':""}
),
IsHTML:true}
)
The problem remains that instead of sending this from the logged on user in Power Apps, I want to accomplish the very same thing from a shared mailbox via Power Automate. I am having trouble getting the attachment data passed and then using it in the send email from a shared mailbox action.
I tried passing the Table entry above as a parameter and set its type to Array in Power Automate (also tried as a string with just one element; same failed result). In the Attachment section of the send email, I clicked on the icon to display the JSON code, and then replaced it with the dynamic data array value. However, when I tried to save the flow, I get an error that ends with this:
'emailMessage/Attachments' with type/format 'String' is not convertible to type/format 'Array'.
I know the variable is initialized as a type array, and this happens as I am creating the flow well before evoking it from Power Apps.
Perhaps I can just ignore all I have done to get this to work and instead ask the question I really need answered:
I have a pen captured image and a camera photo in Power Apps. I need to email those as attachments from a shared mailbox.
Thanks to all who can help with a detailed response.
Solved! Go to Solution.
I managed to hack my way through this. Here's how.
1. I am capturing the signature and photo in a SharePoint list as hyperlink columns. When the list is viewed, the URL for where they are actually stored is visible. But I still needed to do something; stay tuned.
2. From Power Apps, I am, passing parameters - to and cc addresses, HTML body text, and the signature and photo image.
3. I needed the URL for these as string values, so I had to set a variable as
Text(imagefield) rather than just imagefield. Very important.
Now shift to Power Automate.
But there is a bug if you just do these things. The file path from Text(imagefield) also contains
"https://sharepoint...." though the site when what you need for the file path is just the portion for the list name and file name. In Power Apps, I used Substitute() to set that portion to null or "" and then perfect results.
Emails from shared mailbox now show up as proper images.
I managed to hack my way through this. Here's how.
1. I am capturing the signature and photo in a SharePoint list as hyperlink columns. When the list is viewed, the URL for where they are actually stored is visible. But I still needed to do something; stay tuned.
2. From Power Apps, I am, passing parameters - to and cc addresses, HTML body text, and the signature and photo image.
3. I needed the URL for these as string values, so I had to set a variable as
Text(imagefield) rather than just imagefield. Very important.
Now shift to Power Automate.
But there is a bug if you just do these things. The file path from Text(imagefield) also contains
"https://sharepoint...." though the site when what you need for the file path is just the portion for the list name and file name. In Power Apps, I used Substitute() to set that portion to null or "" and then perfect results.
Emails from shared mailbox now show up as proper images.
Hi,
Thanks for your follow up post! I am glad that you were able to get this figured out. Hopefully this will prove useful for future communities users who are having similar issues.
Regards,
Alex
-------
Community Support Team _ Alex Rezac
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
192 | |
69 | |
50 | |
38 | |
29 |
User | Count |
---|---|
245 | |
112 | |
92 | |
91 | |
71 |