Trying to run Automation Anywhere import API through Power Automate Cloud Flow

283 views Asked by At

Have anyone tried to run Automation Anywhere A360 import API with HTTP Post action with Power Automate Flow? The flow runs smoothly and I'm receiving the requestId in response. However, the whole action fails at the Automation Anywhere Control Room side with no imported bot at the end. I'm receiving the following error: net.lingala.zip4j.exception.ZipException: Zip headers not found. Probably not a zip file?

Power Automate HTTP Post - Body

enter image description here

I added below code to the Http Post Body:

{
  "$content-type": "multipart/form-data",
  "$multipart": [
    {
      "headers": {
        "Content-Type": "application/x-zip-compressed",
        "Content-Disposition": "form-data; name=\"upload\"; filename=\"@{variables('fullPath')}\""
      },
      "body": "@{variables('contentString')}"
    },
    {
      "headers": {
        "Content-Disposition": "form-data; name=\"actionIfExisting\""
      },
      "body": "OVERWRITE"
    },
    {
      "headers": {
        "Content-Disposition": "form-data; name=\"publicWorkspace\""
      },
      "body": "true"
    },
    {
      "headers": {
        "Content-Disposition": "form-data; name=\"upload\""
      },
      "body": "@{variables('fullPath')}"
    }
  ]
}

The contentString variable is: @{body('Get_file_content_using_path')?['$content']}

What am I doing wrong?

0

There are 0 answers