SlideShare uma empresa Scribd logo
1 de 31
Custom Coded Workflow Actions - Workshop
Email Validation using Kickbox
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 Kickbox 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?
Ensuring that the email addresses within your CRM are of a high
standard is not only important from a marketing standpoint but also
from a sales perspective. In this workshop we will be integrating with
Kickbox to validate emails as contacts are created. Any contacts
identified as having a low quality email will be deleted. Not only will
this help from an email deliverability standpoint (less bounces) but it
will also save your sales teams time and effort.
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 or Python 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 special 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 Kickbox Account
In this section we’ll be setting up a free account with Kickbox so that
we can create an API key and begin to make calls to their open and
flexible API, specifically the Email Verification API.
Create Kickbox Account
Setup a Kickbox Account
Step 2: Setup a Clearbit Account
If you don’t already have one an important step
is to setup a Kickbox account. You can do this
by clicking on the link below:
https://kickbox.com/
Once you’ve done this you should have access
to your Kickbox Dashboard.
What is Kickbox?
Kickbox’s network provides real
results for more email addresses.
Billions of daily email events from
their email partners allow them to
provide untouchably accurate
results and unparalleled
performance. This ensures their
customers consistently see greater
than 99% deliverability.
Step 3:
Create Custom Properties
Kickbox 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 Kickbox
Create Custom Properties
Step 3: Create Custom Properties
For the purposes of this workshop I will be
creating custom properties to store values
for “Disposable Address”, “Free Address”,
“Reason”, “Result”, “Role Address” and
“Sendex”.
Kickbox returns a few other properties as
part of their email verification API and you’re
free to utilise them if you wish.
Information on creating custom properties
can be found here.
Step 4:
Create the Workflow
Now that we’ve created our Kickbox account and have an API key
we can create a workflow in HubSpot to execute some custom code
that queries the API when a contact 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 “Contact-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 contact 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 Kickbox 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 Kickbox API key by navigating to
Kickbox Dashboard and clicking “API > Manage Keys”.
Then simply copy the value into HubSpot as shown here.
You can access your Hubspot API key by following the
instructions here.
Secrets are referenced in different ways depending on whether
you use NodeJS or Python.
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 Kickbox Email Verification 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 Kickbox Email Verification API and the
data returned is then passed back to the workflow for later
use.
View Code Snippet
Add your code (Option 3)
Step 4: Create the Workflow
This option uses Pythons requests library to make a GET
request to the Kickbox Email Verification API, we then
decode the response using the json library 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 contact 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 4)
Step 4: Create the Workflow
This option uses Axios and updates the contact 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
Contact 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, 3
or 4 you should have a similar output to the
screenshots on the right. You are of course free to
modify further. For instance you could use if/then
logic to decide what step to take based on the data
returned from Kickbox:
Step 5:
Test the Workflow
Providing you’ve setup the workflow it is time to test to ensure all is
working as expected. Create a contact 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 contact 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 contacts to the CRM a request will be made to
Kickbox and data will be copied to the appropriate properties.
PROTIP:
If you add any console.log() or if using python print() 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 (Kickbox) 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 2 Code Snippets
● 3 Ways to Use Custom Coded Workflow Actions -
Developer blog post
● Kickbox API Documentation
● Kickbox 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
○ Data enrichment using Clearbit
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

Mais conteúdo relacionado

Mais procurados

Share point 2013 features Workflow
Share point 2013 features WorkflowShare point 2013 features Workflow
Share point 2013 features Workflow
Raghu Raja
 
Share point workflow presentation
Share point workflow presentationShare point workflow presentation
Share point workflow presentation
Wyngate Solutions
 
Creating attachments to work items or to user decisions in workflows
Creating attachments to work items or to user decisions in workflowsCreating attachments to work items or to user decisions in workflows
Creating attachments to work items or to user decisions in workflows
Hicham Khallouki
 
Tutorial: Building Apps for SharePoint 2013 Inside and Outside of the Firewal...
Tutorial: Building Apps for SharePoint 2013 Inside and Outside of the Firewal...Tutorial: Building Apps for SharePoint 2013 Inside and Outside of the Firewal...
Tutorial: Building Apps for SharePoint 2013 Inside and Outside of the Firewal...
SPTechCon
 
Open ERP Version 7 Functional & Technical Overview
Open ERP Version 7 Functional & Technical OverviewOpen ERP Version 7 Functional & Technical Overview
Open ERP Version 7 Functional & Technical Overview
Pragmatic Techsoft
 

Mais procurados (19)

Integrate OutSystems With Office 365
Integrate OutSystems With Office 365Integrate OutSystems With Office 365
Integrate OutSystems With Office 365
 
Winter 22 features
Winter 22 featuresWinter 22 features
Winter 22 features
 
Creating SharePoint 2013 Workflows
Creating SharePoint 2013 WorkflowsCreating SharePoint 2013 Workflows
Creating SharePoint 2013 Workflows
 
How to crack java script certification
How to crack java script certificationHow to crack java script certification
How to crack java script certification
 
Go Faster with Process Builder
Go Faster with Process BuilderGo Faster with Process Builder
Go Faster with Process Builder
 
Build scalable SharePoint 2013 Staged Workflows to run locally and in the Cloud
Build scalable SharePoint 2013 Staged Workflows to run locally and in the CloudBuild scalable SharePoint 2013 Staged Workflows to run locally and in the Cloud
Build scalable SharePoint 2013 Staged Workflows to run locally and in the Cloud
 
Share point 2013 features Workflow
Share point 2013 features WorkflowShare point 2013 features Workflow
Share point 2013 features Workflow
 
SharePoint 2010 Workflows
SharePoint 2010 WorkflowsSharePoint 2010 Workflows
SharePoint 2010 Workflows
 
Getting started with SharePoint 2013 Workflows
Getting started with SharePoint 2013 WorkflowsGetting started with SharePoint 2013 Workflows
Getting started with SharePoint 2013 Workflows
 
Share point workflow presentation
Share point workflow presentationShare point workflow presentation
Share point workflow presentation
 
Consuming web services_ax2012
Consuming web services_ax2012Consuming web services_ax2012
Consuming web services_ax2012
 
Creating attachments to work items or to user decisions in workflows
Creating attachments to work items or to user decisions in workflowsCreating attachments to work items or to user decisions in workflows
Creating attachments to work items or to user decisions in workflows
 
Workflow in SharePoint 2013
Workflow in SharePoint 2013Workflow in SharePoint 2013
Workflow in SharePoint 2013
 
Tutorial: Building Apps for SharePoint 2013 Inside and Outside of the Firewal...
Tutorial: Building Apps for SharePoint 2013 Inside and Outside of the Firewal...Tutorial: Building Apps for SharePoint 2013 Inside and Outside of the Firewal...
Tutorial: Building Apps for SharePoint 2013 Inside and Outside of the Firewal...
 
WordPress + Office 365 | Employee directory v9.x
WordPress + Office 365 | Employee directory v9.xWordPress + Office 365 | Employee directory v9.x
WordPress + Office 365 | Employee directory v9.x
 
SharePoint Framework at a glance
SharePoint Framework at a glanceSharePoint Framework at a glance
SharePoint Framework at a glance
 
MongoDB.local Dallas 2019: MongoDB Stitch Tutorial
MongoDB.local Dallas 2019: MongoDB Stitch TutorialMongoDB.local Dallas 2019: MongoDB Stitch Tutorial
MongoDB.local Dallas 2019: MongoDB Stitch Tutorial
 
Open ERP Version 7 Functional & Technical Overview
Open ERP Version 7 Functional & Technical OverviewOpen ERP Version 7 Functional & Technical Overview
Open ERP Version 7 Functional & Technical Overview
 
Building Dynamic UI with Visual Workflow Runtime API
Building Dynamic UI with Visual Workflow Runtime APIBuilding Dynamic UI with Visual Workflow Runtime API
Building Dynamic UI with Visual Workflow Runtime API
 

Semelhante a Custom Automation Masterclass – Workshop 2: Email validation using kKckbox

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
 
SH 2 - SES 1 - Stitch_Workshop_TLV.pptx
SH 2 - SES 1 - Stitch_Workshop_TLV.pptxSH 2 - SES 1 - Stitch_Workshop_TLV.pptx
SH 2 - SES 1 - Stitch_Workshop_TLV.pptx
MongoDB
 
x 13118706 Artur Janka Project Presentation
x 13118706 Artur Janka Project Presentation x 13118706 Artur Janka Project Presentation
x 13118706 Artur Janka Project Presentation
Artur Janka
 
Getting started for lean launch pad web projects rev4
Getting started for lean launch pad web projects rev4Getting started for lean launch pad web projects rev4
Getting started for lean launch pad web projects rev4
Stanford University
 

Semelhante a Custom Automation Masterclass – Workshop 2: Email validation using kKckbox (20)

Customer Automation Masterclass - Workshop 1: Data Enrichment using Clearbit
Customer Automation Masterclass - Workshop 1: Data Enrichment using ClearbitCustomer Automation Masterclass - Workshop 1: Data Enrichment using Clearbit
Customer Automation Masterclass - Workshop 1: Data Enrichment using Clearbit
 
HTML5 Up and Running
HTML5 Up and RunningHTML5 Up and Running
HTML5 Up and Running
 
Point and Click App Building Workshop
Point and Click App Building WorkshopPoint and Click App Building Workshop
Point and Click App Building Workshop
 
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)
 
APIS for Startups - Running your Business Inside Out
APIS for Startups - Running your Business Inside OutAPIS for Startups - Running your Business Inside Out
APIS for Startups - Running your Business Inside Out
 
Azure integration in dynamic crm
Azure integration in dynamic crmAzure integration in dynamic crm
Azure integration in dynamic crm
 
Dev day paris020415
Dev day paris020415Dev day paris020415
Dev day paris020415
 
Lightning Process Builder
Lightning Process BuilderLightning Process Builder
Lightning Process Builder
 
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
 
DF19 South-East Florida Global Gathering
DF19 South-East Florida Global GatheringDF19 South-East Florida Global Gathering
DF19 South-East Florida Global Gathering
 
I Love APIs - Oct 2015
I Love APIs - Oct 2015I Love APIs - Oct 2015
I Love APIs - Oct 2015
 
Link your HTML Form to Google Sheet in just 3 Steps.pdf
Link your HTML Form to Google Sheet in just 3 Steps.pdfLink your HTML Form to Google Sheet in just 3 Steps.pdf
Link your HTML Form to Google Sheet in just 3 Steps.pdf
 
Learn to build a CodeIgniter Login and Registration with source code.pdf
Learn to build a CodeIgniter Login and Registration with source code.pdfLearn to build a CodeIgniter Login and Registration with source code.pdf
Learn to build a CodeIgniter Login and Registration with source code.pdf
 
SH 2 - SES 1 - Stitch_Workshop_TLV.pptx
SH 2 - SES 1 - Stitch_Workshop_TLV.pptxSH 2 - SES 1 - Stitch_Workshop_TLV.pptx
SH 2 - SES 1 - Stitch_Workshop_TLV.pptx
 
x 13118706 Artur Janka Project Presentation
x 13118706 Artur Janka Project Presentation x 13118706 Artur Janka Project Presentation
x 13118706 Artur Janka Project Presentation
 
Getting started for lean launch pad web projects rev4
Getting started for lean launch pad web projects rev4Getting started for lean launch pad web projects rev4
Getting started for lean launch pad web projects rev4
 
APIs are for People Too
APIs are for People TooAPIs are for People Too
APIs are for People Too
 
Chatter Actions - Short Version
Chatter Actions - Short VersionChatter Actions - Short Version
Chatter Actions - Short Version
 
M365 global developer bootcamp 2019 Intro to SPFx Version
M365 global developer bootcamp 2019 Intro to SPFx VersionM365 global developer bootcamp 2019 Intro to SPFx Version
M365 global developer bootcamp 2019 Intro to SPFx Version
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
[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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 

Custom Automation Masterclass – Workshop 2: Email validation using kKckbox

  • 1. Custom Coded Workflow Actions - Workshop Email Validation using Kickbox 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 Kickbox 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? Ensuring that the email addresses within your CRM are of a high standard is not only important from a marketing standpoint but also from a sales perspective. In this workshop we will be integrating with Kickbox to validate emails as contacts are created. Any contacts identified as having a low quality email will be deleted. Not only will this help from an email deliverability standpoint (less bounces) but it will also save your sales teams time and effort.
  • 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 or Python 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 special 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 Kickbox Account In this section we’ll be setting up a free account with Kickbox so that we can create an API key and begin to make calls to their open and flexible API, specifically the Email Verification API. Create Kickbox Account
  • 9. Setup a Kickbox Account Step 2: Setup a Clearbit Account If you don’t already have one an important step is to setup a Kickbox account. You can do this by clicking on the link below: https://kickbox.com/ Once you’ve done this you should have access to your Kickbox Dashboard. What is Kickbox? Kickbox’s network provides real results for more email addresses. Billions of daily email events from their email partners allow them to provide untouchably accurate results and unparalleled performance. This ensures their customers consistently see greater than 99% deliverability.
  • 10. Step 3: Create Custom Properties Kickbox 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 Kickbox
  • 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 “Disposable Address”, “Free Address”, “Reason”, “Result”, “Role Address” and “Sendex”. Kickbox returns a few other properties as part of their email verification API and you’re free to utilise them if you wish. Information on creating custom properties can be found here.
  • 12. Step 4: Create the Workflow Now that we’ve created our Kickbox account and have an API key we can create a workflow in HubSpot to execute some custom code that queries the API when a contact 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 “Contact-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 contact 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 Kickbox 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 Kickbox API key by navigating to Kickbox Dashboard and clicking “API > Manage Keys”. Then simply copy the value into HubSpot as shown here. You can access your Hubspot API key by following the instructions here. Secrets are referenced in different ways depending on whether you use NodeJS or Python.
  • 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 Kickbox Email Verification 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 Kickbox Email Verification API and the data returned is then passed back to the workflow for later use. View Code Snippet
  • 21. Add your code (Option 3) Step 4: Create the Workflow This option uses Pythons requests library to make a GET request to the Kickbox Email Verification API, we then decode the response using the json library and the data returned is then passed back to the workflow for later use. View Code Snippet
  • 22. 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.
  • 23. 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 contact 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!
  • 24. Add your code (Option 4) Step 4: Create the Workflow This option uses Axios and updates the contact 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 Contact using the HubSpot CRM API. View Code Snippet
  • 25. The finished product(s) Step 4: Create the Workflow Depending on whether you went with example 1, 2, 3 or 4 you should have a similar output to the screenshots on the right. You are of course free to modify further. For instance you could use if/then logic to decide what step to take based on the data returned from Kickbox:
  • 26. Step 5: Test the Workflow Providing you’ve setup the workflow it is time to test to ensure all is working as expected. Create a contact within the CRM, they should be enrolled into the workflow.
  • 27. 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 contact 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 contacts to the CRM a request will be made to Kickbox and data will be copied to the appropriate properties. PROTIP: If you add any console.log() or if using python print() 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.
  • 28. Congratulations! You’ve successfully created a custom coded workflow action that queries a third party API (Kickbox) and updates data within the Hubspot CRM.
  • 29. Questions Please feel free to ask any questions that you might have
  • 30. Connect with me For more tips, tricks and tutorials feel free to connect with me on LinkedIn https://www.linkedin.com/in/jackcoldrick/
  • 31. Resources Custom Coded Workflow Actions ● Workshop 2 Code Snippets ● 3 Ways to Use Custom Coded Workflow Actions - Developer blog post ● Kickbox API Documentation ● Kickbox 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 ○ Data enrichment using Clearbit 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

Notas do Editor

  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/