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.
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
For more tips, tricks and tutorials feel free to connect with me on LinkedIn
https://www.linkedin.com/in/jackcoldrick/
For more tips, tricks and tutorials feel free to connect with me on LinkedIn
https://www.linkedin.com/in/jackcoldrick/