SOLVED

Get body / sender & more via Powershell

Copper Contributor

Hello,

 

I'm searching  how to retrieve the body, sender and others informations from an email via Powershell.

I'm on an exchange online environnement.

 

Do you know of any documentation that references all usable variables in an email?

 

A little more detail on what I want to do:

Upon receiving an email, run a PowerShell script using Power-Automate. This script must retrieve the body of the email and the sender. Then, send these informations with a API rest.

 

Thanks in advance for your answers.

2 Replies
best response confirmed by Fenrir4384 (Copper Contributor)
Solution
Power automate can do this "natively" via the Graph integration, no need to run additional scripts. Use the "Body contains" condition, combine it with the From condition or any other ones as needed. You should also be able to define some variables... but depends on the use case really.

I'm still discovering power automate and I admit that it's better to do as you advised.
Thanks for your help

1 best response

Accepted Solutions
best response confirmed by Fenrir4384 (Copper Contributor)
Solution
Power automate can do this "natively" via the Graph integration, no need to run additional scripts. Use the "Body contains" condition, combine it with the From condition or any other ones as needed. You should also be able to define some variables... but depends on the use case really.

View solution in original post