web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Power Automate Power A...
Power Apps
Answered

Power Automate Power App V2 File Input error

(1) ShareShare
ReportReport
Posted on by 75

Hi 

I am trying to create Power Automate with Power App V2 - File content input as trigger and compose as action. However, I am getting missing column error with the contentBytes.  I believe I did everything correctly.  But, I don't know why I am still getting error message below. 

Thank You in advance! 

 

Ruth_Dong_0-1720331583591.pngRuth_Dong_1-1720331633830.png

Try to call the flow , but not success 

Ruth_Dong_2-1720331697647.png

Below is the flow design.

 

Ruth_Dong_0-1720332113042.png

 

I created it based on Shane Young video.  Power Apps Upload File v2 to SharePoint Document Library (youtube.com)

 

Ruth_Dong_4-1720331947875.png

 

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    Hi @Ruth_Dong ,

    You need to refer to the UploadedImage1.Image (use your number), not the AddMediaButton1.Media. The file name is the correct reference.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Ruth_Dong Profile Picture
    75 on at

    @WarrenBelz , thanks for your help.  I used  UploadedImage1.Image. I am still getting the same error with UploadedImage.  and I don't have image number.

    Ruth_Dong_1-1720335727794.png

    Ruth_Dong_2-1720335873447.png

    AddMediaButton1.Media may be the correct one.  Please see image properties below.

    Ruth_Dong_0-1720335521029.png

     

     

  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    Hi @Ruth_Dong ,

    I use this function extensively and always use the UploadedImage.Image reference (which is why I suggested it) and yours would be UploadedImage1.Image

    flowpractice.Run(
     "himom",
     false,
     {
     file: 
     {
     contentBvtes : UploadedImage1.Image,
     name : AddMediaButtonl.Filename
     }
     }
    );

    Also are you getting the error before or after you run the Flow and what exactly are you doing with those Compose statements ? I also assume here that you have uploaded a file before you run the Flow.

  • Ruth_Dong Profile Picture
    75 on at

    @WarrenBelz , thank you for your support and your patience.

     

    I am trying to test out the feature of Power App V2 -  input as file content.   My end goal is to create PDF file from SharePoint form and save it back to the SharePoint library.  Please see picture below.  But, I am keep getting missing column error with the contentBytes.  In fact, contentBytes already exists clearly. 

     

    Therefore, I am trying to test out the feature by uploading an image.  Response to your question, the error appears before I run the flow.  And, I have already uploaded the image. 

     

    Ruth_Dong_1-1720407371431.png

     

    flow design 

    Ruth_Dong_2-1720407466870.png

    Code to upload image flow - Power App V2 trigger:

     

    {
        "kind""PowerAppV2",
        "inputs": {
            "schema": {
                "type""object",
                "properties": {
                    "text": {
                        "title""My Text",
                        "type""string",
                        "x-ms-dynamically-added"true,
                        "description""Please enter your input",
                        "x-ms-content-hint""TEXT"
                    },
                    "boolean": {
                        "description""Please select yes or no",
                        "title""Yes/No",
                        "type""boolean",
                        "x-ms-content-hint""BOOLEAN",
                        "x-ms-dynamically-added"true
                    },
                    "file": {
                        "description""Please select file or image",
                        "title""File Content Test",
                        "type""object",
                        "properties": {
                            "name": {
                                "type""string"
                            },
                            "contentBytes": {
                                "type""string",
                                "format""byte"
                            }
                        },
                        "x-ms-content-hint""FILE",
                        "x-ms-dynamically-added"true
                    }
                },
                "required": [
                    "text",
                    "boolean",
                    "file"
                ]
            }
        },
        "metadata": {
            "operationMetadataId""864569ae-bfac-47b8-9f37-1c9caf9771d5"
        }
    }

     

    Code for compose 

     

    {
        "inputs""@triggerBody()['text']",
        "metadata": {
            "operationMetadataId""2e554d26-bd20-4f5a-b531-cf438e49050e"
        }
    }

     

    Code for compose1

    {
        "inputs""@triggerBody()?['boolean']",
        "metadata": {
            "operationMetadataId""521565c1-cd06-4c72-b6f9-7c1938722853"
        }
    }
    Code for compose2
     
    {
        "inputs""@triggerBody()?['file']",
        "metadata": {
            "operationMetadataId""08fdd02f-e3ec-4692-bed8-4df972694d2e"
        }
    }

     

     

    Code to my end goal:   Create PDF file from SharePoint form and save it back to the SharePoint library. 

     

    SaveFile_To_SharePoint_2.Run(
       "NewInspectionReport.pdf",
        {        
           file: {
                contentBytes: PDF(MainFormScreen),
                name: "NewInspectionReport.pdf"
            }              
        }
    );  
        I am keep getting missing column error with the contentBytes.  In fact, contentBytes already exists clearly.

    Ruth_Dong_0-1720406676878.png

    Code for Power App V2
    {
        "kind""PowerAppV2",
        "inputs": {
            "schema": {
                "type""object",
                "properties": {
                    "text": {
                        "description""Please enter your input",
                        "title""File Name",
                        "type""string",
                        "x-ms-content-hint""TEXT",
                        "x-ms-dynamically-added"true
                    },
                    "file": {
                        "description""Please select file or image",
                        "title""File Content",
                        "type""object",
                        "properties": {
                            "name": {
                                "type""string"
                            },
                            "contentBytes": {
                                "type""string",
                                "format""byte"
                            }
                        },
                        "x-ms-content-hint""FILE",
                        "x-ms-dynamically-added"true
                    }
                },
                "required": [
                    "text",
                    "file"
                ]
            }
        }
    }
  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    Hi @Ruth_Dong ,

    I just ran this

    WarrenBelz_0-1720409207777.png

    using this Flow

    WarrenBelz_1-1720409236429.png

    and it uploaded the file perfectly.

    WarrenBelz_2-1720409470585.png

     

    Please have a look and see if there is anything different in the similar test example you posted.

     

     

  • Ruth_Dong Profile Picture
    75 on at

    @WarrenBelz , I followed your instructions in creating the same flow and save the file to SharePoint.  But, I am still getting the same error - missing contentBytes.   

     

    I have just read other posts that are similar to this topic. Solved: [bug] Missing column contentBytes type blob (even ... - Power Platform Community (microsoft.com)

     

    And, I followed the suggestion in the above post.  The error message is gone after I removed the word files.  Please see picture below.  And, I don't know why it works without the word file. 

     

    flowpractice.Run(
        "himom",
        false,
        {
                contentBytes: UploadedImage1.Image,
                name: AddMediaButton1.FileName

        }
    )

     

    With the word - file, the error shows up. 

    Ruth_Dong_0-1720411543373.png

    Ruth_Dong_2-1720411837239.png

    works without the word- file 

     

    Ruth_Dong_3-1720411954001.png

    The flow runs successfully. 

     

    Ruth_Dong_4-1720412007031.png

    Thank You

     

  • Verified answer
    WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    @Ruth_Dong ,

    Strange unless it is something to do with your region. Mine fails without using file: If it works for you I suggest you use it.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Ruth_Dong Profile Picture
    75 on at

    @WarrenBelz , thank you for your help.  I live in CA.  Based on the post, it happens with others too.  It can be a Microsoft bug. 

  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    @Ruth_Dong ,

    I assume CA is California (not Canada) - I am in QLD AU

  • Ruth_Dong Profile Picture
    75 on at

    @WarrenBelz , CA refers to California USA. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard