Troubleshooting Flows in Microsoft Power Automate

May 27th 2020
Back to all blogs

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

This short post is focused 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’ to troubleshoot Power Automate.

Every action within Power Automate receives 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 JSON sent to or received from the failed action. Ensure you have installed a JSON viewer extension for your browser, making it much 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 and possibly the output data. However, please bear in mind these inputs contain your documents (encoded) and data.

Encodian Error Messages for troubleshooting Power Automate

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

Unauthorised – 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 ship to an Encodian action. However, where poorly formatted JSON is provided, the Encodian API will reject the request raising just a 400 error, as we cannot give 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

Encodian’s connector returns a 500 status code (Internal Server Error) when an actual processing error occurs. 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 four 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:

  • The email address associated with your Encodian subscription (preferred) or current API Key.
  • A short description of your issue.
  • 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.
  • An export of your Flow as a ZIP package; refer to the guidance
  • The values from ‘INPUTS’ and ‘OUTPUTS’ of the failed action are attached as separate TXT files.

We hope this post clarifies how to review and interpret errors you may occasionally receive and what information to provide our support team so we can best help you.

Author
Jay Goodison

Managing Director

Back to all blogs

You might also be interested in...