Jan 10, 20228:15 AM - edited Jan 11, 20222:38 AM
Member
How to set HubDB image value through API?
SOLVE
There is no documentation about how to set a image cell value through the HubDB API.
I managed to upload the file to the file manager and get its ID and URL.
But now I don't know how to use that into HubDB.
I tried many things, none worked.
I tried: a STRING url, it gives me
[message] => error when updating datatable row 63392861046 in table 5315761 for portal 3077106: the value {type=string, value=} for column image was of type STRING, but we're expecting MAP
Then I tried with [ type => image, value => http:// ] and many other combinations using both url, path, and ID.
In addition to width and height, a type key with a value of image is also needed. For example if you're using JSON, here is a valid image object you can post with the API:
In addition to width and height, a type key with a value of image is also needed. For example if you're using JSON, here is a valid image object you can post with the API:
With an image column type you can just insert an image using the normal Hubspot image selector when editing the HubDB
Alternatively, if you want to point to a URL where an image is hosted instead of selecting one of your own images, use the URL column type and add the full address e.g. https://via.placeholder.com/350x150