<?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: Invoke an external GET API and store the data retrieved from API in HubSpot HubDB in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Invoke-an-external-GET-API-and-store-the-data-retrieved-from-API/m-p/665409#M54832</link>
    <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/101258"&gt;@Teun&lt;/a&gt; , looks like you might be on to something there &lt;span class="lia-unicode-emoji" title=":eyes:"&gt;👀&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I also found this &lt;A href="https://github.com/HubSpot/hubspot-api-nodejs/issues/125#issuecomment-1144398539" target="_blank" rel="noopener"&gt;issue&lt;/A&gt; indicating the same.&amp;nbsp; Will work to get this corrected.&lt;/P&gt;</description>
    <pubDate>Thu, 14 Jul 2022 17:30:07 GMT</pubDate>
    <dc:creator>dennisedson</dc:creator>
    <dc:date>2022-07-14T17:30:07Z</dc:date>
    <item>
      <title>Invoke an external GET API and store the data retrieved from API in HubSpot HubDB</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Invoke-an-external-GET-API-and-store-the-data-retrieved-from-API/m-p/660296#M54621</link>
      <description>&lt;P&gt;Hello, I'm a newbie to HubSpot and need to implement a usecase wherein I need to pull some data from a third party API in HubSpot and store the same in the HubDB in some custom table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any leads on how this can be done would be really helpful to start with.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2022 18:13:17 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Invoke-an-external-GET-API-and-store-the-data-retrieved-from-API/m-p/660296#M54621</guid>
      <dc:creator>SHarde</dc:creator>
      <dc:date>2022-07-05T18:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: Invoke an external GET API and store the data retrieved from API in HubSpot HubDB</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Invoke-an-external-GET-API-and-store-the-data-retrieved-from-API/m-p/662894#M54695</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/412696"&gt;@SHarde&lt;/a&gt; !&amp;nbsp; Welcome to the world of HubSpot!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I cannot speak to the third party data and how you will retrieve it, but on the HubSpot side, you will need to create a HubDB table and then update the table with your data.&amp;nbsp; The information on the &lt;A href="https://developers.hubspot.com/docs/api/cms/hubdb" target="_blank" rel="noopener"&gt;HubDB API is available here&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/166093"&gt;@miljkovicmisa&lt;/a&gt; might be able to assist with more if you provide more details about the setup &lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2022 15:00:10 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Invoke-an-external-GET-API-and-store-the-data-retrieved-from-API/m-p/662894#M54695</guid>
      <dc:creator>dennisedson</dc:creator>
      <dc:date>2022-07-11T15:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: Invoke an external GET API and store the data retrieved from API in HubSpot HubDB</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Invoke-an-external-GET-API-and-store-the-data-retrieved-from-API/m-p/664364#M54775</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/13982"&gt;@dennisedson&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your response!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me provide you some details on the use case I'm wokring on. Here are steps I need to implement:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Call an external API from HubSpot to import data.&lt;/LI&gt;&lt;LI&gt;Store the data retrieved from the API in HubSpot database.&lt;/LI&gt;&lt;LI&gt;Use the stored data to generate reports.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Approach taken for implementation:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Created a Workflow with Custom Code Action&lt;/LI&gt;&lt;LI&gt;Working on implementing above mentioned steps(#1 and #2) in Custom Code Action&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Prerequisite for Workflow-Custom Code Action:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Public API available for importing data in HubSpot&amp;nbsp;&lt;UL&gt;&lt;LI&gt;Test API to import data:&amp;nbsp;&lt;A href="https://jsonplaceholder.typicode.com/todos/1" target="_blank" rel="noopener"&gt;https://jsonplaceholder.typicode.com/todos/1&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;API response:&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;{
  "userId": 1,
  "id": 1,
  "title": "delectus aut autem",
  "completed": false
}&lt;/PRE&gt;&lt;UL&gt;&lt;LI&gt;Create table(test_table) in HubDb to store the data in following columns:&amp;nbsp;&lt;UL&gt;&lt;LI&gt;id&lt;/LI&gt;&lt;LI&gt;userId&lt;/LI&gt;&lt;LI&gt;title&lt;/LI&gt;&lt;LI&gt;completed&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Current status:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I'm able to invoke the test API from Workflow and import data in HubSpot&lt;/LI&gt;&lt;LI&gt;Implemented a code snippet to store data to HubDB as follows as per endpoints exposed here to add a new row to table:&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/api/cms/hubdb" target="_blank" rel="noopener"&gt;https://developers.hubspot.com/docs/api/cms/hubdb&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;Endpoint used:&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;Add a new row to a table&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;POST -- /cms/v3/hubdb/tables/{tableIdOrName}/rows&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;Code snippet:&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;const hubspot = require('@hubspot/api-client');&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;exports.main = async (event, callback) =&amp;gt; {&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;const &lt;STRONG&gt;hubspotClient&lt;/STRONG&gt; = new hubspot.Client({&lt;BR /&gt;apiKey: process.env.HAPIKEY&lt;BR /&gt;});&lt;BR /&gt;&lt;BR /&gt;const &lt;STRONG&gt;values&lt;/STRONG&gt; = {&lt;BR /&gt;"id": "11",&lt;BR /&gt;"userId": "14",&lt;BR /&gt;"title": "Test new row",&lt;BR /&gt;"completed": "false",&lt;BR /&gt;};&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;const &lt;STRONG&gt;HubDbTableRowV3Request&lt;/STRONG&gt; = { path: "test_path", name: "test_title", values };&lt;BR /&gt;const tableIdOrName = "test_table";&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;try {&lt;BR /&gt;const apiResponse = await &lt;STRONG&gt;hubspotClient.cms.hubdb.rows.rowsApi.createTableRow(tableIdOrName, HubDbTableRowV3Request);&lt;/STRONG&gt;&lt;BR /&gt;console.log(JSON.stringify(apiResponse.body, null, 2));&lt;BR /&gt;} catch (e) {&lt;BR /&gt;e.message === 'HTTP request failed' ? console.error(JSON.stringify(e.response, null, 2)) : console.error(e)&lt;BR /&gt;}&lt;BR /&gt;};&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Facing following issue while storing the data:&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;2022-07-13T11:12:03.646Z	ERROR	TypeError: Cannot read property 'rowsApi' of undefined
    at Object.exports.main (/var/task/file.js:20:58)
    at Runtime.exports.hubspot_handler [as handler] (/var/task/hubspotHandler.js:6:21)
    at Runtime.handleOnce (/var/runtime/Runtime.js:66:25)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know your thoughts on the approach and resolution to the issue I'm facing while storing data to HubDb.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any leads on this would be helpful to move ahead! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Swapnil&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 17:05:04 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Invoke-an-external-GET-API-and-store-the-data-retrieved-from-API/m-p/664364#M54775</guid>
      <dc:creator>SHarde</dc:creator>
      <dc:date>2022-07-14T17:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: Invoke an external GET API and store the data retrieved from API in HubSpot HubDB</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Invoke-an-external-GET-API-and-store-the-data-retrieved-from-API/m-p/664997#M54798</link>
      <description>&lt;P&gt;&lt;A href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/166093" target="_blank"&gt;@miljkovicmisa&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp; -- Could you please help with the inline issue?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 06:51:18 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Invoke-an-external-GET-API-and-store-the-data-retrieved-from-API/m-p/664997#M54798</guid>
      <dc:creator>SHarde</dc:creator>
      <dc:date>2022-07-14T06:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: Invoke an external GET API and store the data retrieved from API in HubSpot HubDB</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Invoke-an-external-GET-API-and-store-the-data-retrieved-from-API/m-p/665171#M54811</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/101258"&gt;@Teun&lt;/a&gt; , perhaps you have some thoughts &lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 13:26:28 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Invoke-an-external-GET-API-and-store-the-data-retrieved-from-API/m-p/665171#M54811</guid>
      <dc:creator>dennisedson</dc:creator>
      <dc:date>2022-07-14T13:26:28Z</dc:date>
    </item>
    <item>
      <title>Re: Invoke an external GET API and store the data retrieved from API in HubSpot HubDB</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Invoke-an-external-GET-API-and-store-the-data-retrieved-from-API/m-p/665398#M54829</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/412696"&gt;@SHarde&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This might be a bug with the HubSpot NodeJS library or a mistake in the docs, cause if I check the example of the docs, your code should be correct.&lt;/P&gt;
&lt;P&gt;However, the error indicates that&amp;nbsp;hubspotClient.cms.hubdb.&lt;STRONG&gt;rows&amp;nbsp;&lt;/STRONG&gt;is undefined, which is odd, cause this is the same in the docs. But if I check the &lt;A href="https://github.com/HubSpot/hubspot-api-nodejs/tree/master/src/discovery/cms" target="_blank" rel="noopener"&gt;github&lt;/A&gt;, I think it should be:&amp;nbsp;&lt;STRONG&gt;hubspotClient.cms.hubdb.rowsApi.createTableRow(tableIdOrName, HubDbTableRowV3Request);&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 17:19:33 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Invoke-an-external-GET-API-and-store-the-data-retrieved-from-API/m-p/665398#M54829</guid>
      <dc:creator>Teun</dc:creator>
      <dc:date>2022-07-14T17:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: Invoke an external GET API and store the data retrieved from API in HubSpot HubDB</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Invoke-an-external-GET-API-and-store-the-data-retrieved-from-API/m-p/665407#M54831</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/101258"&gt;@Teun&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your inputs. I'm able to get past the issue. But I'm facing another issue as follows:&amp;nbsp;&lt;/P&gt;&lt;P&gt;API used:&amp;nbsp;&lt;STRONG&gt;hubspotClient.cms.hubdb.rowsApi.createTableRow(tableIdOrName, HubDbTableRowV3Request);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Issue:&lt;/P&gt;&lt;PRE&gt;2022-07-14T17:22:27.961Z	ERROR	{
  "statusCode": 401,
  "body": {
    "status": "error",
    "message": "Authentication credentials not found. This API supports both API Key and OAuth 2.0 authentication and you can find more details at https://developers.hubspot.com/docs/methods/auth/oauth-overview",
    "correlationId": "ac67f190-a273-49dd-8839-df0d28fd7554",
    "category": "INVALID_AUTHENTICATION"
  },
  "headers": {
    "date": "Thu, 14 Jul 2022 17:22:27 GMT",
    "content-type": "application/json;charset=utf-8",
    "content-length": "316",
    "connection": "close",
    "cf-ray": "72abf0cc080559fd-IAD",
    "strict-transport-security": "max-age=31536000; includeSubDomains; preload",
    "vary": "Accept-Encoding",
    "cf-cache-status": "DYNAMIC",
    "access-control-allow-credentials": "true",
    "access-control-allow-headers": "Origin, X-Requested-With, Content-Type, Accept, Accept-Charset, Accept-Encoding",
    "access-control-allow-methods": "GET",
    "expect-ct": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"",
    "x-hubspot-correlation-id": "ac67f190-a273-49dd-8839-df0d28fd7554",
    "x-trace": "2B05231134A56B035C6EA68FDFF584F7E366CB8AC0000000000000000000",
    "report-to": "{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=bjYHRlpWhmWyODzqB9%2FIKXzvdDqlKOmjeqG0m1bowFsfpjf8CH9oeV4hukYn6sxpKdOJpk3qN1cz1xiQvVF4ZX%2F30Ryj59sRbPsSXB5IVAnif43xLJ8aYPoiCVd%2BF3mR\"}],\"group\":\"cf-nel\",\"max_age\":604800}",
    "nel": "{\"success_fraction\":0.01,\"report_to\":\"cf-nel\",\"max_age\":604800}",
    "server": "cloudflare",
    "alt-svc": "h3=\":443\"; ma=86400, h3-29=\":443\"; ma=86400"
  },
  "request": {
    "uri": {
      "protocol": "https:",
      "slashes": true,
      "auth": null,
      "host": "api.hubapi.com",
      "port": 443,
      "hostname": "api.hubapi.com",
      "hash": null,
      "search": null,
      "query": null,
      "pathname": "/cms/v3/hubdb/tables/test_table/rows",
      "path": "/cms/v3/hubdb/tables/test_table/rows",
      "href": "https://api.hubapi.com/cms/v3/hubdb/tables/test_table/rows"
    },
    "method": "POST",
    "headers": {
      "User-Agent": "hubspot-api-client-nodejs; 3.4.1",
      "Accept": "application/json",
      "content-type": "application/json",
      "content-length": 118
    }
  }
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Please let me know if I'm missing on something or how can I provide the required authentication credentials here.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 17:30:29 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Invoke-an-external-GET-API-and-store-the-data-retrieved-from-API/m-p/665407#M54831</guid>
      <dc:creator>SHarde</dc:creator>
      <dc:date>2022-07-14T17:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: Invoke an external GET API and store the data retrieved from API in HubSpot HubDB</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Invoke-an-external-GET-API-and-store-the-data-retrieved-from-API/m-p/665409#M54832</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/101258"&gt;@Teun&lt;/a&gt; , looks like you might be on to something there &lt;span class="lia-unicode-emoji" title=":eyes:"&gt;👀&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I also found this &lt;A href="https://github.com/HubSpot/hubspot-api-nodejs/issues/125#issuecomment-1144398539" target="_blank" rel="noopener"&gt;issue&lt;/A&gt; indicating the same.&amp;nbsp; Will work to get this corrected.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 17:30:07 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Invoke-an-external-GET-API-and-store-the-data-retrieved-from-API/m-p/665409#M54832</guid>
      <dc:creator>dennisedson</dc:creator>
      <dc:date>2022-07-14T17:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: Invoke an external GET API and store the data retrieved from API in HubSpot HubDB</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Invoke-an-external-GET-API-and-store-the-data-retrieved-from-API/m-p/665443#M54837</link>
      <description>&lt;P&gt;I made this mistake many many times.&lt;/P&gt;
&lt;P&gt;Your custom coded action is probably missing the &lt;A href="https://developers.hubspot.com/docs/api/workflows/custom-code-actions#secret" target="_blank" rel="noopener"&gt;secret&lt;/A&gt;. Is HAPIKEY set as a secret in your coded action?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;P.s. I would advise moving to private apps instead as API keys will be sunset in November this year.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 18:05:34 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Invoke-an-external-GET-API-and-store-the-data-retrieved-from-API/m-p/665443#M54837</guid>
      <dc:creator>Teun</dc:creator>
      <dc:date>2022-07-14T18:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: Invoke an external GET API and store the data retrieved from API in HubSpot HubDB</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Invoke-an-external-GET-API-and-store-the-data-retrieved-from-API/m-p/665454#M54838</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/101258"&gt;@Teun&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Adding the HAPIKEY to the Secret worked perfectly for me. I'm able to POST the data to HubDB.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the suggesstion on creating apps, could you please guide me on how it will help me implementing the usecase that I'm working on.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Swapnil&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 18:12:19 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Invoke-an-external-GET-API-and-store-the-data-retrieved-from-API/m-p/665454#M54838</guid>
      <dc:creator>SHarde</dc:creator>
      <dc:date>2022-07-14T18:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: Invoke an external GET API and store the data retrieved from API in HubSpot HubDB</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Invoke-an-external-GET-API-and-store-the-data-retrieved-from-API/m-p/665480#M54840</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/412696"&gt;@SHarde&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Awesome. This &lt;A href="https://developers.hubspot.com/docs/api/migrate-an-api-key-integration-to-a-private-app" target="_blank" rel="noopener"&gt;doc&lt;/A&gt; describes exactly how to migrate to a private app. Make sure to update your code with this line:&lt;/P&gt;
&lt;P&gt;const hubspotClient = new hubspot.Client({ accessToken: YOUR_ACCESS_TOKEN });&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 18:40:02 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Invoke-an-external-GET-API-and-store-the-data-retrieved-from-API/m-p/665480#M54840</guid>
      <dc:creator>Teun</dc:creator>
      <dc:date>2022-07-14T18:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: Invoke an external GET API and store the data retrieved from API in HubSpot HubDB</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Invoke-an-external-GET-API-and-store-the-data-retrieved-from-API/m-p/665495#M54841</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/101258"&gt;@Teun&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was able to locate the documentation of migrating to private app and tried out the approach suggested in there. I was able to get the Custom Code action working with the Access token instead of API KEY.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pre-requisite: Create a private app with your deveopers HubSpot account&lt;/P&gt;&lt;P&gt;1. Go to Settings --&amp;gt; Integrations --&amp;gt; Private Apps&lt;/P&gt;&lt;P&gt;2. Create Private App&lt;/P&gt;&lt;P&gt;3. Provide the name to the App&lt;/P&gt;&lt;P&gt;4. Add the modules (for ex., hubdb, contacts, deals, etc.) as required&lt;/P&gt;&lt;P&gt;5. Create app&lt;/P&gt;&lt;P&gt;6. You should be able to find your access token in the app which you can add as Secret in Custom Code Action instead of API KEY&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the final code snippet which could help someone else as well:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;const hubspot = require('@hubspot/api-client');&lt;/P&gt;&lt;P&gt;exports.main = async (event, callback) =&amp;gt; {&lt;/P&gt;&lt;P&gt;const hubspotClient = new hubspot.Client({&lt;BR /&gt;accessToken: process.env.ACCESSTOKEN&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;// Make sure&amp;nbsp;ACCESSTOKEN is added in SecretKey&lt;BR /&gt;&lt;BR /&gt;const values = {&lt;/P&gt;&lt;P&gt;"id":"3",&lt;BR /&gt;"userid": "16",&lt;BR /&gt;"title": "Test new row",&lt;BR /&gt;"completed": "true",&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;const HubDbTableRowV3Request = { path: "test_path11", name: "test_title11", values };&lt;BR /&gt;const tableIdOrName = "test_table";&lt;/P&gt;&lt;P&gt;try {&lt;BR /&gt;const apiResponse = await hubspotClient.cms.hubdb.rowsApi.createTableRow(tableIdOrName, HubDbTableRowV3Request);&lt;BR /&gt;console.log(JSON.stringify(apiResponse.body, null, 2));&lt;BR /&gt;} catch (e) {&lt;BR /&gt;e.message === 'HTTP request failed' ? console.error(JSON.stringify(e.response, null, 2)) : console.error(e)&lt;BR /&gt;}&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much on working this with me and taking this to resolution. I really appreciate it. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a great day ahead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;BR /&gt;Swapnil&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 19:02:44 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Invoke-an-external-GET-API-and-store-the-data-retrieved-from-API/m-p/665495#M54841</guid>
      <dc:creator>SHarde</dc:creator>
      <dc:date>2022-07-14T19:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: Invoke an external GET API and store the data retrieved from API in HubSpot HubDB</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Invoke-an-external-GET-API-and-store-the-data-retrieved-from-API/m-p/748605#M60879</link>
      <description>&lt;P&gt;Huge help, Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 01:05:24 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Invoke-an-external-GET-API-and-store-the-data-retrieved-from-API/m-p/748605#M60879</guid>
      <dc:creator>GaryMedina</dc:creator>
      <dc:date>2023-01-30T01:05:24Z</dc:date>
    </item>
  </channel>
</rss>

