cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
efialttes
Super User
Super User

'Office 365 groups mail' connector: how to get the body, attachments of new emails

Hi!

I'm working on a Proof of Concept with connector 'Office 365 Groups Mail' that is currently in Preview.

My goal is to check if trigger 'When a ne email arrives to a group' or any other related action block can provide me the Subject, Email body, attachmants, DateTime received, as I can do with Outlook, Gmail related triggers.

 

Since the trigger itself does not provide such info, I have tried to check if either conversation, or thread or related posts store such info with no success in the case of the body (I can just find a PReview with the first characters from Body) and no success in the case of the attachments.

Flow_NewEmailGroup.png

Any suggestions?

Thanx!

 

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



2 ACCEPTED SOLUTIONS

Accepted Solutions
fchopo
Super User
Super User

Hello @efialttes 

You could use MS Graph API to get the "conversations" of a Group using the following url: https://graph.microsoft.com/v1.0/groups/{group_id}/conversations

 

Therefore, you could create a flow that uses a Graph API call and try to get this information.

 

Hope it helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

View solution in original post

Hi @efialttes, try to use the premium connector "HTTP with Azure AD"  - it doesn't required to register an application in Azure.

View solution in original post

8 REPLIES 8
fchopo
Super User
Super User

Hello @efialttes 

You could use MS Graph API to get the "conversations" of a Group using the following url: https://graph.microsoft.com/v1.0/groups/{group_id}/conversations

 

Therefore, you could create a flow that uses a Graph API call and try to get this information.

 

Hope it helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

View solution in original post

Thanx for the tip @fchopo !

I have a limitation to use 'Graph API'  the way Laura suggests, since admins in my organization have blocked access end users like me to Active Directory, so I cannot perform app registration 😞

Please also note the preview connector supports 'get conversation' action block, but as far as I understand from the official doc, this object does not provide neither the email body (just a preview, with a limited nr of characters) nor the attachments

https://docs.microsoft.com/en-us/graph/api/group-get-conversation?view=graph-rest-1.0&tabs=http

 

However, Microsoft has just recently posted an article in the Power Automate Official Blog describing this new connector, and explaining how to get Email body and attachments. I just followed the steps, implementing the branch on the right, and overcome my challenge

https://flow.microsoft.com/es-es/blog/use-our-new-office-365-groups-mail-connector/

 

So for some reason 'Get a Conversation thread' does not provide value to 'HasPosts' attribute, which was my initial approach.

Flow_GroupsMail_2.png

Thanx!

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Hi @efialttes, try to use the premium connector "HTTP with Azure AD"  - it doesn't required to register an application in Azure.

View solution in original post

Hallo efialttes,

 

the link: https://flow.microsoft.com/es-es/blog/use-our-new-office-365-groups-mail-connector/

describe how to save the attachments. But not the email body.

 

And your solution with "Get a thread post:" does not really get the complete message. 

 

I use "Export email (V2)" with "Post ID" as Message Id and it is working. But I don't really understand from where "Export email (V2)" is taking the email. I'm not following the email of the group in my inbox and the email are send from outside my company. 

 

I save the email than on SharePoint "Create file" with the ending ".eml".

 

 

 

 

 

 

 

 

 

 

 

 

rob7785
Frequent Visitor

I have spent countless hours trying to develop a way to save from groups email to Sp library and that little post ID post ID workaround to use export has done it. you've just become my favourite person lol 

@rob7785 How did you do it? My loop just gets stuck looking for the post? Can't seem to get this working.

I haven't worked on this solution for a while, came back to it today to finish it off and it no longer works, Microsoft must have changed something with the connector, very frustrating if I find a new work around will add it here.

I have managed to create a work around to the issue its not ideal but it works, As the groups mail will no longer export using the outlook connector using Post ID, I had to create another email account for the group email to be forwarded to which can then be exported. Use group mail connectors to forwardUse group mail connectors to forwarduse outlook connectors to find emailuse outlook connectors to find emailExport with outlook connector and creates new File on SPExport with outlook connector and creates new File on SPNew file created in location shownNew file created in location shownOpened email showing contents and attachments.Opened email showing contents and attachments.

 

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (1,586)