⚙ Operations Hub

HubSpot Employee
HubSpot Employee

Q&A Follow-up | Custom Automation Workshop on connecting to an external MySQL Database

Hi everyone,


Thank you for attending our session last Thursday focusing on connecting and querying an external MySQL database using custom coded workflow actions, a feature exclusive to Operations Hub Professional.  As promised I wanted to follow up here with any questions we were unable to address on the day. 


Q: This example uses a cloud-based mySQL instance but would there be any complications to consider for an on-premise SQL server instance?

A: It's true that an on-premise integration would have more complexity but it's not impossible. Perhaps the most important thing you'd need to do is ensure that certain IPs are whitelisted and are able to connect to the SQL server.


Q: Do you have to upgrade to operations hub pro in order to use custom code in workflows?

A: Yes, custom coded workflow actions are a feature of Operations Hub Professional. 


Q: When copying the SQL result in the workflow to a property, will true/false copy over to Yes/No?

A: Yes.


Q: Ruby on Rails uses ActiveRecord to query SQL with simple commands (you don’t have to write raw SQL). Is there something in Node JS you can use to not use write the Raw SQL for querying the database?

A: We don’t actually control the mysql client at all for either javascript or python. You would have to take a look at the documentation for the library here and here.


Q: Does HubSpot allow you to use placeholders instead of direct inline to the SQL code, to be safe from Injection attackers?

A: Similar to the above we don't actually control the MySQL client but placeholders are possible using NodeJS or Python.


Q: When I attempted to go through the first workshop, ClearBit didn’t give me the options needed that were displayed in the video, instead I only got two basic options and none of the API functions. Is there a way to get those?

A: Clearbit have made some adjustments to their interface. However it should still be possible to make certain calls to their API. If you are logged in to your Clearbit account, navigate to their API documentation. Under "authentication" you should see an account API key. For more information you would need to reach out to Clearbit directly.


Q: What type was used to create the boolean property on Hubspots end? 

A: We created a single checkbox custom property.


Q: How can you force a cache reset on Hubspot to get said property to show up in Workflow

A: The best way to resolve this issue is to refresh the page. The newly created property should then be visible from the dropdown when choosing within the action.


Q: Is Hubspot ever going to allow C# as a language to incorporate ASP.Net?

A: No, at present it's possible to create custom coded workflow actions using NodeJS and/or Python. We aren't planning to support additional languages in the future. 


Q: Will this also work well with CPANEL PhpMyAdmin?
A: Yes, what was covered in the session can be done through Cpanel.


Q: Are we locked into MySQL or does PostgreSQL work also, which allows transactions

A: At present it would not be possible to communicate with a PostgreSQL database. You would need to leverage an another library and outside of the ones listed here we don't support this.


I hope the above is helpful and thank you all again for joining. If you've any further questions please feel free to comment below!

Jack Coldrick
Solutions Engineer @ HubSpot
Add me on LinkedIn
0 Replies 0

0 Replies

No replies on this post just yet

No one has replied to this post quite yet. Check back soon to see if someone has a solution, or submit your own reply if you know how to help! Karma is real.

Reply to post

Need help replying? Check out our Community Guidelines