<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Linking an uploaded file in HubDB in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Linking-an-uploaded-file-in-HubDB/m-p/1123030#M80899</link>
    <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/915485"&gt;@LRomier&lt;/a&gt;&amp;nbsp;- 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:&lt;/P&gt;
&lt;P&gt;- You have the right API scopes switched on to access this sort of file - including 'forms-uploaded-files'&lt;/P&gt;
&lt;P&gt;- 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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Steve&lt;/P&gt;</description>
    <pubDate>Mon, 17 Mar 2025 01:28:02 GMT</pubDate>
    <dc:creator>SteveHTM</dc:creator>
    <dc:date>2025-03-17T01:28:02Z</dc:date>
    <item>
      <title>Linking an uploaded file in HubDB</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Linking-an-uploaded-file-in-HubDB/m-p/1122868#M80893</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a HubDB row with a previously uploaded file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, the documentation (&lt;A href="https://developers.hubspot.com/docs/guides/api/cms/hubdb#add-table-rows" target="_blank"&gt;https://developers.hubspot.com/docs/guides/api/cms/hubdb#add-table-rows&lt;/A&gt;) contains many use cases except files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This code snippet is working:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;client.cms.hubdb.rowsApi.createTableRow("id", {
    values: {
        name: "Dave",
    }
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when handling files, I have tried the following, and none of it is working:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// 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
        },
    }
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone please provide some help regarding linking the file.&lt;/P&gt;&lt;P&gt;The file.id and file.url is directly from Hubspot after uploading the file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you and best regards&lt;/P&gt;</description>
      <pubDate>Sun, 16 Mar 2025 09:14:54 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Linking-an-uploaded-file-in-HubDB/m-p/1122868#M80893</guid>
      <dc:creator>LRomier</dc:creator>
      <dc:date>2025-03-16T09:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Linking an uploaded file in HubDB</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Linking-an-uploaded-file-in-HubDB/m-p/1123030#M80899</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/915485"&gt;@LRomier&lt;/a&gt;&amp;nbsp;- 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:&lt;/P&gt;
&lt;P&gt;- You have the right API scopes switched on to access this sort of file - including 'forms-uploaded-files'&lt;/P&gt;
&lt;P&gt;- 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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Steve&lt;/P&gt;</description>
      <pubDate>Mon, 17 Mar 2025 01:28:02 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Linking-an-uploaded-file-in-HubDB/m-p/1123030#M80899</guid>
      <dc:creator>SteveHTM</dc:creator>
      <dc:date>2025-03-17T01:28:02Z</dc:date>
    </item>
  </channel>
</rss>

