Skip to content

Instantly share code, notes, and snippets.

View dshukertjr's full-sized avatar

Tyler dshukertjr

View GitHub Profile
@dshukertjr
dshukertjr / linebreak.js
Last active January 27, 2022 01:28
Some samples of custom workflow actions you can use inside your HubSpot workflow. These actions are not verified, and should be tested with your own responsibility whenever used. Make sure to add HAPIKEY as your secret. https://developers.hubspot.com/docs/api/workflows/custom-code-actions#hs_cos_wrapper_widget_1602254273281_
const hubspot = require('@hubspot/api-client');
exports.main = (event, callback) => {
const hubspotClient = new hubspot.Client({
apiKey: process.env.HAPIKEY
});
// replace 'multiline' with your multi line text property name
hubspotClient.crm.contacts.basicApi.getById(event.object.objectId, ['multiline'])
.then(results => {