import requests # Import requests library
import datetime
# Get current time.
now = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
# Triggering Power Automate Flow
flow_url='https://***/triggers/manual/paths/invoke?api-version=2016-06-01' # Replace with actual URL from step 2
response=requests.post(flow_url,json={"status":"Script Completed","timestamp":now})
if response.status_code==200:
print('PowerAutomate Flow triggered successfully')
else:
print(f'Failed to trigger PowerAutomate Flow: {response.status_code}')
Я пытаюсь отправить сообщение командам с помощью скрипта Python с помощью Power Automate. [code]import requests # Import requests library import datetime
# Get current time. now = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
# Triggering Power Automate Flow flow_url='https://***/triggers/manual/paths/invoke?api-version=2016-06-01' # Replace with actual URL from step 2