Skip to content

Instantly share code, notes, and snippets.

View CarlosOrtiz's full-sized avatar
💻
Working

Carlos Ortiz CarlosOrtiz

💻
Working
View GitHub Profile
@jackcoldrick90
jackcoldrick90 / enrichCompanyDataFromClearbit.js
Created April 26, 2021 17:12
This custom coded action queries the ClearBit Company API - domain lookup endpoint to pull additional information relating to the currently enrolled company. When a response is returned we then use the HubSpot CRM Company API to update the properties with the appropriate values.
// Import required libraries
const hubspot = require('@hubspot/api-client');
const request = require('request');
exports.main = (event, callback) => {
// Create a new HubSpot API client
const hubspotClient = new hubspot.Client({
apiKey: process.env.HAPIKEY
});
@jackcoldrick90
jackcoldrick90 / validateEmailFromKickbox.js
Created April 26, 2021 17:08
Action uses the Kickbox Single Verification API to validate the enrolled contacts email address and return additional information to help optimize your marketing email efforts. i.e Sendex score.
//Import required libraries
const hubspot = require('@hubspot/api-client');
const request = require('request');
exports.main = (event, callback) => {
//Create a new HubSpot Client
const hubspotClient = new hubspot.Client({
apiKey: process.env.HAPIKEY
});
const express = require('express')
const app = express()
const crypto = require('crypto')
const secretKey = '<your secret key>'
const bodyParser = require('body-parser')
app.use('/webhooks', bodyParser.raw({ type: 'application/json' }))
app.use(bodyParser.json())
app.post('/webhooks/orders/create', async (req, res) => {
@nyx-code
nyx-code / phoneAuth.js
Created December 23, 2019 18:54
This is the code for creating simple phone authentication REST API using Twilio service.
require('dotenv/config')
const express = require('express')
const app = express()
const port = 3000
const client = require('twilio')(process.env.ACCOUNT_SID, process.env.AUTH_TOKEN)
// /login
// - phone number
// step 1 install java
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
sudo npm install java --save
// step 2 using
var java = require("java");
var jarfile = "jarfileName.jar";
java.classpath.push(jarPath);