Input Parameter Property for Invoke Python Method

I am trying to pass a variable of a Variable Type Generic as an Input Parameter to the Invoke Python Method. The variable has a body of the email. I just wanted to pass this variable to the python script as an input. Can anyone help me on this?

Hi @prameelaj,
In invoke python method activity , give your input parameter property of activity as shown

Note:This activity only accepts IEnumerable variable.

Hope this helps!

Thanks,
Naveen

1 Like

Thanks… I am able to fix it. I am getting now error message in Load PYtho Script “Error Loading Python Script” and exception as “System.InvalidOperationException”. Can you help?

can you upload your workflow

GetOutlookMessage.xaml (10.6 KB)

Share your python file also

This is my Python code.

#!/usr/bin/python

import sys

def print(name):
return "Hi " + name

if name == “main”:
print(sys.argv[1:])