Forum Discussion
Russ0203
Oct 27, 2023Copper Contributor
emails with attachments to channel are wrapped in additional EML
Have you ever encountered emails with attachments to a Teams channel are wrapped in additional EML
We have multiple emails arriving into a Teams channel where the sources are various external / 3rd party senders. We also have emails arriving successfully from primary internal email domain. All of these messages arriving correctly formatted as a post with attachment. However, we have an email (same contents) for one sender that arrives with the original email attached into that includes the attachment.
We have a workflow triggering when a new item is posted to the channel. In the first case, I can use Get Attachments action to retrieve the attached file. That works perfectly.
However, the emails that arriving as an embedded item in an additional email arrive with the attachment 2 level deep so I am unable to use Get Attachments to retrieve.
My question is have you ever encountered this behavior and if so what was necessary to resolve the issue?
1 Reply
Sort By
- Dorje-McKinnonSteel Contributor
Hi Russ0203
I found your post while looking for a solution to a different problem (emails to teams channel create duplicate sharepoint eml files, but only show one post in the teams channel).
So I haven't had your problem and fixed it but I do have a suggestion for a different solution.
Rather than using the monitoring for a new post to the channel. You could try every hour running a flow that looks at all the most recent channel posts and applying your business logic that way:
Then to solve your actual problem, I see two options.
Option 1 - look at the JSON that gets returned when you get the post, and see if you can figure out some logic to get to the burried attachments that way.
Option 2 - all emails to a TEAMS channel and their attachments are saved into the SharePoint site for the TEAM > Documents library > Channel folder > EmailMessages_<month>_<year> folder e.g. EmailMessages_11_2023
So you could just pick up the attachments as PDF or XLSX or whatever from there directly.
Hope this helps.