Hi creativeopinion,
Thanks for taking the time to reply and for your detailed explanation.
A bit more context is warranted here. I am building a solution that uses data from Dataverse, which the user interacts with using a canvas app. In the app the user can see their own projects and then use a button to automatically generate a number of documents based on a word template. It is here that Power Automate comes in, and the end result should be that each generated document is attached to a column in a Dataverse table that then has a lookup to the specific project the user is working in, then allowing the user to browse their documents, for that project, on the canvas app.
When building the flow everything goes great until I have to upload the file to Dataverse. I could not use the output of the "Populate a word template" to directly upload, so I thought I'd have to first create the file somewhere (like Sharepoint) and then upload that file and delete it. Did not matter what I tried, nothing work, so in order to troubleshoot the upload, I created a small test word file in sharepoint and separated the part of the flow that does the upload into a different flow, so that I don't have to keep waiting for files to be generated.
Long story short, it does not matter what or how I do it, I just can not seem to be able to upload these files. I've tried a number of things (direct upload form the generate word file, file format conversions, upload from one drive vs sharepoint,...), nothing seems to work. When I look at tests of the "Upload a file or an image" step specifically, the input always looks like this:
{
"$content-type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"$content": "UEsDBBQABgAIAAAAIwvX3JlbHMvaXRlbTMueG1sLnJlbHNQSwUGAAAAABUAFQB7BQAA3UkAAAAA"
}
(I have shortened the "$content" here, since it is huge)
but then the output looks like this, no matter how I try to do it:
{
"statusCode": 204,
"headers": {
"Cache-Control": "no-cache",
"Set-Cookie": "<redacted>",
"x-ms-service-request-id": "<redacted>",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"REQ_ID": "<redacted>",
"CRM.ServiceId": "CRMAppPool",
"AuthActivityId": "<redacted>",
"x-ms-dop-hint": "<redacted>",
"x-ms-ratelimit-time-remaining-xrm-requests": "<redacted>",
"x-ms-ratelimit-burst-remaining-xrm-requests": "<redacted>",
"mise-correlation-id": "<redacted>",
"OData-Version": "4.0",
"X-Source": "<redacted>",
"Public": "OPTIONS,GET,HEAD,POST",
"Date": "Tue, 03 Dec 2024 15:29:59 GMT",
"Allow": "OPTIONS,GET,HEAD,POST",
"Content-Type": "text/html; charset=utf-8",
"Expires": "-1",
"Content-Length": "0"
}
}
(redacted some code here I wasn't it was safe to share)
So it looks like something is going in but then nothing is going out...