Hello Everyone.
I have added this Python script to my flow as a test.
import requests
def is_website_online(url):
try:
response = requests.get(url)
return response.status_code == 200
except requests.exceptions.RequestException:
return False
def check_multiple_websites(websites):
for website in websites:
status = "Online" if is_website_online(website) else "Offline"
print("{} is {}".format(website, status))
if __name__ == "__main__":
websites_to_check = [
"https://www.example.com",
"https://www.google.com",
"https://www.github.com",
"https://www.nonexistentwebsite1234.com" # Add more websites to check
]
check_multiple_websites(websites_to_check)
I have set up the Run Python Script flow action like this - is the module file path correct?

When my flow runs, there is no output from the Python script stored in the output variable, and no error either.
However, when I run the same script in VS Code it works as expected and displays the correct output.
What am I doing wrong here? The PAD machine has Python 2.7 installed.
Many thanks.