⚙ Operations Hub

EGolborne
HubSpot-Produktteam
HubSpot-Produktteam

Programmable Automation May Office Hours - Thread for Questions

Hi All,

 

We originally had a Programmable Automation Office Hours scheduled for May 10th, but unfortunately we will have to cancel it. We apologize for any inconvenience, but are looking forward to seeing everyone at our June office hours

 

We still want to be able to answer all of your questions, and also really value getting the time to understand how you’re using these features and where we can improve them, so we’re kicking off this thread so we can still have those conversations.

 

@jackcoldrick and I will be monitoring this thread and answering any questions you have about our Operations Hub Programmable Automation features. Let us know how we can help!

2 Antworten
MBrooks414
Mitglied

Programmable Automation May Office Hours - Thread for Questions

Not sure if this is the right place to post, but I'm running into an error while using the code from the Automation contact deduplication use case. It is successfully identifying duplicates but running into an error when it tries to merge. 

022-06-02T17:03:13.935Z ERROR Unhandled Promise Rejection {"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"HttpError: HTTP request failed","reason":{"errorType":"HttpError","errorMessage":"HTTP request failed","response":{"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":"bc0f85eb-b94a-4126-922a-0af227b13bab","category":"INVALID_AUTHENTICATION"},"headers":{"date":"Thu, 02 Jun 2022 17:03:13 GMT","content-type":"application/json;charset=utf-8","content-length":"316","connection":"close","cf-ray":"7151c2de7a4a6fb0-IAD","strict-transport-security":"max-age=31536000; includeSubDomains; preload","vary":"Accept-Encoding","cf-cache-status":"DYNAMIC","access-control-allow-credentials":"false","expect-ct":"max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"","x-hubspot-correlation-id":"bc0f85eb-b94a-4126-922a-0af227b13bab","x-trace":"2B45EDE401B146B1F69B1C172D4A9A365B7A587D0C000000000000000000","report-to":"{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=g3bFr0zB7uW4LerStx18VUAbNVUAM5iGAoARftAM%2BjaHj9TYE77MG7Jtq%2FUdH6NKXoRk%2FT9RroA3%2FXLwMubgjNynVfZIa3eLXkgpiN499fR%2FQ8AOH3tZKl17BnMVHNIv\"}],\"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":null,"hostname":"api.hubapi.com","hash":null,"search":"?properties=phone","query":"properties=phone","pathname":"/crm/v3/objects/contacts/222551","path":"/crm/v3/objects/contacts/222551?properties=phone","href":"https://api.hubapi.com/crm/v3/objects/contacts/222551?properties=phone"},"method":"GET","headers":{"User-Agent":"hubspot-api-client-nodejs; 3.4.1","Accept":"application/json"}}},"body":{},"statusCode":401,"name":"HttpError","stack":["HttpError: HTTP request failed"," at Request._callback (/opt/nodejs/node_modules/@hubspot/api-client/lib/codegen/crm/contacts/api/basicApi.js:318:40)"," at Request.self.callback (/opt/nodejs/node_modules/request/request.js:185:22)"," at Request.emit (events.js:314:20)"," at Request.<anonymous> (/opt/nodejs/node_modules/request/request.js:1154:10)"," at Request.emit (events.js:314:20)"," at IncomingMessage.<anonymous> (/opt/nodejs/node_modules/request/request.js:1076:12)"," at Object.onceWrapper (events.js:420:28)"," at IncomingMessage.emit (events.js:326:22)"," at endReadableNT (_stream_readable.js:1241:12)"," at processTicksAndRejections (internal/process/task_queues.js:84:21)"]},"promise":{},"stack":["Runtime.UnhandledPromiseRejection: HttpError: HTTP request failed"," at process.<anonymous> (/var/runtime/index.js:35:15)"," at process.emit (events.js:314:20)"," at processPromiseRejections (internal/process/promises.js:209:33)"," at processTicksAndRejections (internal/process/task_queues.js:98:32)"]}

Memory: 57/128 MB
Runtime: 823.62 ms

 

I'm brand new to Operations Hub and coding in node.js so I'm not sure where to even look to solve this issue. Thanks. 

EGolborne
HubSpot-Produktteam
HubSpot-Produktteam

Programmable Automation May Office Hours - Thread for Questions

Hi there! 

 

Without seeing your code, based on the error message it looks to be an authentication issue which means that you may not have configured your Secrets correctly. You can see how to configure your secrets here.

 

You'll first need to create a private app with access to the specific areas of HubSpot that you need. There are more details on how to configure private apps here. Once you've done that, you can add that private app to your Secrets drop down in the custom code action, and then reference that in your code. Hope this helps!

0 Upvotes