Press "Enter" to skip to content

Troubleshooting Flows in Microsoft Power Automate

Power Automate is a very powerful tool for building no-code solutions, but no-code certainly doesn’t mean no complexity and occasionally errors arise which can be difficult to troubleshoot, especially when working with documents and arrays!

This short post is focussed on some common issues but also details what information you should provide to our support team if you need to raise a ticket

Check the ‘INPUTS’ and ‘OUTPUTS’

Every action within Power Automate receives an input and generates an output. These are the first things to check when an action has failed, i.e. what data did the failed action receive and then generate? Thankfully, accessing this information is very simple.

1. Open your failed Flow’s run history and select the failed instance:

2. Locate the failed Flow and check the ‘INPUTS‘; click ‘Show more‘ to review all data

3. Scroll down to review the ‘OUTPUTS

Most actions including the Encodian action will provide a meaningful error message within the body of the output. Make sure to check this value.

Occasionally (especially when working with files) you will not be able to see the data directly and you are instead prompted to download the data:

Clicking the link will download the actual JSON sent to or received from the failed action. Make sure you have installed a JSON viewer extension for your browser as this will make it a lot easier to read the data. We use Mozilla Firefox Developer edition which provides native support for viewing JSON data:

When raising support tickets with Encodian the team will almost certainly request the input data and possibly the output data, but please bear in mind these inputs do contain your documents (encoded) and data.

Encodian Error Messages

When an error occurs it is super important to review the error message which has been generated. The errors will provide a good glimpse as to what is actually happening, for example.

Unauthorized – 401 Status Code

This error means that the connector has rejected your authentication request, either because an invalid API key has been provided, or you have exceeded the number of actions permitted by your subscription:

BadRequest – 400 Status Code

This error means the data sent to the action has failed validation and has been rejected:

This error is typically raised when mandatory data is missing, for example:

Or perhaps more commonly where badly-formatted data has been sent, which can often occur when building arrays of documents to send to an Encodian action. However, where badly formatted JSON is provided, the Encodian API will reject the request raising just a 400 error, as we cannot provide a meaningful error other than simply stating that a BadRequest has been made.

This can also occur where the data has been provided conforming to the JSON schema but binary data has been sent as a Base64 string and therefore cannot be parsed:

BadGateway – 502 Status Code

When an actual processing error occurs Encodian’s connector returns a 500 status code (Internal Server Error), however, Power Automate will automatically interpret 500 errors thrown by connectors as a BadGateway error before overlaying with a 502 status code. By default, Power Automate will also retry the failed request 4 times.

The actual error generated by the Encodian action is contained within the ‘innerError’ property:

The full inner error details:

"innerError": {
       "HttpStatusCode": 500,
       "HttpStatusMessage": "An error occurred processing the request",
       "OperationId": null,
       "Errors": [
         "An error occurred converting the file provided:  Unsupported file format: Unknown",
         "An error occurred converting and merging a document to PDF format : WillFailConversion.docx"
       ],
       "Operation Status": "Error",
       "Filename": null,
       "FileContent": null
       }

What data should I collate to raise a support ticket?

If you need to raise a support ticket with Encodian we’d highly recommend providing the following information where possible:

  1. The email address associated with your Encodian subscription (preferred) or current API Key.
  2. A short description of your issue.
  3. A short description of your use-case. Sometimes there are alternative options but we can’t suggest them if we don’t understand your use-case/requirements.
  4. An export of your Flow as a ZIP package; refer to the guidance found here
  5. The values from ‘INPUTS’ and ‘OUTPUTS’ of the failed action attached as separate TXT files.

We hope this post provides some clarity on how to review and interpret errors you may occasionally receive and what information to provide our support team with so that we can best help you.

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *