Skip to content

Instantly share code, notes, and snippets.

@greatwitenorth
greatwitenorth / Associate company to invoice.js
Created April 29, 2024 18:10
Quickbooks to Hubspot invoice sync - Associate company to invoice
// Use this in the custom code action (only in Ops Pro)
const hubspot = require('@hubspot/api-client');
exports.main = async (event, callback) => {
const hubspotClient = new hubspot.Client({
accessToken: process.env.HS_TOKEN
});
const invoiceId = event.inputFields['hs_object_id'];
@greatwitenorth
greatwitenorth / hubspot-timezone-select-dropdown.html
Last active October 3, 2023 16:48
Auto-selects timezones backed by identifiers formatted to the same values as the Hubspot "Time zone" property.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
</head>
<body>
<select class='userTimeZone' name='userTimeZone'>
@greatwitenorth
greatwitenorth / hubspot-languages-simplified.html
Created October 3, 2023 16:34
Hubspot Langugae - Simplified list of Hubspot languages in the Preferred Language field. This list does not contain the hyphenated iso codes (ie English - Australia). For the exhaustive list go here: https://gist.github.com/greatwitenorth/be16722472a3765f03433da8439b7f28
<select>
<option value="af">Afrikaans</option>
<option value="sq">Albanian</option>
<option value="ar">Arabic</option>
<option value="hy">Armenian</option>
<option value="eu">Basque</option>
<option value="be">Belarusian</option>
<option value="bg">Bulgarian</option>
<option value="ca">Catalan</option>
<option value="zh">Chinese</option>
@greatwitenorth
greatwitenorth / hubspot-languages-exhaustive.html
Last active October 3, 2023 16:35
Hubspot languages - Exhaustive list of all languages and their values used by the Preferred Language field in Hubspot. For a simplified list without hyphenated iso codes, go here: https://gist.github.com/greatwitenorth/82dcefe605abae9fbb5431477e905d96
<select>
<option value="af">Afrikaans</option>
<option value="sq">Albanian</option>
<option value="sq-al">Albanian - Albania</option>
<option value="ar">Arabic</option>
<option value="ar-dz">Arabic - Algeria</option>
<option value="ar-bh">Arabic - Bahrain</option>
<option value="ar-eg">Arabic - Egypt</option>
<option value="ar-iq">Arabic - Iraq</option>
<option value="ar-jo">Arabic - Jordan</option>
@greatwitenorth
greatwitenorth / hubspot-country-dropdown-select.html
Created October 3, 2023 16:27
Hubspot country dropdown select
<select>
<option>Afghanistan</option>
<option>Åland Islands</option>
<option>Albania</option>
<option>Algeria</option>
<option>American Samoa</option>
<option>Andorra</option>
<option>Angola</option>
<option>Anguilla</option>
<option>Antarctica</option>