cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bkilby
Regular Visitor

Error when using Kaizala upload media from attachment

Hi All,

 

I'm having an issue using the Kaizala - Upload Media from Attachment action.  I get the error message: 

{"statusCode":500,"headers":{"Access-Control-Allow-Origin":"*","Date":"Wed, 06 Jan 2021 13:21:38 GMT","Content-Length":"175","Content-Type":"application/json"},"body":{"message":"ProcessUploadAttachement: Problem in Parsing the JSON. Unable to cast object of type 'Newtonsoft.Json.Linq.JValue' to type 'Newtonsoft.Json.Linq.JObject'."}}d

 

In the flow, I'm getting an attachment from an email and trying to post it to Kaizala.  I have to first save the attachment in a string variable.

 

Kaizala Upload.png

 

If I try to put the contents directly in the media file box, I get: 

Media File Direct.png

 

Flow save failed with code 'OpenApiOperationParameterValidationFailed' and message 'Input parameter 'request' validation failed in workflow operation 'Upload_media_from_attachment_2': The parameter with value '"@items('For_Each_Attachment')?['contentBytes']"' in path 'request/fileContent' with type/format 'String/byte' is not convertible to type/format 'Object'.'.

 

 

I saw another user having an issue with uploading media to Kaizala and getting the same error message I'm getting.  It was on a separate post that had already been solved, so I wanted to create a new one.

 

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
bkilby
Regular Visitor

I found the answer on another Microsoft certified blog https://mixtricks.net/power-automate/when-new-email-arrives-send-to-kaizala-group/ 

 

He uses a object variable to format the proper JSON that the Kaizala action is looking for.  

 

Solution.png

 

The only change I had to make is in the JSON double quotes have to be added around the Content-Type but not the Content Bytes. 

{ "$content-type":"<Attachment Content-Type>", "$content":<Attachment Content Bytes> }

 

View solution in original post

3 REPLIES 3
v-litu-msft
Community Support
Community Support

Hi @bkilby,

 

The upload field only supports base64 format code, so you should use Get attachment action to get the Email attachment base64 code, then use it to upload to the Kaizala:

Screenshot 2021-01-07 102609.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 your help, but it is still giving the same error message when I try to save.

 

bkilby_0-1610023832935.png

It's as if the Kaizala upload is looking for an object rather than a string.

bkilby
Regular Visitor

I found the answer on another Microsoft certified blog https://mixtricks.net/power-automate/when-new-email-arrives-send-to-kaizala-group/ 

 

He uses a object variable to format the proper JSON that the Kaizala action is looking for.  

 

Solution.png

 

The only change I had to make is in the JSON double quotes have to be added around the Content-Type but not the Content Bytes. 

{ "$content-type":"<Attachment Content-Type>", "$content":<Attachment Content Bytes> }

 

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,335)