I've written a PowerShell script which downloads a file from a URL to the local PC then uploads that file to a SharePoint Online library. Running the script locally works but when I try getting it to run from a runbook triggered by Flows/Power Automate I get the error: Action HTTP failed; Input value wasn't JSON object. This flow is manually triggered and was working before I put the Create Job step in.
Screenshots and PowerShell script below, any help is greatly appreciated.
Set Variable: actions('HTTP').outputs.headers.Location
Hi,
How do I add pictures so they're actually visible when initially posting?
After testing it looks like the script doesn't run in Azure Automate, I cannot find where it is failing.
When I looked at the output from the script it looks like it's doing what I expect it to do up until it's downloaded the file and written it to the stream.
Hello,
The screenshots were not visible in your question. Are you able to run the same PowerShell script directly in Azure automation (Azure portal) outside of power automate ? This will help determine if the problem is with running the script through Create Job or specifically when doing it through Power Automate.