Hello im looking for some information here arround custom buttons / cards /custom objects, im trying to understand what is possible and what is best practice.
I want to add a custom button to the Deal screen that will call out to one of our external sites and create an object via the api, i also want on recipt of success response to open a page to the newly created recored in a new tab/window.
On my investergations the only method i can see of doing this in HubSpot is via a custom card, e.g render of the card will create the object and have an action button on the card that will open said object in a new window when clicked. The issue i have with this is that as far as i can see the only way i can create a custom card to to this is to create a new app via hubspot development site and then install said app into my system.
Is this correct? i can see you can create custom cards directly in an environment but these seem to lack the callout / actions / custom data fields that the app gives you.
I also considderd custom object but as far as i can see you cant add a custom button / action to a custom object.
Can anyone provide some guidance on what would be the best aproche here / if what im attempting is possible?
What you want to do is indeed possible, and you are right that developping an app is the go to solution for it.
You will find the documentation around CRM extensions here, and it will tell you how, by developping and installing an app on your own account, you can add custom actions on an object.
That's the most appropriate way of doing this, although it can be a bit tedious and will require quite some work to achieve.
There's another way, and I've already used this on some clients' account. - create a text property on the deal -> I'll name this 'api_webhook' for this example - make that property visible but not editable by any user
- add it on both the left panel as well as the deal cards
- create a webhook that will start your object creation script
- create a workflow that will populate the 'api_webhook' field with the webhook url + some query parameters required for your script (like the deal id, etc.)
What you'll have : Instead of having a beautiful button with a clear label you'll have a hubspot field with a clickable url (HubSpot automatically identifies urls and adds a link to them) and a less visible field label.
Nevertheless, you'll have a trigger for your api calls in charge of creating the objects in your CRM both on the deal card as well as the deal itself.
This is obviously less ideal, but it does what you want it to do and is way simpler to set up.
Hope this helps ! If it does, please consider marking this answer as a solution 🙂
Best,
Ludwig
CTO @ Mi4 Hubspot Platinum Partner and Integration Expert
Passionate human, very curious about everything data and automation.
What you want to do is indeed possible, and you are right that developping an app is the go to solution for it.
You will find the documentation around CRM extensions here, and it will tell you how, by developping and installing an app on your own account, you can add custom actions on an object.
That's the most appropriate way of doing this, although it can be a bit tedious and will require quite some work to achieve.
There's another way, and I've already used this on some clients' account. - create a text property on the deal -> I'll name this 'api_webhook' for this example - make that property visible but not editable by any user
- add it on both the left panel as well as the deal cards
- create a webhook that will start your object creation script
- create a workflow that will populate the 'api_webhook' field with the webhook url + some query parameters required for your script (like the deal id, etc.)
What you'll have : Instead of having a beautiful button with a clear label you'll have a hubspot field with a clickable url (HubSpot automatically identifies urls and adds a link to them) and a less visible field label.
Nevertheless, you'll have a trigger for your api calls in charge of creating the objects in your CRM both on the deal card as well as the deal itself.
This is obviously less ideal, but it does what you want it to do and is way simpler to set up.
Hope this helps ! If it does, please consider marking this answer as a solution 🙂
Best,
Ludwig
CTO @ Mi4 Hubspot Platinum Partner and Integration Expert
Passionate human, very curious about everything data and automation.