Skip to main content

Notifications

Announcements

No record found.

Power Automate – Invalid character ; hexadecimal value 0x1A, is an invalid character

A very quick read! I was working on Power Automate related to attachments & found the below error.

Invalid character in field ‘documentbody’: ”, hexadecimal value 0x10, is an invalid character.

 “message”: “Invalid character in field ‘documentbody’: ‘\u001a’, hexadecimal value 0x1A, is an invalid character.”,

After a few research and some time later, I found the solution. Let us replicate the error first.

The data source could vary from where you are reading the attachment. I have used SharePoint here for example.

The Action used – Dataverse – Create new record

Update the attachment content to the ‘Document’ field

Save & test the flow. This will give you the error

"message": "Invalid character in field 'documentbody': '\u001a', hexadecimal value 0x1A, is an invalid character.",

Now let’s resolve this error, by simply updating the data of the attachment content to Base 64. Use the below formula.

base64(outputs('Get_attachment_content')?['body'])

Now save & test the app. The flow works fine.

Hope this helps!

Keep reading, keep enjoying, keep exploring!


This was originally posted here.

Comments

*This post is locked for comments