I'm trying to convert MS Forms submissions to Notes in Dynamics 365 using Power Automate flow. The flow is triggered when the form is submitted, gets response details, and then Parses JSON Attachment.
Using OneDrive connector I get the file content using path, the output looks like this:
Then I create the Note using Dataverse connector.
However when I add File content to the Document field I get an error:
{ "error": { "code": "0x80040278", "message": "Invalid character in field 'documentbody': '.', hexadecimal value 0x00, is an invalid character.", "@Microsoft.PowerApps.CDS.ErrorDetails.ApiPluginSolutionNameKey": "System", "@Microsoft.PowerApps.CDS.ErrorDetails.ApiStepSolutionNameKey": "System", "@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionCategory": "ClientError", "@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionMessageName": "InvalidCharactersInField", "@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionHttpStatusCode": "400", "@Microsoft.PowerApps.CDS.HelpLink": "http://go.microsoft.com/fwlink/?LinkID=398563&error=Microsoft.Crm.CrmException%3a80040278&client=platform", "@Microsoft.PowerApps.CDS.InnerError.Message": "Invalid character in field 'documentbody': '.', hexadecimal value 0x00, is an invalid character." } }
What is the proper way of attaching the document to the Note in Dynamics 365 using power automate?
I have tried base64(File Content) expression and the attached file is just .txt file instead of an image.