cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate I

Delete Email (V2) - Whats the email ID?

Im trying to use the Delete Email (V2) to delete emails that were sent out through my flow (from the Sent Items folder in Outlook). However, I cant figure out what the email ID is. 

 

If I use "body('Send_an_email_(V2)['Message_ID'] or "body('Send_an_email_(V2)['ID'], the flow throws an error. 

 

Any help here?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User II
Super User II

Re: Delete Email (V2) - Whats the email ID?

@Naz 

Hey there.  The eMail ID is a unique identifier of the message.  If you're using the same flow that is sending the message, the only dynamic value would be the "Body" from the Send eMail step.

 

One approach might be to send the email, then do a "Get eMails" step from the Sent Items folder, then further filter based on the subject (maybe even the To:), and then that step should give you a message ID to use in the Delete step.

 

Here's a thread where someone did something similar.

 

Keep us posted.

-Ed-

 

If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

View solution in original post

1 REPLY 1
Highlighted
Super User II
Super User II

Re: Delete Email (V2) - Whats the email ID?

@Naz 

Hey there.  The eMail ID is a unique identifier of the message.  If you're using the same flow that is sending the message, the only dynamic value would be the "Body" from the Send eMail step.

 

One approach might be to send the email, then do a "Get eMails" step from the Sent Items folder, then further filter based on the subject (maybe even the To:), and then that step should give you a message ID to use in the Delete step.

 

Here's a thread where someone did something similar.

 

Keep us posted.

-Ed-

 

If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (4,460)