cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
venka91
Super User
Super User

Flows fails on different user logins

Hi there,

 

I am trying to upload a Audio File that is recorded by the user to sharepoint library. This is working for me as i am the creator of the app and sharepoint library. But when other user records the message and save, Flow fails. I have verified the permission and my users have access to create a file in the sharepoint library. All users have Contribute permission in sharepoint library.

 

Flow error message shows as :

 

Unable to process template language expressions in action 'Create_file' inputs at line '0' and column '0': 'The template language function 'base64ToBinary' was invoked with a parameter that is not valid. The value cannot be decoded from base64 representation.'.

 

When user creates a file the flow as below.

 

venka91_0-1656760657810.png

 

 

When i create a file, the flow looks good.

 

venka91_1-1656760716699.png

 

Can anyone please help what is wrong ?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @venka91 ,

I must have missed your post - I have tested a sound example here and have this OnStop and it works perfectly

With(
    {
        wJSON: With(
            {
                wJSONI: JSON(
                    Self.Audio,
                    JSONFormat.IncludeBinaryData
                )
            },
            Mid(
                wJSONI,
                Find(
                    ",",
                    wJSONI
                ) + 1,
                Len(wJSONI) - Find(
                    ",",
                    wJSONI
                ) - 1
            )
        )
    },
    StoreSound.Run(
        wJSON,
        "TestSound1.wav"
    )
)

then the Flow

WarrenBelz_0-1657443308151.png

Note you need to "Ask in Power Apps" in the Compose function first, delete that and replace with the code shown

 

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.

Visit my blog Practical Power Apps

 

View solution in original post

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @venka91 ,

Can you please include (in Text) the flow run code, in particular the JSON code where you are converting the file and also the base64ToBinary expression from your Flow.

i am calling a flow from powerapps. And this is the flow step.

 

venka91_1-1656927993060.png

 

 

File content in flow i am writing the formula as :

base64ToBinary(variables('Base64Audio'))

 

 

Hi @venka91 ,

I must have missed your post - I have tested a sound example here and have this OnStop and it works perfectly

With(
    {
        wJSON: With(
            {
                wJSONI: JSON(
                    Self.Audio,
                    JSONFormat.IncludeBinaryData
                )
            },
            Mid(
                wJSONI,
                Find(
                    ",",
                    wJSONI
                ) + 1,
                Len(wJSONI) - Find(
                    ",",
                    wJSONI
                ) - 1
            )
        )
    },
    StoreSound.Run(
        wJSON,
        "TestSound1.wav"
    )
)

then the Flow

WarrenBelz_0-1657443308151.png

Note you need to "Ask in Power Apps" in the Compose function first, delete that and replace with the code shown

 

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.

Visit my blog Practical Power Apps

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (2,795)