However, when handling files, I have tried the following, and none of it is working:
// This one gives the error that string cannot be matched to HubDB.File
client.cms.hubdb.rowsApi.createTableRow("id", {
values: {
file: file.id,
}
});
// This one also gives the error that string cannot be matched to HubDB.File
client.cms.hubdb.rowsApi.createTableRow("id", {
values: {
file: file.url,
}
});
// This one gives the error that object cannot be matched to HubDB.File
client.cms.hubdb.rowsApi.createTableRow("id", {
values: {
file: {
id: file.id
},
}
});
Can anyone please provide some help regarding linking the file.
The file.id and file.url is directly from Hubspot after uploading the file.
@LRomier - I'm not sure I have the solution here, but as you probably know, uploaded files from forms and attchements to emails are treated in a somwhat special way by the Files API. It's worth checking that:
- You have the right API scopes switched on to access this sort of file - including 'forms-uploaded-files'
- That the files are not set to Private (which seems the default). The API gives you an unhelpful 404 error for files that are set this way.
@LRomier - I'm not sure I have the solution here, but as you probably know, uploaded files from forms and attchements to emails are treated in a somwhat special way by the Files API. It's worth checking that:
- You have the right API scopes switched on to access this sort of file - including 'forms-uploaded-files'
- That the files are not set to Private (which seems the default). The API gives you an unhelpful 404 error for files that are set this way.