I created a Power Automate flow where the flow is triggered when an email message comes into my inbox with an attachment. I'm then making an HTTP request forEach Attachment, where the message is being added to a table and passing the Message ID, attachment content and the Attachment Name. If I test and skip the attachment, the API does create a record with a status code of 200, but when I try to pass the attachment, I get a multi-status 207 code and the record is not created. The error reads "Can not find file attachment content for field with ID '6'." 6 being the field ID of the attachment field in my table. Here's the HTTP request I'm making in Power Automate:
Method: POST,
URI: https://api.quickbase.com/v1/records,
headers = {
'
QB-Realm-Hostname': '[MY_REALM].quickbase.com',
'User-Agent': '{User-Agent}',
'Authorization': 'QB-USER-TOKEN [MY_QB_USER_TOKEN]',
'Content-Type': 'application/json'
},
{
"to": "[MY_TABLE_ID]",
"data": [
{
"6": {
"value": "@{items('For_Each_Attachment')?['contentBytes']}"
},
"8": {
"value": "@{triggerOutputs()?['body/subject']}"
},
"9": {
"value": "@{triggerOutputs()?['body/id']}"
},
"17": {
"value": "@{items('For_Each_Attachment')?['name']}"
}
}
],
"fieldsToReturn": [
6,
8,
9,
17
]
}
Like I said, this works fine in Power Automate when I don't include the attachment. It's when I include the attachment that I'm getting the error message from Quick Base. I get this when I test the POST request on the Quick Base RESTful API page and in Power Automate so I do know that this is a QB error I'm getting. Anyone else experience this as well? Maybe I'm missing something in the documentation. Thanks!
------------------------------
AR
------------------------------