Why does Power Automate Disapprove of my CVS file if base64ToString is used?

William Thompson 125 Reputation points
2024-01-08T20:55:43.9133333+00:00

I am attempting a Power Automate tutorial that is intended to read a CSV file into a SharePoint List. The way it is being done is to create a new Power Automate flow and pick the "Instant cloud flow" option and choose to

use the "Manually trigger a flow" as the type. We set up the first step of the flow to request the input data in the form of a CSV file from the user.

Then we add a step. This step is a Compose Data Operation which uses the base64ToString expression. The input to the base64ToString() expression, we add the Dynamic Content and I picked "Upload CSV".

I should mention at this point that my UI is a little different from the UI of the tutorial. I believe we are using different versions of Power Automate. The instructor had a button "Upload CSV" but I had to select this option from a list.

This screen shot shows the code that the generated when the instructor clicked on "Upload CSV".

instructor-upload-csv

Notice that the generated string contains what seems to be a part: ['contains(collection, value)'] but it is not sure since we only see a small part of this display.

My experience is different, it lacks this "contains" part:

my-upload-csv

I mention all this because it might have something to do with the error I get. When I try to test my flow, the error I get says:

InvalidTemplate Unable to process template language expressions in action 'CSVData' inputs at line '0' and column '0'. The template language function 'base64ToString' expects its parameter to ba a string. The provided value is of type 'Object'. Please see https://aka.ms/logicexpressions#base64ToString for usage details.

The webpage segment mentioned in the error message ( https://aka.ms/logicexpressions#base64ToString ) has an example where the base64-encoded string, "aGVsbG8=" is converted to the string "hello". This might be my problem. I am not sure if this csv file is base64. So, how to I check this and how to I ensure it is converted? Also, what should I make of the missing part of the command I have mentioned?

Microsoft 365 and Office | SharePoint | For business | Windows
{count} votes

1 answer

Sort by: Most helpful
  1. Emily Du-MSFT 51,926 Reputation points Microsoft External Staff
    2024-01-09T09:30:36.9066667+00:00

    Power Automate is currently not supported in the Q&A forum.

    Please start a new discussion via the Power Automate Community so that you can get dedicated support on this issue.

    Thank you for your understanding.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.