Skip to content

Instantly share code, notes, and snippets.

View benjaminathlan's full-sized avatar

Benjamin Athlan benjaminathlan

View GitHub Profile
@benjaminathlan
benjaminathlan / getCompanyFromDeal.js
Last active March 9, 2023 15:40
Hubspot Hub Operation - Scripts
const hubspot = require('@hubspot/api-client');
exports.main = (event, callback) => {
const hubspotClient = new hubspot.Client({
apiKey: process.env.HAPIKEY
});
const thisObjectId = event.object.objectId;
hubspotClient.crm.deals.associationsApi.getAll(thisObjectId, "company")
<h1>Listing tasks</h1>
<table>
<tr>
<th>Name</th>
<th>Complete</th>
</tr>
<% @tasks.each do |task| %>
<tr>