cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Naz
Level: Powered On

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
Super User
Super User

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
Super User
Super User

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,139)