<?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 Good resource for writing programmable automation in workflows? in Data Hub</title>
    <link>https://community.hubspot.com/t5/Data-Hub/Good-resource-for-writing-programmable-automation-in-workflows/m-p/655222#M930</link>
    <description>&lt;P&gt;Hi, my company just upgraded to Operations Hub Pro for programmable automation. Generically, I would really like a resource where I can look up what functions are available to me in the&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/63720"&gt;@hubspot&lt;/a&gt;/api-client npm library. In node docs, they have some examples but also just link to the generic hubspot api docs: &lt;A href="https://developers.hubspot.com/docs/api/overview" target="_blank" rel="noopener"&gt;https://developers.hubspot.com/docs/api/overview&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The specific thing I'm trying to figure out, is how to search through a custom object and find one that matches the "name" property. I understand how I could do this for contacts, deals, or companies, but not for my "brands" custom object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anybody know of a good resource for seeing all available functions for hubspotClient (shown below)? Secondarily, is there a better environment for writing code for Custom Code actions in workflows that maybe has autocompletion?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;const hubspotClient = new hubspot.Client({&lt;BR /&gt;&amp;nbsp; &amp;nbsp; apiKey: process.env.HAPIKEY&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;hubspotClient.crm.customObject.search(searchParams) &amp;lt;- Something like this&lt;/P&gt;</description>
    <pubDate>Fri, 24 Jun 2022 18:01:33 GMT</pubDate>
    <dc:creator>ToddSutt</dc:creator>
    <dc:date>2022-06-24T18:01:33Z</dc:date>
    <item>
      <title>Good resource for writing programmable automation in workflows?</title>
      <link>https://community.hubspot.com/t5/Data-Hub/Good-resource-for-writing-programmable-automation-in-workflows/m-p/655222#M930</link>
      <description>&lt;P&gt;Hi, my company just upgraded to Operations Hub Pro for programmable automation. Generically, I would really like a resource where I can look up what functions are available to me in the&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/63720"&gt;@hubspot&lt;/a&gt;/api-client npm library. In node docs, they have some examples but also just link to the generic hubspot api docs: &lt;A href="https://developers.hubspot.com/docs/api/overview" target="_blank" rel="noopener"&gt;https://developers.hubspot.com/docs/api/overview&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The specific thing I'm trying to figure out, is how to search through a custom object and find one that matches the "name" property. I understand how I could do this for contacts, deals, or companies, but not for my "brands" custom object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anybody know of a good resource for seeing all available functions for hubspotClient (shown below)? Secondarily, is there a better environment for writing code for Custom Code actions in workflows that maybe has autocompletion?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;const hubspotClient = new hubspot.Client({&lt;BR /&gt;&amp;nbsp; &amp;nbsp; apiKey: process.env.HAPIKEY&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;hubspotClient.crm.customObject.search(searchParams) &amp;lt;- Something like this&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2022 18:01:33 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/Good-resource-for-writing-programmable-automation-in-workflows/m-p/655222#M930</guid>
      <dc:creator>ToddSutt</dc:creator>
      <dc:date>2022-06-24T18:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: Good resource for writing programmable automation in workflows?</title>
      <link>https://community.hubspot.com/t5/Data-Hub/Good-resource-for-writing-programmable-automation-in-workflows/m-p/828057#M1674</link>
      <description>&lt;DIV class=""&gt;For searching through a custom object like "brands", you can utilize the &lt;STRONG&gt;searchApi&lt;/STRONG&gt; function from the &lt;STRONG&gt;crm.objects&lt;/STRONG&gt; module of the HubSpot API. This function allows you to provide a set of search parameters and retrieve custom objects that match these criteria directly, without needing to retrieve all objects and filter them afterwards.&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;A generic example would look something like this:&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;async function searchCustomObjects() {&lt;/DIV&gt;&lt;DIV class=""&gt;const hubspot = require('@hubspot/api-client');&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;const hubspotClient = new hubspot.Client({&lt;/DIV&gt;&lt;DIV class=""&gt;accessToken: '&lt;STRONG&gt;YOUR_API_KEY&lt;/STRONG&gt;'&lt;/DIV&gt;&lt;DIV class=""&gt;});&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;const objectType = "&lt;STRONG&gt;Custom_Object_Internal_Name&lt;/STRONG&gt;";&lt;/DIV&gt;&lt;DIV class=""&gt;const searchParams = {&lt;/DIV&gt;&lt;DIV class=""&gt;filterGroups: [{&lt;/DIV&gt;&lt;DIV class=""&gt;filters: [{&lt;/DIV&gt;&lt;DIV class=""&gt;value: 'Test 1',&lt;/DIV&gt;&lt;DIV class=""&gt;propertyName: '&lt;STRONG&gt;Custom_Object_Property&lt;/STRONG&gt;',&lt;/DIV&gt;&lt;DIV class=""&gt;operator: 'EQ'&lt;/DIV&gt;&lt;DIV class=""&gt;}]&lt;/DIV&gt;&lt;DIV class=""&gt;}],&lt;/DIV&gt;&lt;DIV class=""&gt;sorts: [],&lt;/DIV&gt;&lt;DIV class=""&gt;properties: ['brand_name'],&lt;/DIV&gt;&lt;DIV class=""&gt;limit: 10,&lt;/DIV&gt;&lt;DIV class=""&gt;after: 0&lt;/DIV&gt;&lt;DIV class=""&gt;};&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;try {&lt;/DIV&gt;&lt;DIV class=""&gt;const apiResponse = await hubspotClient.crm.objects.searchApi.doSearch(objectType, searchParams);&lt;/DIV&gt;&lt;DIV class=""&gt;console.log(apiResponse.results);&lt;/DIV&gt;&lt;DIV class=""&gt;} catch (e) {&lt;/DIV&gt;&lt;DIV class=""&gt;console.error(e);&lt;/DIV&gt;&lt;DIV class=""&gt;}&lt;/DIV&gt;&lt;DIV class=""&gt;}&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;searchCustomObjects();&lt;/DIV&gt;</description>
      <pubDate>Thu, 10 Aug 2023 16:44:26 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/Good-resource-for-writing-programmable-automation-in-workflows/m-p/828057#M1674</guid>
      <dc:creator>Fahadwaseem</dc:creator>
      <dc:date>2023-08-10T16:44:26Z</dc:date>
    </item>
  </channel>
</rss>

