cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Bspisak
Frequent Visitor

Run flow without image

I'm trying to create a button that issues a work order. Occasionally a picture will be submitted however this field will not be mandatory. When a picture is not included I get this error "Unable to process template language expressions in action 'Compose' inputs at line '1' and column '7654': 'The template language function 'base64ToBinary' expects its parameter to be a string. The provided value is of type 'Null'. "

Would anyone know how to right the expression to avoid the error. My expression is below.

base64ToBinary(triggerbody()?['file']?['contentBytes'])
1 ACCEPTED SOLUTION

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @Bspisak,

 

The error is happening on the parameter in base64ToBinary() function is empty, you should input a value that not empty to make sure it could work.

You could add a condition action to check if the triggerbody()?['file']?['contentBytes'] has value:

for example:

Screenshot 2021-02-08 140513.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-litu-msft
Community Support
Community Support

Hi @Bspisak,

 

The error is happening on the parameter in base64ToBinary() function is empty, you should input a value that not empty to make sure it could work.

You could add a condition action to check if the triggerbody()?['file']?['contentBytes'] has value:

for example:

Screenshot 2021-02-08 140513.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for the help, that did the trick.

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Users online (2,892)