Forum Discussion

Fenrir4384's avatar
Fenrir4384
Copper Contributor
Jul 07, 2022
Solved

Get body / sender & more via Powershell

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.

  • 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.

2 Replies

  • 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.
    • Fenrir4384's avatar
      Fenrir4384
      Copper Contributor

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

Resources