This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const hubspot = require('@hubspot/api-client'); | |
exports.main = async (event, callback) => { | |
// Created by Nathan De Long @ HubSpot, 1/14/2023 | |
// This code is provided as-is, please test this code prior to using it in a live workflow in your environment. | |
// modified by nick decker @ deckerdevs 1/14/2023 | |
// modified to unnest code and change to our coding standards, cleaning it up etc | |
// get the associated contacts for the parent company. note, trigger for this workflow is companies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["lottie-player"]={})}(this,(function(exports){"use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var REACT_ELEMENT_TYPE;function _jsx(t,e,r,i){REACT_ELEMENT_TYPE||(REACT_ELEMENT_TYPE="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var a=t&&t.defaultProps,s=arguments.length-3;if(e||0===s||(e={children:void 0}),1===s)e.children=i;else if(s>1){for(var n=new Array(s),o=0;o<s;o++)n[o]=arguments[o+3];e.children=n}if(e&&a)for(var h in a)void 0===e[h]&&(e[h]=a[h]);else e||(e=a||{});return{$$typeof:REACT_ELEMENT_TYPE,type:t,key:void 0===r?null:""+r,ref:null,props:e,_owner:null}}function _asyncIterator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const hubspot = require('@hubspot/api-client'); | |
exports.main = async (event, callback) => { | |
const hubspotClient = new hubspot.Client({ | |
accessToken: process.env.custom_code_private_app | |
}); | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const hubspot = require('@hubspot/api-client'); | |
// adding async to this main function here | |
exports.main = async (event, callback) => { | |
// Instantiate a new HubSpot private app (secret) | |
const hubspotClient = new hubspot.Client({ | |
accessToken: process.env.custom_code_private_app | |
}); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function onOpen() { | |
var ui = SpreadsheetApp.getUi(); | |
ui.createMenu('Product Functions') | |
.addItem('Scrape Product SKUs', 'menuItem1') | |
.addSeparator() | |
.addSubMenu(ui.createMenu('Clean Up') | |
.addItem('Second item', 'menuItem2')) | |
.addToUi(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.querySelectorAll('.content-table-row').forEach(item => { | |
let linktext = item.querySelector('a').innerText | |
let linkedit = item.querySelector('a').href | |
let linkurl = item.querySelector('.private-microcopy.is--text--help').innerText | |
let status = item.querySelector('[data-test-id="content-status-cell"]').innerText | |
console.log(`${linktext},https://${linkurl},${linkedit},${status}`) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _hsp = window._hsp = window._hsp || [] | |
window.dataLayer = window.dataLayer || [] | |
_hsp.push(['addPrivacyConsentListener', function(consent) { | |
// console.log('-------- [HubSpot website logging start] --------') | |
// console.log('analytics: ' + consent.categories.analytics) | |
// console.log('advertisement: ' + consent.categories.advertisement) | |
// console.log('functionality: ' + consent.categories.functionality) | |
// console.log('-------- [HubSpot website logging start] --------') | |
if(consent.categories.analytics) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% set tags_from_blog_post = ['Inspiration','Teambuilding'] %} | |
{# this set ebooks would actually be from your HUBDB call #} | |
{% set ebooks = [ | |
{ | |
"name": "fred", | |
"tags": "smile, Brains", | |
}, | |
{ | |
"name": "correct", | |
"tags": "Inspiration, Brains", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const hubspot = require('@hubspot/api-client'); | |
exports.main = async (event, callback) => { | |
// not sure what you are doing here but putting this in a function seems better to me then the pasta | |
const handleQuote = (quoteObject) => { | |
// insert my cool code here that does stuff | |
} | |
// you should convert this to private app see: https://deckerdevs.com/blogs/hubspot-api-integrations-faqs-sunsetting-api-keys-for-private-apps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const SET_PLAYER_STATUS = 'SET_PLAYER_STATUS'; | |
const hsVideos = window.hsVideoApi?.getPlayers(); | |
const videoEls = document.querySelectorAll('.video-container'); | |
function manageVideoStatus() { | |
videoEls.forEach((videoEl) => { | |
const iframe = videoEl.querySelector('iframe'); | |
if (iframe) { | |
const videoId = iframe.getAttribute('id')?.replace('hs_player_', ''); |