Hello!
I am running into an issue creating a custom connector that will upload a pdf file to box folder. I am configuring the custom connector with the BOX Upload API. I have postman setup properly to upload file but when I import them to custom connector it does not configure properly. Below is working postman command that uploads file to box.
The BOX Upload API uses a post with the body in form-data and two keys, the attributes key and file key. The attributes key has the file attribute, like file name, what box folderid to put the file in, etc. I am having a hard time building this part out in custom connectors.
Has anybody here have any success or have done any box custom connector using upload api? Would appreciate some insights, thanks!
Solved! Go to Solution.
Solved! This is formatting on the API. Once formatted correctly, box was able to handle request.
Might be making some advancements...but think multipart section might be some formatting issue? Errored is NotFound and output was 404.
Some more progress, the response is a 400, "API upload did not contain a file part" So I know its a formatting issue.
My flow details look like this:
The raw request:
{
"host": {
"connectionReferenceName": "shared_box-20upload--",
"operationId": "Uploadfile"
},
"parameters": {
"Content-Type": "multipart/form-data;boundary=WebKitFormBoundary7MA4YWxkTrZu0gW",
"body/$multipart": [
{
"headers/Content-Disposition": "form-data; name=\"attributes\"",
"value": "{\n \"name\": \"test11.pdf\",\n \"parent\": {\n \"id\": \"142982795411\"\n }\n}"
},
{
"headers/Content-Disposition": "form-data; name=\"file\", filename=\"\"",
"value": {
"@odata.type": "#microsoft.graph.fileAttachment",
"id": "AAMkADExNjVhMzg0LWQyMTEtNDNkYi05YWE3LTYwMDk1OGE1YTJmYQBGAAAAAAAbdnwb3G2yR7Pj0aWJn6DTBwBfi9w1M-rwRqySYi6aOKx_AAUvV8t_AABfi9w1M-rwRqySYi6aOKx_AAUzpl0KAAABEgAQACiSHdJ6iRlHqkaX5_xdF3k=",
"lastModifiedDateTime": "2021-12-01T20:58:43+00:00",
"name": "Order_7357678#en-US_Ordered_PacificStandardTime.pdf",
"contentType": "application/pdf",
"size": 102452,
"isInline": false,
"contentBytes": "JVBERi0xLjQ-----etc"
}
}
]
}
}
Solved! This is formatting on the API. Once formatted correctly, box was able to handle request.
How did you solve it? Running into same issue.
@Shimoyama we got it to work with this:
where "Outputs" in the body is:
binary({"name":"filename","parent":{"id":"folder"}}
Please tell me all the steps to create the flow.
I still get the error.
First dynamic input is the filename and varfolder is the folder ID.
The body of the above is:
{
"grant_type": "client_credentials",
"client_id": "",
"client_secret": "",
"box_subject_type": "enterprise",
"box_subject_id": "",
"scope": "root_readwrite"
}
fill in your own client id, client secret and box id.
Then compose using binary of the varBinaryCode.
Full json above:
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
3 | |
2 | |
2 | |
1 | |
1 |
User | Count |
---|---|
5 | |
3 | |
3 | |
2 | |
2 |