SlideShare a Scribd company logo
1 of 30
Custom Coded Workflow Actions - Workshop
Data Enrichment using Clearbit
Jack Coldrick, Principal Solutions Engineer @ HubSpot
Overview
Custom Coded Workflow Actions Workshop
● What will we be doing in this workshop?
● What is a custom coded workflow action?
● Practical:
○ Step 1: Setup a HubSpot Developer Account
○ Step 2: Setup a Clearbit Account
○ Step 3: Create Custom Properties
○ Step 4: Create the Workflow
○ Step 5: Test the Workflow
● Questions
● Useful Resources
60
minutes
What will we be doing in
this workshop?
Your CRM is only as good as the data that is in it. There are tons of
data enrichment tools available that can help sales and marketing
teams to work more efficiently. In this workshop we’ll be integrating
with Clearbit to pull in some information which can be used for
account based marketing/selling.
What is a custom coded
workflow action?
Custom coded workflow actions are a feature included with
HubSpot's Operations Hub Professional and allow you to write code
in Javascript within a Node JS Runtime environment to solve for
specific use cases and processes relevant to your business.
Learn More Use Cases Blog Post
Step 1:
Setup a Developer Account
This is an important step, setting up a developer account. You can
do this by clicking on the link below. Once you’ve set this up you will
have a special HubSpot portal where you can create up to 10 test
portals that will allow you to try and test functionality in a controlled
environment. If you already have a developer account feel free to
skip this section!
Create a developer account
An overview of the developer
account
Step 1: Setup a Developer Account
When you finish setting up your developer
account you will see something similar to the
screenshot on the left. There are a couple of
items in the navigation bar:
● Apps - Register applications and manage scopes
so that it can be installed in different portals.
● Testing - Create test portals to try/test HubSpot
functionality. Each lasts 90 days and can be
renewed manually for a further 90 days.
● App Marketplace - Manage your app listing
● Docs - Links to the developer documentation
● Forums - Links to the developer community, a
great place to ask questions and converse with
like minded individuals.
Create a test account
Step 1: Setup a Developer Account
Test accounts are a great way to try/test
functionality in an isolated environment. They
provide access to the enterprise suite of HubSpot.
You can create a maximum of 10 test portals, each
of which lasts for a total of 90 days. They can be
manually renewed for a further 90 if desired.
1. Click on “Testing” and in the window that
appears click “Create app test account”
2. In the pop up give your account a name and
click “Ok”
3. You should see the account in the list, click
into it to access your enterprise developer
environment. This is where we’ll build our
custom coded workflow actions.
#1
#2
#3
Step 2:
Create a Clearbit Account
In this section we’ll be setting up a free account with Clearbit so that
we can create an API key and begin to make calls to their open and
flexible API, specifically the Data Enrichment APIs.
Create Clearbit Account
Setup a Clearbit Account
Step 2: Setup a Clearbit Account
If you don’t already have one an important step
is to setup a Clearbit account. You can do this
by clicking on the link below:
https://clearbit.com/
Once you’ve done this you should have access
to your Clearbit Dashboard.
What is Clearbit?
Clearbit is the marketing data platform behind the fastest-growing B2B
companies. Apply real-time intelligence across your entire stack to
improve acquisition, conversion, and operations. Clearbit delivers
complete, always-fresh visitor, contact, and account profiles, so you’re
prepared to reach the right people, make great first impressions, and
nurture relationships throughout their lifecycle.
Step 3:
Create Custom Properties
Clearbit returns lots of useful information that we can pass into
HubSpot. Decide which data points are important to you and create
the appropriate custom properties in HubSpot to store this
information.
View Data Returned by Clearbit
Create Custom Properties
Step 3: Create Custom Properties
For the purposes of this workshop I will be
creating custom properties to store values
for “Domain Aliases”, “Sub Industry” and
“Tech”.
This is by no means an exhaustive list and
you are free to create whatever properties
you like to hold whatever information you
feel is necessary.
Information on creating custom properties
can be found here.
Step 4:
Create the Workflow
Now that we’ve created our Clearbit account and have an API key
we can create a workflow in HubSpot to execute some custom code
that queries the API when a company is created.
Get the Code
Create Workflow
Step 4: Create the Workflow
Within your test account hover over
“Automation” and select “Workflows”. You
are now within HubSpot's automation tool.
From here select “Create workflow”. You will
be prompted to select a template, instead
click on the “start from scratch” tab and
ensure “Company-based” is selected.
Once this is done click on “next” and you’ll
be taken into the workflow builder screen.
Define enrollment Criteria
Step 4: Create the Workflow
Now we must define our enrollment criteria, in
theory you could set this to anything you like
but for the purposes of this workshop we’re
simply going to use “Create date is known”. In
other words, any time a company is created
in the CRM this workflow will be triggered.
Choose an action
Step 4: Create the Workflow
There are many different types of actions you
can choose to execute within a workflow. For
the purposes of this workshop we’re going to
be using “Custom Coded Action” - exclusive
to Operations Hub Professional.
Worth noting Operations Hub also gives you
the “Trigger webhook” action and “Format
data” action. They’re not going to be
leveraged in this workshop.
Create custom coded action
Step 4: Create the Workflow
When you click on the “Custom code” action a sidebar
similar to the one shown on the left will appear. Couple of
things to point out…
● Secrets - define any sort of variables like
usernames, passwords that you’d like to reference in
your code but keep private.
● Property to include in code - define any properties
relating to the enrolled object that you’d like to
reference in your code.
● Code - Your javascript or python, we provide a
template by default.
● Data outputs - define any data you’d like the custom
code action to pass back to the workflow to
reference at a later step.
Add your secrets
Step 4: Create the Workflow
Secrets - define any sort of variables like usernames,
passwords that you’d like to reference in your code but
keep private.
We want to add our Clearbit API key, we may also wish
to add our HubSpot API key at this point if we want to
use the HubSpot APIs at a later stage.
You can access your Clearbit API key by navigating to
Clearbit Dashboard and clicking “API”. Then simply copy
the value into HubSpot as shown here.
You can access your Hubspot API key by following the
instructions here.
Secrets can be referenced using “process.env.SECRET_NAME”
Define your inputs
Step 4: Create the Workflow
Property to include in code - define any properties
relating to the enrolled object that you’d like to reference
in your code.
This is useful as it means we don’t need to make any
unnecessary requests to the HubSpot API which is rate
limited and we can also reference outputs from other
custom coded workflow actions.
You can reference these properties using:
event.inputFields[‘PROPERTY_NAME’]
Add your code (Option 1)
Step 4: Create the Workflow
This option uses the Node Request Library. A HTTP GET
request is made to Clearbit Enrichment API and the data
returned is then passed back to the workflow for later use.
View Code Snippet
Add your code (Option 2)
Step 4: Create the Workflow
This option uses the Node Axios Library. A HTTP GET
request is made to Clearbit Enrichment API and the data
returned is then passed back to the workflow for later use.
View Code Snippet
Add Data Outputs
Step 4: Create the Workflow
Data outputs - define any data you’d like the custom code
action to pass back to the workflow to reference at a later
step.
Add “Copy to Property” action
Step 4: Create the Workflow
We want to use the output from our custom coded actions
to pass information into company properties. This can be
done using the “Copy to Property” action. Simply add this
action as many times as needed to copy into the
appropriate properties.
You should have something similar to what is shown to the
right. Bear in mind that you may need to create custom
properties if you haven’t already done so!
Add your code (Option 3)
Step 4: Create the Workflow
This option uses Axios and updates the company records
using the HubSpot API Client. It operates in much the
same way as the previous examples but instead we don’t
use the “Copy to Property” action we simply update the
Company using the HubSpot CRM API.
View Code Snippet
The finished product(s)
Step 4: Create the Workflow
Depending on whether you went with example 1, 2 or
3 you should have a similar output to the screenshots
on the right. You are of course free to modify further.
For instance you could just to add additional code
actions or if/then logic to enroll the company in
industry specific or tech specific workflows for ABM
(Account Based Marketing).
Step 5:
Test the Workflow
Providing you’ve now setup the database and the workflow it is time
to test to ensure all is working as expected. Create a company
within the CRM, they should be enrolled into the workflow.
Test the Workflow
Step 5: Test the Workflow
All custom coded workflow actions can be tested prior to turning the
workflow on. Simply click on the “Test action” title in the sidebar.
Enter the name of the company to enroll and click “Test”. You should
see something similar to the screenshot on the slide.
Also, be mindful that whilst running a test will run the code snippet in
isolation from the rest of the workflow the code will actually run so it
might be wise to use a test record for safe measure.
If you are happy with the results you can turn your workflow on and
any time you add companies to the CRM a request will be made to
Clearbit and data will be copied to the appropriate properties.
PROTIP:
If you add any console.log() statements to your code they’ll also
render in the log when testing the action, this can be particularly
useful when trying to debug your code.
Congratulations!
You’ve successfully created a custom coded workflow action that
queries a third party API (Clearbit) and updates data within the
Hubspot CRM.
Questions
Please feel free to ask any questions that you might have
Connect with me
For more tips, tricks and tutorials feel free
to connect with me on LinkedIn
https://www.linkedin.com/in/jackcoldrick/
Resources
Custom Coded Workflow Actions
● Workshop 1 Code Snippets
● 3 Ways to Use Custom Coded Workflow Actions -
Developer blog post
● Clearbit API Documentation
● Clearbit HubSpot Integration
● Use Custom Coded Actions in Workflows - Knowledge
base article
● Custom Coded Workflow Actions - Developer
Documentation
● Programmable Automation Use Case Library
● Operations Hub Product Page
● Operations Hub Community
● Previous Community Workshops
○ Workshop #1
○ Workshop #2
○ Workshop #3
There are a ton of useful resources online
relating to operations hub and custom coded
workflow actions specifically. On the left are
some of the resources I would recommend
reviewing to learn more. I’d also highly
recommend checking out my blog post below

More Related Content

Similar to Customer Automation Masterclass - Workshop 1: Data Enrichment using Clearbit

Implementing Your Full Stack App with MongoDB Stitch (Tutorial)
Implementing Your Full Stack App with MongoDB Stitch (Tutorial)Implementing Your Full Stack App with MongoDB Stitch (Tutorial)
Implementing Your Full Stack App with MongoDB Stitch (Tutorial)MongoDB
 
Building the Foundation for Smart SEO: Basic Reporting in Adobe SiteCatalyst
Building the Foundation for Smart SEO: Basic Reporting in Adobe SiteCatalystBuilding the Foundation for Smart SEO: Basic Reporting in Adobe SiteCatalyst
Building the Foundation for Smart SEO: Basic Reporting in Adobe SiteCatalystInfinitive
 
Niketas' Marketing Automation Overview 8.26.13
Niketas' Marketing Automation Overview 8.26.13Niketas' Marketing Automation Overview 8.26.13
Niketas' Marketing Automation Overview 8.26.13Nicole Seibert
 
Niketas marketing automation 8.26.13
Niketas marketing automation 8.26.13Niketas marketing automation 8.26.13
Niketas marketing automation 8.26.13Nicole Seibert
 
DF19 South-East Florida Global Gathering
DF19 South-East Florida Global GatheringDF19 South-East Florida Global Gathering
DF19 South-East Florida Global GatheringLuis E. Luciani ☁
 
Unleash the Power of HubSpot's AI Tools - HIVE Strategy HUG.pdf
Unleash the Power of HubSpot's AI Tools -  HIVE Strategy HUG.pdfUnleash the Power of HubSpot's AI Tools -  HIVE Strategy HUG.pdf
Unleash the Power of HubSpot's AI Tools - HIVE Strategy HUG.pdfDustin Brackett
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Complete Ga Power User Web
Complete Ga Power User WebComplete Ga Power User Web
Complete Ga Power User WebRoman Zykov
 
Top 10 highlights salesforce winter 18 release
Top 10 highlights salesforce winter 18 releaseTop 10 highlights salesforce winter 18 release
Top 10 highlights salesforce winter 18 releaseNigam Goyal
 
LITE 2018 – A Deep Dive Into the API [Iain Brown]
LITE 2018 – A Deep Dive Into the API [Iain Brown]LITE 2018 – A Deep Dive Into the API [Iain Brown]
LITE 2018 – A Deep Dive Into the API [Iain Brown]getadministrate
 
Open erp6.1releasenotes
Open erp6.1releasenotesOpen erp6.1releasenotes
Open erp6.1releasenotesAbdallah Saidi
 
How to Integrate Google Adwords API in Laravel App.pdf
How to Integrate Google Adwords API in Laravel App.pdfHow to Integrate Google Adwords API in Laravel App.pdf
How to Integrate Google Adwords API in Laravel App.pdfKaty Slemon
 
APIs are for People Too
APIs are for People TooAPIs are for People Too
APIs are for People TooLisa Dusseault
 
How to Integrate Google Adwords API in Laravel App.pdf
How to Integrate Google Adwords API in Laravel App.pdfHow to Integrate Google Adwords API in Laravel App.pdf
How to Integrate Google Adwords API in Laravel App.pdfKaty Slemon
 
Codemotion Rome 2015 Bluemix Lab Tutorial
Codemotion Rome 2015 Bluemix Lab TutorialCodemotion Rome 2015 Bluemix Lab Tutorial
Codemotion Rome 2015 Bluemix Lab Tutorialgjuljo
 
Adobe Marketo India VMUG Webhooks and API Basics_02-28.pptx
Adobe Marketo India VMUG Webhooks and API Basics_02-28.pptxAdobe Marketo India VMUG Webhooks and API Basics_02-28.pptx
Adobe Marketo India VMUG Webhooks and API Basics_02-28.pptxDarshil35
 
SAP SuccessFactors Instance.pdf
SAP SuccessFactors Instance.pdfSAP SuccessFactors Instance.pdf
SAP SuccessFactors Instance.pdfMohammed Ahmed
 

Similar to Customer Automation Masterclass - Workshop 1: Data Enrichment using Clearbit (20)

Lightning Process Builder
Lightning Process BuilderLightning Process Builder
Lightning Process Builder
 
Lightning Process Builder
Lightning Process BuilderLightning Process Builder
Lightning Process Builder
 
PowerBI Embedded in D365 Finance and Operations
PowerBI Embedded in D365 Finance and OperationsPowerBI Embedded in D365 Finance and Operations
PowerBI Embedded in D365 Finance and Operations
 
Implementing Your Full Stack App with MongoDB Stitch (Tutorial)
Implementing Your Full Stack App with MongoDB Stitch (Tutorial)Implementing Your Full Stack App with MongoDB Stitch (Tutorial)
Implementing Your Full Stack App with MongoDB Stitch (Tutorial)
 
Building the Foundation for Smart SEO: Basic Reporting in Adobe SiteCatalyst
Building the Foundation for Smart SEO: Basic Reporting in Adobe SiteCatalystBuilding the Foundation for Smart SEO: Basic Reporting in Adobe SiteCatalyst
Building the Foundation for Smart SEO: Basic Reporting in Adobe SiteCatalyst
 
Niketas' Marketing Automation Overview 8.26.13
Niketas' Marketing Automation Overview 8.26.13Niketas' Marketing Automation Overview 8.26.13
Niketas' Marketing Automation Overview 8.26.13
 
Niketas marketing automation 8.26.13
Niketas marketing automation 8.26.13Niketas marketing automation 8.26.13
Niketas marketing automation 8.26.13
 
DF19 South-East Florida Global Gathering
DF19 South-East Florida Global GatheringDF19 South-East Florida Global Gathering
DF19 South-East Florida Global Gathering
 
Unleash the Power of HubSpot's AI Tools - HIVE Strategy HUG.pdf
Unleash the Power of HubSpot's AI Tools -  HIVE Strategy HUG.pdfUnleash the Power of HubSpot's AI Tools -  HIVE Strategy HUG.pdf
Unleash the Power of HubSpot's AI Tools - HIVE Strategy HUG.pdf
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Complete Ga Power User Web
Complete Ga Power User WebComplete Ga Power User Web
Complete Ga Power User Web
 
Top 10 highlights salesforce winter 18 release
Top 10 highlights salesforce winter 18 releaseTop 10 highlights salesforce winter 18 release
Top 10 highlights salesforce winter 18 release
 
LITE 2018 – A Deep Dive Into the API [Iain Brown]
LITE 2018 – A Deep Dive Into the API [Iain Brown]LITE 2018 – A Deep Dive Into the API [Iain Brown]
LITE 2018 – A Deep Dive Into the API [Iain Brown]
 
Open erp6.1releasenotes
Open erp6.1releasenotesOpen erp6.1releasenotes
Open erp6.1releasenotes
 
How to Integrate Google Adwords API in Laravel App.pdf
How to Integrate Google Adwords API in Laravel App.pdfHow to Integrate Google Adwords API in Laravel App.pdf
How to Integrate Google Adwords API in Laravel App.pdf
 
APIs are for People Too
APIs are for People TooAPIs are for People Too
APIs are for People Too
 
How to Integrate Google Adwords API in Laravel App.pdf
How to Integrate Google Adwords API in Laravel App.pdfHow to Integrate Google Adwords API in Laravel App.pdf
How to Integrate Google Adwords API in Laravel App.pdf
 
Codemotion Rome 2015 Bluemix Lab Tutorial
Codemotion Rome 2015 Bluemix Lab TutorialCodemotion Rome 2015 Bluemix Lab Tutorial
Codemotion Rome 2015 Bluemix Lab Tutorial
 
Adobe Marketo India VMUG Webhooks and API Basics_02-28.pptx
Adobe Marketo India VMUG Webhooks and API Basics_02-28.pptxAdobe Marketo India VMUG Webhooks and API Basics_02-28.pptx
Adobe Marketo India VMUG Webhooks and API Basics_02-28.pptx
 
SAP SuccessFactors Instance.pdf
SAP SuccessFactors Instance.pdfSAP SuccessFactors Instance.pdf
SAP SuccessFactors Instance.pdf
 

Recently uploaded

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 

Customer Automation Masterclass - Workshop 1: Data Enrichment using Clearbit

  • 1. Custom Coded Workflow Actions - Workshop Data Enrichment using Clearbit Jack Coldrick, Principal Solutions Engineer @ HubSpot
  • 2. Overview Custom Coded Workflow Actions Workshop ● What will we be doing in this workshop? ● What is a custom coded workflow action? ● Practical: ○ Step 1: Setup a HubSpot Developer Account ○ Step 2: Setup a Clearbit Account ○ Step 3: Create Custom Properties ○ Step 4: Create the Workflow ○ Step 5: Test the Workflow ● Questions ● Useful Resources 60 minutes
  • 3. What will we be doing in this workshop? Your CRM is only as good as the data that is in it. There are tons of data enrichment tools available that can help sales and marketing teams to work more efficiently. In this workshop we’ll be integrating with Clearbit to pull in some information which can be used for account based marketing/selling.
  • 4. What is a custom coded workflow action? Custom coded workflow actions are a feature included with HubSpot's Operations Hub Professional and allow you to write code in Javascript within a Node JS Runtime environment to solve for specific use cases and processes relevant to your business. Learn More Use Cases Blog Post
  • 5. Step 1: Setup a Developer Account This is an important step, setting up a developer account. You can do this by clicking on the link below. Once you’ve set this up you will have a special HubSpot portal where you can create up to 10 test portals that will allow you to try and test functionality in a controlled environment. If you already have a developer account feel free to skip this section! Create a developer account
  • 6. An overview of the developer account Step 1: Setup a Developer Account When you finish setting up your developer account you will see something similar to the screenshot on the left. There are a couple of items in the navigation bar: ● Apps - Register applications and manage scopes so that it can be installed in different portals. ● Testing - Create test portals to try/test HubSpot functionality. Each lasts 90 days and can be renewed manually for a further 90 days. ● App Marketplace - Manage your app listing ● Docs - Links to the developer documentation ● Forums - Links to the developer community, a great place to ask questions and converse with like minded individuals.
  • 7. Create a test account Step 1: Setup a Developer Account Test accounts are a great way to try/test functionality in an isolated environment. They provide access to the enterprise suite of HubSpot. You can create a maximum of 10 test portals, each of which lasts for a total of 90 days. They can be manually renewed for a further 90 if desired. 1. Click on “Testing” and in the window that appears click “Create app test account” 2. In the pop up give your account a name and click “Ok” 3. You should see the account in the list, click into it to access your enterprise developer environment. This is where we’ll build our custom coded workflow actions. #1 #2 #3
  • 8. Step 2: Create a Clearbit Account In this section we’ll be setting up a free account with Clearbit so that we can create an API key and begin to make calls to their open and flexible API, specifically the Data Enrichment APIs. Create Clearbit Account
  • 9. Setup a Clearbit Account Step 2: Setup a Clearbit Account If you don’t already have one an important step is to setup a Clearbit account. You can do this by clicking on the link below: https://clearbit.com/ Once you’ve done this you should have access to your Clearbit Dashboard. What is Clearbit? Clearbit is the marketing data platform behind the fastest-growing B2B companies. Apply real-time intelligence across your entire stack to improve acquisition, conversion, and operations. Clearbit delivers complete, always-fresh visitor, contact, and account profiles, so you’re prepared to reach the right people, make great first impressions, and nurture relationships throughout their lifecycle.
  • 10. Step 3: Create Custom Properties Clearbit returns lots of useful information that we can pass into HubSpot. Decide which data points are important to you and create the appropriate custom properties in HubSpot to store this information. View Data Returned by Clearbit
  • 11. Create Custom Properties Step 3: Create Custom Properties For the purposes of this workshop I will be creating custom properties to store values for “Domain Aliases”, “Sub Industry” and “Tech”. This is by no means an exhaustive list and you are free to create whatever properties you like to hold whatever information you feel is necessary. Information on creating custom properties can be found here.
  • 12. Step 4: Create the Workflow Now that we’ve created our Clearbit account and have an API key we can create a workflow in HubSpot to execute some custom code that queries the API when a company is created. Get the Code
  • 13. Create Workflow Step 4: Create the Workflow Within your test account hover over “Automation” and select “Workflows”. You are now within HubSpot's automation tool. From here select “Create workflow”. You will be prompted to select a template, instead click on the “start from scratch” tab and ensure “Company-based” is selected. Once this is done click on “next” and you’ll be taken into the workflow builder screen.
  • 14. Define enrollment Criteria Step 4: Create the Workflow Now we must define our enrollment criteria, in theory you could set this to anything you like but for the purposes of this workshop we’re simply going to use “Create date is known”. In other words, any time a company is created in the CRM this workflow will be triggered.
  • 15. Choose an action Step 4: Create the Workflow There are many different types of actions you can choose to execute within a workflow. For the purposes of this workshop we’re going to be using “Custom Coded Action” - exclusive to Operations Hub Professional. Worth noting Operations Hub also gives you the “Trigger webhook” action and “Format data” action. They’re not going to be leveraged in this workshop.
  • 16. Create custom coded action Step 4: Create the Workflow When you click on the “Custom code” action a sidebar similar to the one shown on the left will appear. Couple of things to point out… ● Secrets - define any sort of variables like usernames, passwords that you’d like to reference in your code but keep private. ● Property to include in code - define any properties relating to the enrolled object that you’d like to reference in your code. ● Code - Your javascript or python, we provide a template by default. ● Data outputs - define any data you’d like the custom code action to pass back to the workflow to reference at a later step.
  • 17. Add your secrets Step 4: Create the Workflow Secrets - define any sort of variables like usernames, passwords that you’d like to reference in your code but keep private. We want to add our Clearbit API key, we may also wish to add our HubSpot API key at this point if we want to use the HubSpot APIs at a later stage. You can access your Clearbit API key by navigating to Clearbit Dashboard and clicking “API”. Then simply copy the value into HubSpot as shown here. You can access your Hubspot API key by following the instructions here. Secrets can be referenced using “process.env.SECRET_NAME”
  • 18. Define your inputs Step 4: Create the Workflow Property to include in code - define any properties relating to the enrolled object that you’d like to reference in your code. This is useful as it means we don’t need to make any unnecessary requests to the HubSpot API which is rate limited and we can also reference outputs from other custom coded workflow actions. You can reference these properties using: event.inputFields[‘PROPERTY_NAME’]
  • 19. Add your code (Option 1) Step 4: Create the Workflow This option uses the Node Request Library. A HTTP GET request is made to Clearbit Enrichment API and the data returned is then passed back to the workflow for later use. View Code Snippet
  • 20. Add your code (Option 2) Step 4: Create the Workflow This option uses the Node Axios Library. A HTTP GET request is made to Clearbit Enrichment API and the data returned is then passed back to the workflow for later use. View Code Snippet
  • 21. Add Data Outputs Step 4: Create the Workflow Data outputs - define any data you’d like the custom code action to pass back to the workflow to reference at a later step.
  • 22. Add “Copy to Property” action Step 4: Create the Workflow We want to use the output from our custom coded actions to pass information into company properties. This can be done using the “Copy to Property” action. Simply add this action as many times as needed to copy into the appropriate properties. You should have something similar to what is shown to the right. Bear in mind that you may need to create custom properties if you haven’t already done so!
  • 23. Add your code (Option 3) Step 4: Create the Workflow This option uses Axios and updates the company records using the HubSpot API Client. It operates in much the same way as the previous examples but instead we don’t use the “Copy to Property” action we simply update the Company using the HubSpot CRM API. View Code Snippet
  • 24. The finished product(s) Step 4: Create the Workflow Depending on whether you went with example 1, 2 or 3 you should have a similar output to the screenshots on the right. You are of course free to modify further. For instance you could just to add additional code actions or if/then logic to enroll the company in industry specific or tech specific workflows for ABM (Account Based Marketing).
  • 25. Step 5: Test the Workflow Providing you’ve now setup the database and the workflow it is time to test to ensure all is working as expected. Create a company within the CRM, they should be enrolled into the workflow.
  • 26. Test the Workflow Step 5: Test the Workflow All custom coded workflow actions can be tested prior to turning the workflow on. Simply click on the “Test action” title in the sidebar. Enter the name of the company to enroll and click “Test”. You should see something similar to the screenshot on the slide. Also, be mindful that whilst running a test will run the code snippet in isolation from the rest of the workflow the code will actually run so it might be wise to use a test record for safe measure. If you are happy with the results you can turn your workflow on and any time you add companies to the CRM a request will be made to Clearbit and data will be copied to the appropriate properties. PROTIP: If you add any console.log() statements to your code they’ll also render in the log when testing the action, this can be particularly useful when trying to debug your code.
  • 27. Congratulations! You’ve successfully created a custom coded workflow action that queries a third party API (Clearbit) and updates data within the Hubspot CRM.
  • 28. Questions Please feel free to ask any questions that you might have
  • 29. Connect with me For more tips, tricks and tutorials feel free to connect with me on LinkedIn https://www.linkedin.com/in/jackcoldrick/
  • 30. Resources Custom Coded Workflow Actions ● Workshop 1 Code Snippets ● 3 Ways to Use Custom Coded Workflow Actions - Developer blog post ● Clearbit API Documentation ● Clearbit HubSpot Integration ● Use Custom Coded Actions in Workflows - Knowledge base article ● Custom Coded Workflow Actions - Developer Documentation ● Programmable Automation Use Case Library ● Operations Hub Product Page ● Operations Hub Community ● Previous Community Workshops ○ Workshop #1 ○ Workshop #2 ○ Workshop #3 There are a ton of useful resources online relating to operations hub and custom coded workflow actions specifically. On the left are some of the resources I would recommend reviewing to learn more. I’d also highly recommend checking out my blog post below

Editor's Notes

  1. For more tips, tricks and tutorials feel free to connect with me on LinkedIn https://www.linkedin.com/in/jackcoldrick/
  2. For more tips, tricks and tutorials feel free to connect with me on LinkedIn https://www.linkedin.com/in/jackcoldrick/