Mail Message Invoke Power Shell

Hi there,

I tried to send an email using the “Invoke Power Shell” activity. However, I get the following message:

Invoke Power Shell: Cannot cast object of type ‘System.Management.Automation.ScriptBlock’ to type ‘System.String’.

What can be the reason?

grafik

grafik

grafik

Try removing curles { } in your script

Have you tried changing your variable type to scriptblock?

image