<?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: Error is custom code in Automation in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Error-is-custom-code-in-Automation/m-p/997247#M74574</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your fast response and assistance. &amp;nbsp;I made the change, unfortunately it is still throwing an error and not populating the data back into Hubspot. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did I used the Private App/Token correctly where the Secret "HAPIKey" is the Token from the private app.:&lt;/P&gt;&lt;P&gt;"//2. &lt;EM&gt;Create our client&lt;/EM&gt;&lt;BR /&gt;const hubspotClient = new hubspot.Client({&lt;BR /&gt;accessToken: process.env.HAPIKEY // &lt;EM&gt;Reference our Private App Token - this should have been added as a secret&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I see a yellow highlight with a message for line of code: exports.main = (event, callback) =&amp;gt; { &amp;nbsp;with the message 'Callback' is defined but never used. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the verbiage from the Logs:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;WARNING: The logs for this function have exceeded the 4KB limit.
...
2-4631-8e1c-d1b75bdc5730\"}","Headers: {\"access-control-allow-credentials\":\"false\",\"cf-cache-status\":\"DYNAMIC\",\"cf-ray\":\"8997aed16e9757be-IAD\",\"connection\":\"keep-alive\",\"content-length\":\"123\",\"content-type\":\"application/json;charset=utf-8\",\"date\":\"Tue, 25 Jun 2024 20:24:45 GMT\",\"nel\":\"{\\\"success_fraction\\\":0.01,\\\"report_to\\\":\\\"cf-nel\\\",\\\"max_age\\\":604800}\",\"report-to\":\"{\\\"endpoints\\\":[{\\\"url\\\":\\\"https:\\\\/\\\\/a.nel.cloudflare.com\\\\/report\\\\/v4?s=dlwUzWMg%2BEgHWkGwCgBXG%2BsZr9bfWgU3BxWUs%2Fg1WQHaBHkCpaswB%2B32YAwXfJq%2F8YELdAfog%2By2kS3G4toOlN%2BQcgfLrjA9wZrAtUjxS6LrUYYEMW9vYIZVHKms%2B1zp\\\"}],\\\"group\\\":\\\"cf-nel\\\",\\\"max_age\\\":604800}\",\"server\":\"cloudflare\",\"strict-transport-security\":\"max-age=31536000; includeSubDomains; preload\",\"vary\":\"origin, Accept-Encoding\",\"x-content-type-options\":\"nosniff\",\"x-envoy-upstream-service-time\":\"85\",\"x-evy-trace-listener\":\"listener_https\",\"x-evy-trace-route-configuration\":\"listener_https/all\",\"x-evy-trace-route-service-name\":\"envoyset-translator\",\"x-evy-trace-served-by-pod\":\"iad02/hubapi-td/envoy-proxy-7dd59b876-smxcv\",\"x-evy-trace-virtual-host\":\"all\",\"x-hubspot-correlation-id\":\"f8e0e34a-62e2-4631-8e1c-d1b75bdc5730\",\"x-hubspot-ratelimit-daily\":\"500000\",\"x-hubspot-ratelimit-daily-remaining\":\"499999\",\"x-request-id\":\"f8e0e34a-62e2-4631-8e1c-d1b75bdc5730\"}","    at SearchApiResponseProcessor.&amp;lt;anonymous&amp;gt; (/opt/nodejs/node_modules/@hubspot/api-client/lib/codegen/crm/contacts/apis/SearchApi.js:59:23)","    at Generator.next (&amp;lt;anonymous&amp;gt;)","    at fulfilled (/opt/nodejs/node_modules/@hubspot/api-client/lib/codegen/crm/contacts/apis/SearchApi.js:5:58)","    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"]},"promise":{},"stack":["Runtime.UnhandledPromiseRejection: Error: HTTP-Code: 400","Message: An error occurred.","Body: {\"status\":\"error\",\"message\":\"There was a problem with the request.\",\"correlationId\":\"f8e0e34a-62e2-4631-8e1c-d1b75bdc5730\"}","Headers: {\"access-control-allow-credentials\":\"false\",\"cf-cache-status\":\"DYNAMIC\",\"cf-ray\":\"8997aed16e9757be-IAD\",\"connection\":\"keep-alive\",\"content-length\":\"123\",\"content-type\":\"application/json;charset=utf-8\",\"date\":\"Tue, 25 Jun 2024 20:24:45 GMT\",\"nel\":\"{\\\"success_fraction\\\":0.01,\\\"report_to\\\":\\\"cf-nel\\\",\\\"max_age\\\":604800}\",\"report-to\":\"{\\\"endpoints\\\":[{\\\"url\\\":\\\"https:\\\\/\\\\/a.nel.cloudflare.com\\\\/report\\\\/v4?s=dlwUzWMg%2BEgHWkGwCgBXG%2BsZr9bfWgU3BxWUs%2Fg1WQHaBHkCpaswB%2B32YAwXfJq%2F8YELdAfog%2By2kS3G4toOlN%2BQcgfLrjA9wZrAtUjxS6LrUYYEMW9vYIZVHKms%2B1zp\\\"}],\\\"group\\\":\\\"cf-nel\\\",\\\"max_age\\\":604800}\",\"server\":\"cloudflare\",\"strict-transport-security\":\"max-age=31536000; includeSubDomains; preload\",\"vary\":\"origin, Accept-Encoding\",\"x-content-type-options\":\"nosniff\",\"x-envoy-upstream-service-time\":\"85\",\"x-evy-trace-listener\":\"listener_https\",\"x-evy-trace-route-configuration\":\"listener_https/all\",\"x-evy-trace-route-service-name\":\"envoyset-translator\",\"x-evy-trace-served-by-pod\":\"iad02/hubapi-td/envoy-proxy-7dd59b876-smxcv\",\"x-evy-trace-virtual-host\":\"all\",\"x-hubspot-correlation-id\":\"f8e0e34a-62e2-4631-8e1c-d1b75bdc5730\",\"x-hubspot-ratelimit-daily\":\"500000\",\"x-hubspot-ratelimit-daily-remaining\":\"499999\",\"x-request-id\":\"f8e0e34a-62e2-4631-8e1c-d1b75bdc5730\"}","    at process.&amp;lt;anonymous&amp;gt; (file:///var/runtime/index.mjs:1276:17)","    at process.emit (node:events:519:28)","    at emit (node:internal/process/promises:150:20)","    at processPromiseRejections (node:internal/process/promises:284:27)","    at process.processTicksAndRejections (node:internal/process/task_queues:96:32)"]}
Unknown application error occurred
Runtime.Unknown

Memory: 86/128 MB&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;PRE&gt;WARNING: The logs for this function have exceeded the 4KB limit.
...
2-4631-8e1c-d1b75bdc5730\"}","Headers: {\"access-control-allow-credentials\":\"false\",\"cf-cache-status\":\"DYNAMIC\",\"cf-ray\":\"8997aed16e9757be-IAD\",\"connection\":\"keep-alive\",\"content-length\":\"123\",\"content-type\":\"application/json;charset=utf-8\",\"date\":\"Tue, 25 Jun 2024 20:24:45 GMT\",\"nel\":\"{\\\"success_fraction\\\":0.01,\\\"report_to\\\":\\\"cf-nel\\\",\\\"max_age\\\":604800}\",\"report-to\":\"{\\\"endpoints\\\":[{\\\"url\\\":\\\"https:\\\\/\\\\/a.nel.cloudflare.com\\\\/report\\\\/v4?s=dlwUzWMg%2BEgHWkGwCgBXG%2BsZr9bfWgU3BxWUs%2Fg1WQHaBHkCpaswB%2B32YAwXfJq%2F8YELdAfog%2By2kS3G4toOlN%2BQcgfLrjA9wZrAtUjxS6LrUYYEMW9vYIZVHKms%2B1zp\\\"}],\\\"group\\\":\\\"cf-nel\\\",\\\"max_age\\\":604800}\",\"server\":\"cloudflare\",\"strict-transport-security\":\"max-age=31536000; includeSubDomains; preload\",\"vary\":\"origin, Accept-Encoding\",\"x-content-type-options\":\"nosniff\",\"x-envoy-upstream-service-time\":\"85\",\"x-evy-trace-listener\":\"listener_https\",\"x-evy-trace-route-configuration\":\"listener_https/all\",\"x-evy-trace-route-service-name\":\"envoyset-translator\",\"x-evy-trace-served-by-pod\":\"iad02/hubapi-td/envoy-proxy-7dd59b876-smxcv\",\"x-evy-trace-virtual-host\":\"all\",\"x-hubspot-correlation-id\":\"f8e0e34a-62e2-4631-8e1c-d1b75bdc5730\",\"x-hubspot-ratelimit-daily\":\"500000\",\"x-hubspot-ratelimit-daily-remaining\":\"499999\",\"x-request-id\":\"f8e0e34a-62e2-4631-8e1c-d1b75bdc5730\"}","    at SearchApiResponseProcessor.&amp;lt;anonymous&amp;gt; (/opt/nodejs/node_modules/@hubspot/api-client/lib/codegen/crm/contacts/apis/SearchApi.js:59:23)","    at Generator.next (&amp;lt;anonymous&amp;gt;)","    at fulfilled (/opt/nodejs/node_modules/@hubspot/api-client/lib/codegen/crm/contacts/apis/SearchApi.js:5:58)","    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"]},"promise":{},"stack":["Runtime.UnhandledPromiseRejection: Error: HTTP-Code: 400","Message: An error occurred.","Body: {\"status\":\"error\",\"message\":\"There was a problem with the request.\",\"correlationId\":\"f8e0e34a-62e2-4631-8e1c-d1b75bdc5730\"}","Headers: {\"access-control-allow-credentials\":\"false\",\"cf-cache-status\":\"DYNAMIC\",\"cf-ray\":\"8997aed16e9757be-IAD\",\"connection\":\"keep-alive\",\"content-length\":\"123\",\"content-type\":\"application/json;charset=utf-8\",\"date\":\"Tue, 25 Jun 2024 20:24:45 GMT\",\"nel\":\"{\\\"success_fraction\\\":0.01,\\\"report_to\\\":\\\"cf-nel\\\",\\\"max_age\\\":604800}\",\"report-to\":\"{\\\"endpoints\\\":[{\\\"url\\\":\\\"https:\\\\/\\\\/a.nel.cloudflare.com\\\\/report\\\\/v4?s=dlwUzWMg%2BEgHWkGwCgBXG%2BsZr9bfWgU3BxWUs%2Fg1WQHaBHkCpaswB%2B32YAwXfJq%2F8YELdAfog%2By2kS3G4toOlN%2BQcgfLrjA9wZrAtUjxS6LrUYYEMW9vYIZVHKms%2B1zp\\\"}],\\\"group\\\":\\\"cf-nel\\\",\\\"max_age\\\":604800}\",\"server\":\"cloudflare\",\"strict-transport-security\":\"max-age=31536000; includeSubDomains; preload\",\"vary\":\"origin, Accept-Encoding\",\"x-content-type-options\":\"nosniff\",\"x-envoy-upstream-service-time\":\"85\",\"x-evy-trace-listener\":\"listener_https\",\"x-evy-trace-route-configuration\":\"listener_https/all\",\"x-evy-trace-route-service-name\":\"envoyset-translator\",\"x-evy-trace-served-by-pod\":\"iad02/hubapi-td/envoy-proxy-7dd59b876-smxcv\",\"x-evy-trace-virtual-host\":\"all\",\"x-hubspot-correlation-id\":\"f8e0e34a-62e2-4631-8e1c-d1b75bdc5730\",\"x-hubspot-ratelimit-daily\":\"500000\",\"x-hubspot-ratelimit-daily-remaining\":\"499999\",\"x-request-id\":\"f8e0e34a-62e2-4631-8e1c-d1b75bdc5730\"}","    at process.&amp;lt;anonymous&amp;gt; (file:///var/runtime/index.mjs:1276:17)","    at process.emit (node:events:519:28)","    at emit (node:internal/process/promises:150:20)","    at processPromiseRejections (node:internal/process/promises:284:27)","    at process.processTicksAndRejections (node:internal/process/task_queues:96:32)"]}
Unknown application error occurred
Runtime.Unknown

Memory: 86/128 MB
Runtime: 2181.08 ms&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jun 2024 20:44:38 GMT</pubDate>
    <dc:creator>TMiller4</dc:creator>
    <dc:date>2024-06-25T20:44:38Z</dc:date>
    <item>
      <title>Error is custom code in Automation</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Error-is-custom-code-in-Automation/m-p/996652#M74546</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It has been awhile since I have used custom code in Hubspot, back when it was API vs. Private Apps. &amp;nbsp;I am tyring to use the following code to populate data into Hubspot for a referred contact. &amp;nbsp;I think my error is in how I am trying to use the Private App Toekn. &amp;nbsp;Any help is greaterly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I undestand I can't post certain words in the post, I assume this word is not allow in context of geenrating busniness. &amp;nbsp;I changed the format of it to refer(ral), as this code is about a refe(ral) propgram I saw in the Hubspot Community.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The post also automatically removed invalid HTML from the error message from the log posted below, so it may read different.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code is pasted below and the error from the logs below it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Code:&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;/*&lt;/DIV&gt;&lt;DIV&gt;Operations Hub Workshop 3: Workflow 2 Code&lt;/DIV&gt;&lt;DIV&gt;This code is used to attribute a refer(ral) back to the correct contact. This is done by querying the CRM to find a contact matching the referrer value associated to the enrolled contact. We then update the appropriate properties on both the referring and referred contact.&lt;/DIV&gt;&lt;DIV&gt;*/&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;//1. Import required libraries&lt;/DIV&gt;&lt;DIV&gt;const hubspot = require('@hubspot/api-client'); // HubSpot Node Client will allow us to make calls to HubSpot API&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;exports.main = (event, callback) =&amp;gt; {&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; //2. Create our client&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; const hubspotClient = new hubspot.Client({&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; accessToken: process.env.HAPIKEY // Reference our Private App Token - this should have been added as a secret&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; });&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; //3. Store the referrer ID linked to the enrolled contact in a variable&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; const referrer = event.inputFields['referrer'];&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; //4. Configure our search query&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; const filterGroup = {&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; filters: [{ // filters are used to limit the results returned. We will simply filter for any contact who has a matching value for the referrer ID&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; propertyName: 'referrer_id',&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; operator: 'EQ',&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value: referrer&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }]&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; }&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; // We specify what properties we'd like to return from this search&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; const properties = ['referrer_id', 'number_of_refer(ral)s', 'firstname', 'lastname', 'email']&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; // We create our search object which we will pass to our api call&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; const publicObjectSearchRequest = {&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; filterGroups: [filterGroup],&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; properties&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; }&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; //5. Search the CRM for the contact using the query defined above&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; hubspotClient.crm.contacts.searchApi.doSearch(publicObjectSearchRequest).then(results =&amp;gt; {&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //6. Store data in variables&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; let contactId = results.body.results[0].id; // Id of the referring contact&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; let referred_by = results.body.results[0].properties.firstname + " " + results.body.results[0].properties.lastname; // full name of the referring contact&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; let totalReferrals = 0;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; console.log("referred_by" + referred_by);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //7. Check to see if this is their first refer(ral). If it is we set "totalRefer(rals)" property to "0"&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (results.body.results[0].properties.number_of_refer(ral)s === null || results.body.results[0].properties.number_of_refer(ral)s === undefined || results.body.results[0].properties.number_of_refer(ral)s === "") {&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; totalRefer(ral)s = 0;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else { // Otherwise we retrieve the current number of refer(ral)s&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; totalRefer(ral)s = parseInt(results.body.results[0].properties.number_of_refer(ral)s)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; let totalReferralsUpdated = totalRefer(ral)s + 1; // Increment refer(ral)s&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //8. Create a new date (todays date)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var d = new Date();&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; d.setUTCHours(0, 0, 0, 0);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //9. Update Referred Contact's "referred by" property &amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; hubspotClient.crm.contacts.basicApi.update(event.object.objectId, {&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "properties": {&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "referred_by": referred_by&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; })&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //10. Update Referring Contacts "number of refer(ral)s" and "recent refer(ral) date" properties &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; hubspotClient.crm.contacts.basicApi.update(contactId, {&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "properties": {&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "number_of_refer(ral)s": totalRefer(ral)sUpdated,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "recent_refer(ral)_date": d&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; })&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; });&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Error:&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;WARNING: The logs for this function have exceeded the 4KB limit.
...
,\"correlationId\":\"50501b8e-c256-4242-820d-116b493ff4a3\"}","Headers: {\"access-control-allow-credentials\":\"false\",\"cf-cache-status\":\"DYNAMIC\",\"cf-ray\":\"898f8b4a695d0584-IAD\",\"connection\":\"keep-alive\",\"content-length\":\"123\",\"content-type\":\"application/json;charset=utf-8\",\"date\":\"Mon, 24 Jun 2024 20:42:23 GMT\",\"nel\":\"{\\\"success_fraction\\\":0.01,\\\"report_to\\\":\\\"cf-nel\\\",\\\"max_age\\\":604800}\",\"report-to\":\"{\\\"endpoints\\\":[{\\\"url\\\":\\\"https:\\\\/\\\\/a.nel.cloudflare.com\\\\/report\\\\/v4?s=%2BsTIoc08tLHRT%2FOnsRv3aNpTFJSKK7OZ5j0VDMmaKhYJjOgeAx%2F1cnREWjrEZ1UtMfO%2FemV6gaQsP9Xse978urSQYGSrjVMuJ9DhUwOVIO%2Bx7z4Wlekk4rb0%2Fgl6yq4k\\\"}],\\\"group\\\":\\\"cf-nel\\\",\\\"max_age\\\":604800}\",\"server\":\"cloudflare\",\"strict-transport-security\":\"max-age=31536000; includeSubDomains; preload\",\"vary\":\"origin, Accept-Encoding\",\"x-content-type-options\":\"nosniff\",\"x-envoy-upstream-service-time\":\"70\",\"x-evy-trace-listener\":\"listener_https\",\"x-evy-trace-route-configuration\":\"listener_https/all\",\"x-evy-trace-route-service-name\":\"envoyset-translator\",\"x-evy-trace-served-by-pod\":\"iad02/hubapi-td/envoy-proxy-7dd59b876-zb9w4\",\"x-evy-trace-virtual-host\":\"all\",\"x-hubspot-correlation-id\":\"50501b8e-c256-4242-820d-116b493ff4a3\",\"x-hubspot-ratelimit-daily\":\"500000\",\"x-hubspot-ratelimit-daily-remaining\":\"499998\",\"x-request-id\":\"50501b8e-c256-4242-820d-116b493ff4a3\"}","    at SearchApiResponseProcessor.&amp;lt;anonymous&amp;gt; (/opt/nodejs/node_modules/@hubspot/api-client/lib/codegen/crm/contacts/apis/SearchApi.js:59:23)","    at Generator.next (&amp;lt;anonymous&amp;gt;)","    at fulfilled (/opt/nodejs/node_modules/@hubspot/api-client/lib/codegen/crm/contacts/apis/SearchApi.js:5:58)","    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"]},"promise":{},"stack":["Runtime.UnhandledPromiseRejection: Error: HTTP-Code: 400","Message: An error occurred.","Body: {\"status\":\"error\",\"message\":\"There was a problem with the request.\",\"correlationId\":\"50501b8e-c256-4242-820d-116b493ff4a3\"}","Headers: {\"access-control-allow-credentials\":\"false\",\"cf-cache-status\":\"DYNAMIC\",\"cf-ray\":\"898f8b4a695d0584-IAD\",\"connection\":\"keep-alive\",\"content-length\":\"123\",\"content-type\":\"application/json;charset=utf-8\",\"date\":\"Mon, 24 Jun 2024 20:42:23 GMT\",\"nel\":\"{\\\"success_fraction\\\":0.01,\\\"report_to\\\":\\\"cf-nel\\\",\\\"max_age\\\":604800}\",\"report-to\":\"{\\\"endpoints\\\":[{\\\"url\\\":\\\"https:\\\\/\\\\/a.nel.cloudflare.com\\\\/report\\\\/v4?s=%2BsTIoc08tLHRT%2FOnsRv3aNpTFJSKK7OZ5j0VDMmaKhYJjOgeAx%2F1cnREWjrEZ1UtMfO%2FemV6gaQsP9Xse978urSQYGSrjVMuJ9DhUwOVIO%2Bx7z4Wlekk4rb0%2Fgl6yq4k\\\"}],\\\"group\\\":\\\"cf-nel\\\",\\\"max_age\\\":604800}\",\"server\":\"cloudflare\",\"strict-transport-security\":\"max-age=31536000; includeSubDomains; preload\",\"vary\":\"origin, Accept-Encoding\",\"x-content-type-options\":\"nosniff\",\"x-envoy-upstream-service-time\":\"70\",\"x-evy-trace-listener\":\"listener_https\",\"x-evy-trace-route-configuration\":\"listener_https/all\",\"x-evy-trace-route-service-name\":\"envoyset-translator\",\"x-evy-trace-served-by-pod\":\"iad02/hubapi-td/envoy-proxy-7dd59b876-zb9w4\",\"x-evy-trace-virtual-host\":\"all\",\"x-hubspot-correlation-id\":\"50501b8e-c256-4242-820d-116b493ff4a3\",\"x-hubspot-ratelimit-daily\":\"500000\",\"x-hubspot-ratelimit-daily-remaining\":\"499998\",\"x-request-id\":\"50501b8e-c256-4242-820d-116b493ff4a3\"}","    at process.&amp;lt;anonymous&amp;gt; (file:///var/runtime/index.mjs:1276:17)","    at process.emit (node:events:519:28)","    at emit (node:internal/process/promises:150:20)","    at processPromiseRejections (node:internal/process/promises:284:27)","    at process.processTicksAndRejections (node:internal/process/task_queues:96:32)"]}
Unknown application error occurred
Runtime.Unknown

Memory: 21/128 MB
Runtime: 2254.24 ms&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Mon, 24 Jun 2024 22:55:04 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Error-is-custom-code-in-Automation/m-p/996652#M74546</guid>
      <dc:creator>TMiller4</dc:creator>
      <dc:date>2024-06-24T22:55:04Z</dc:date>
    </item>
    <item>
      <title>Re: Error is custom code in Automation</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Error-is-custom-code-in-Automation/m-p/996787#M74550</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/433429"&gt;@TMiller4&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Problem with your search API payload, see the screenshot below:&lt;BR /&gt;In the screenshot, Please replace properties with properties:properties.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GRajput_0-1719299650159.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/120419i2004E11054056F2C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GRajput_0-1719299650159.png" alt="GRajput_0-1719299650159.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-sheets-root="1" data-sheets-value="{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:&amp;quot;I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member.\nThanks!&amp;quot;}" data-sheets-userformat="{&amp;quot;2&amp;quot;:769,&amp;quot;3&amp;quot;:{&amp;quot;1&amp;quot;:0},&amp;quot;11&amp;quot;:4,&amp;quot;12&amp;quot;:0}"&gt;I hope this will help you out. Please mark it as &lt;STRONG&gt;Solution Accepted and upvote&lt;/STRONG&gt; to help another Community member.&lt;BR /&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2024 07:14:52 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Error-is-custom-code-in-Automation/m-p/996787#M74550</guid>
      <dc:creator>GRajput</dc:creator>
      <dc:date>2024-06-25T07:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: Error is custom code in Automation</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Error-is-custom-code-in-Automation/m-p/997247#M74574</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your fast response and assistance. &amp;nbsp;I made the change, unfortunately it is still throwing an error and not populating the data back into Hubspot. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did I used the Private App/Token correctly where the Secret "HAPIKey" is the Token from the private app.:&lt;/P&gt;&lt;P&gt;"//2. &lt;EM&gt;Create our client&lt;/EM&gt;&lt;BR /&gt;const hubspotClient = new hubspot.Client({&lt;BR /&gt;accessToken: process.env.HAPIKEY // &lt;EM&gt;Reference our Private App Token - this should have been added as a secret&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I see a yellow highlight with a message for line of code: exports.main = (event, callback) =&amp;gt; { &amp;nbsp;with the message 'Callback' is defined but never used. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the verbiage from the Logs:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;WARNING: The logs for this function have exceeded the 4KB limit.
...
2-4631-8e1c-d1b75bdc5730\"}","Headers: {\"access-control-allow-credentials\":\"false\",\"cf-cache-status\":\"DYNAMIC\",\"cf-ray\":\"8997aed16e9757be-IAD\",\"connection\":\"keep-alive\",\"content-length\":\"123\",\"content-type\":\"application/json;charset=utf-8\",\"date\":\"Tue, 25 Jun 2024 20:24:45 GMT\",\"nel\":\"{\\\"success_fraction\\\":0.01,\\\"report_to\\\":\\\"cf-nel\\\",\\\"max_age\\\":604800}\",\"report-to\":\"{\\\"endpoints\\\":[{\\\"url\\\":\\\"https:\\\\/\\\\/a.nel.cloudflare.com\\\\/report\\\\/v4?s=dlwUzWMg%2BEgHWkGwCgBXG%2BsZr9bfWgU3BxWUs%2Fg1WQHaBHkCpaswB%2B32YAwXfJq%2F8YELdAfog%2By2kS3G4toOlN%2BQcgfLrjA9wZrAtUjxS6LrUYYEMW9vYIZVHKms%2B1zp\\\"}],\\\"group\\\":\\\"cf-nel\\\",\\\"max_age\\\":604800}\",\"server\":\"cloudflare\",\"strict-transport-security\":\"max-age=31536000; includeSubDomains; preload\",\"vary\":\"origin, Accept-Encoding\",\"x-content-type-options\":\"nosniff\",\"x-envoy-upstream-service-time\":\"85\",\"x-evy-trace-listener\":\"listener_https\",\"x-evy-trace-route-configuration\":\"listener_https/all\",\"x-evy-trace-route-service-name\":\"envoyset-translator\",\"x-evy-trace-served-by-pod\":\"iad02/hubapi-td/envoy-proxy-7dd59b876-smxcv\",\"x-evy-trace-virtual-host\":\"all\",\"x-hubspot-correlation-id\":\"f8e0e34a-62e2-4631-8e1c-d1b75bdc5730\",\"x-hubspot-ratelimit-daily\":\"500000\",\"x-hubspot-ratelimit-daily-remaining\":\"499999\",\"x-request-id\":\"f8e0e34a-62e2-4631-8e1c-d1b75bdc5730\"}","    at SearchApiResponseProcessor.&amp;lt;anonymous&amp;gt; (/opt/nodejs/node_modules/@hubspot/api-client/lib/codegen/crm/contacts/apis/SearchApi.js:59:23)","    at Generator.next (&amp;lt;anonymous&amp;gt;)","    at fulfilled (/opt/nodejs/node_modules/@hubspot/api-client/lib/codegen/crm/contacts/apis/SearchApi.js:5:58)","    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"]},"promise":{},"stack":["Runtime.UnhandledPromiseRejection: Error: HTTP-Code: 400","Message: An error occurred.","Body: {\"status\":\"error\",\"message\":\"There was a problem with the request.\",\"correlationId\":\"f8e0e34a-62e2-4631-8e1c-d1b75bdc5730\"}","Headers: {\"access-control-allow-credentials\":\"false\",\"cf-cache-status\":\"DYNAMIC\",\"cf-ray\":\"8997aed16e9757be-IAD\",\"connection\":\"keep-alive\",\"content-length\":\"123\",\"content-type\":\"application/json;charset=utf-8\",\"date\":\"Tue, 25 Jun 2024 20:24:45 GMT\",\"nel\":\"{\\\"success_fraction\\\":0.01,\\\"report_to\\\":\\\"cf-nel\\\",\\\"max_age\\\":604800}\",\"report-to\":\"{\\\"endpoints\\\":[{\\\"url\\\":\\\"https:\\\\/\\\\/a.nel.cloudflare.com\\\\/report\\\\/v4?s=dlwUzWMg%2BEgHWkGwCgBXG%2BsZr9bfWgU3BxWUs%2Fg1WQHaBHkCpaswB%2B32YAwXfJq%2F8YELdAfog%2By2kS3G4toOlN%2BQcgfLrjA9wZrAtUjxS6LrUYYEMW9vYIZVHKms%2B1zp\\\"}],\\\"group\\\":\\\"cf-nel\\\",\\\"max_age\\\":604800}\",\"server\":\"cloudflare\",\"strict-transport-security\":\"max-age=31536000; includeSubDomains; preload\",\"vary\":\"origin, Accept-Encoding\",\"x-content-type-options\":\"nosniff\",\"x-envoy-upstream-service-time\":\"85\",\"x-evy-trace-listener\":\"listener_https\",\"x-evy-trace-route-configuration\":\"listener_https/all\",\"x-evy-trace-route-service-name\":\"envoyset-translator\",\"x-evy-trace-served-by-pod\":\"iad02/hubapi-td/envoy-proxy-7dd59b876-smxcv\",\"x-evy-trace-virtual-host\":\"all\",\"x-hubspot-correlation-id\":\"f8e0e34a-62e2-4631-8e1c-d1b75bdc5730\",\"x-hubspot-ratelimit-daily\":\"500000\",\"x-hubspot-ratelimit-daily-remaining\":\"499999\",\"x-request-id\":\"f8e0e34a-62e2-4631-8e1c-d1b75bdc5730\"}","    at process.&amp;lt;anonymous&amp;gt; (file:///var/runtime/index.mjs:1276:17)","    at process.emit (node:events:519:28)","    at emit (node:internal/process/promises:150:20)","    at processPromiseRejections (node:internal/process/promises:284:27)","    at process.processTicksAndRejections (node:internal/process/task_queues:96:32)"]}
Unknown application error occurred
Runtime.Unknown

Memory: 86/128 MB&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;PRE&gt;WARNING: The logs for this function have exceeded the 4KB limit.
...
2-4631-8e1c-d1b75bdc5730\"}","Headers: {\"access-control-allow-credentials\":\"false\",\"cf-cache-status\":\"DYNAMIC\",\"cf-ray\":\"8997aed16e9757be-IAD\",\"connection\":\"keep-alive\",\"content-length\":\"123\",\"content-type\":\"application/json;charset=utf-8\",\"date\":\"Tue, 25 Jun 2024 20:24:45 GMT\",\"nel\":\"{\\\"success_fraction\\\":0.01,\\\"report_to\\\":\\\"cf-nel\\\",\\\"max_age\\\":604800}\",\"report-to\":\"{\\\"endpoints\\\":[{\\\"url\\\":\\\"https:\\\\/\\\\/a.nel.cloudflare.com\\\\/report\\\\/v4?s=dlwUzWMg%2BEgHWkGwCgBXG%2BsZr9bfWgU3BxWUs%2Fg1WQHaBHkCpaswB%2B32YAwXfJq%2F8YELdAfog%2By2kS3G4toOlN%2BQcgfLrjA9wZrAtUjxS6LrUYYEMW9vYIZVHKms%2B1zp\\\"}],\\\"group\\\":\\\"cf-nel\\\",\\\"max_age\\\":604800}\",\"server\":\"cloudflare\",\"strict-transport-security\":\"max-age=31536000; includeSubDomains; preload\",\"vary\":\"origin, Accept-Encoding\",\"x-content-type-options\":\"nosniff\",\"x-envoy-upstream-service-time\":\"85\",\"x-evy-trace-listener\":\"listener_https\",\"x-evy-trace-route-configuration\":\"listener_https/all\",\"x-evy-trace-route-service-name\":\"envoyset-translator\",\"x-evy-trace-served-by-pod\":\"iad02/hubapi-td/envoy-proxy-7dd59b876-smxcv\",\"x-evy-trace-virtual-host\":\"all\",\"x-hubspot-correlation-id\":\"f8e0e34a-62e2-4631-8e1c-d1b75bdc5730\",\"x-hubspot-ratelimit-daily\":\"500000\",\"x-hubspot-ratelimit-daily-remaining\":\"499999\",\"x-request-id\":\"f8e0e34a-62e2-4631-8e1c-d1b75bdc5730\"}","    at SearchApiResponseProcessor.&amp;lt;anonymous&amp;gt; (/opt/nodejs/node_modules/@hubspot/api-client/lib/codegen/crm/contacts/apis/SearchApi.js:59:23)","    at Generator.next (&amp;lt;anonymous&amp;gt;)","    at fulfilled (/opt/nodejs/node_modules/@hubspot/api-client/lib/codegen/crm/contacts/apis/SearchApi.js:5:58)","    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"]},"promise":{},"stack":["Runtime.UnhandledPromiseRejection: Error: HTTP-Code: 400","Message: An error occurred.","Body: {\"status\":\"error\",\"message\":\"There was a problem with the request.\",\"correlationId\":\"f8e0e34a-62e2-4631-8e1c-d1b75bdc5730\"}","Headers: {\"access-control-allow-credentials\":\"false\",\"cf-cache-status\":\"DYNAMIC\",\"cf-ray\":\"8997aed16e9757be-IAD\",\"connection\":\"keep-alive\",\"content-length\":\"123\",\"content-type\":\"application/json;charset=utf-8\",\"date\":\"Tue, 25 Jun 2024 20:24:45 GMT\",\"nel\":\"{\\\"success_fraction\\\":0.01,\\\"report_to\\\":\\\"cf-nel\\\",\\\"max_age\\\":604800}\",\"report-to\":\"{\\\"endpoints\\\":[{\\\"url\\\":\\\"https:\\\\/\\\\/a.nel.cloudflare.com\\\\/report\\\\/v4?s=dlwUzWMg%2BEgHWkGwCgBXG%2BsZr9bfWgU3BxWUs%2Fg1WQHaBHkCpaswB%2B32YAwXfJq%2F8YELdAfog%2By2kS3G4toOlN%2BQcgfLrjA9wZrAtUjxS6LrUYYEMW9vYIZVHKms%2B1zp\\\"}],\\\"group\\\":\\\"cf-nel\\\",\\\"max_age\\\":604800}\",\"server\":\"cloudflare\",\"strict-transport-security\":\"max-age=31536000; includeSubDomains; preload\",\"vary\":\"origin, Accept-Encoding\",\"x-content-type-options\":\"nosniff\",\"x-envoy-upstream-service-time\":\"85\",\"x-evy-trace-listener\":\"listener_https\",\"x-evy-trace-route-configuration\":\"listener_https/all\",\"x-evy-trace-route-service-name\":\"envoyset-translator\",\"x-evy-trace-served-by-pod\":\"iad02/hubapi-td/envoy-proxy-7dd59b876-smxcv\",\"x-evy-trace-virtual-host\":\"all\",\"x-hubspot-correlation-id\":\"f8e0e34a-62e2-4631-8e1c-d1b75bdc5730\",\"x-hubspot-ratelimit-daily\":\"500000\",\"x-hubspot-ratelimit-daily-remaining\":\"499999\",\"x-request-id\":\"f8e0e34a-62e2-4631-8e1c-d1b75bdc5730\"}","    at process.&amp;lt;anonymous&amp;gt; (file:///var/runtime/index.mjs:1276:17)","    at process.emit (node:events:519:28)","    at emit (node:internal/process/promises:150:20)","    at processPromiseRejections (node:internal/process/promises:284:27)","    at process.processTicksAndRejections (node:internal/process/task_queues:96:32)"]}
Unknown application error occurred
Runtime.Unknown

Memory: 86/128 MB
Runtime: 2181.08 ms&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2024 20:44:38 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Error-is-custom-code-in-Automation/m-p/997247#M74574</guid>
      <dc:creator>TMiller4</dc:creator>
      <dc:date>2024-06-25T20:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: Error is custom code in Automation</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Error-is-custom-code-in-Automation/m-p/1003640#M74898</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I solved the issues I was having with the code from Jack Coldrick's Creating a Refewrral Session in Hubspot. &amp;nbsp;There were three issues resolved by changes to the coe originally provided in the session.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. The solution above changing &amp;nbsp;"properties:" &amp;nbsp;to &amp;nbsp;"&lt;SPAN&gt;properties:properties".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. Removing &amp;nbsp;".body" from the the orginal code as it is no loinger required (found in a different post)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3. Being sure the property internal names I had created matched the ones I was using in the code.&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Wed, 10 Jul 2024 17:11:54 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Error-is-custom-code-in-Automation/m-p/1003640#M74898</guid>
      <dc:creator>TMiller4</dc:creator>
      <dc:date>2024-07-10T17:11:54Z</dc:date>
    </item>
  </channel>
</rss>

