Skip to content

Instantly share code, notes, and snippets.

@jackcoldrick90
Created August 22, 2023 08:55
Show Gist options
  • Save jackcoldrick90/80d88c99dfc70337ce184f2bb33744ad to your computer and use it in GitHub Desktop.
Save jackcoldrick90/80d88c99dfc70337ce184f2bb33744ad to your computer and use it in GitHub Desktop.
Sample response demonstrating how HubSpot CRM Cards work - https://developers.hubspot.com/docs/api/crm/extensions/custom-cards
{
"results": [
{
"objectId": 245,
"title": "Example Title",
"link": "https://developers.hubspot.com/docs/api/crm/extensions/custom-cards",
"stringExample": "CRM Cards are really cool",
"statusExample": "Success",
"numberExample": 55.95,
"linkExample": "https://developers.hubspot.com",
"emailExample": "jackcoldrick@demo.com",
"dateExample": "2023-08-22",
"dateTimeExample": "2023-08-22T09:30:00.000Z",
"currencyExample": {
"value": "95.50",
"currencyCode": "USD"
},
"properties": [
{
"label": "Prop1",
"dataType": "EMAIL",
"value": "jackcoldrick@demo.com"
},
{
"label": "Prop2",
"dataType": "STRING",
"value": "Some value"
},
{
"label": "Prop3",
"dataType": "CURRENCY",
"value": "94.34",
"currencyCode": "GBP"
}
],
"actions": [
{
"type": "IFRAME",
"width": 890,
"height": 890,
"uri": "https://5019b1b4c81edc261b42efb844ba6cbc.m.pipedream.net",
"label": "Action 1 - IFRAME",
"associatedObjectProperties": ["firstname", "lastname", "universe"]
},
{
"type": "ACTION_HOOK",
"httpMethod": "PUT",
"associatedObjectProperties": ["firstname", "lastname", "universe"],
"uri": "https://b606d576a69b599b5900f96fc4ae6002.m.pipedream.net",
"label": "Action 2 - PUT"
},
{
"type": "CONFIRMATION_ACTION_HOOK",
"confirmationMessage": "Are you sure you want to delete this item?",
"confirmButtonText": "Yes",
"cancelButtonText": "No",
"httpMethod": "DELETE",
"associatedObjectProperties": ["firstname", "lastname", "universe"],
"uri": "https://b606d576a69b599b5900f96fc4ae6002.m.pipedream.net",
"label": "Action 3 - DELETE"
}
]
}
],
"settingsAction": {
"type": "IFRAME",
"width": 890,
"height": 890,
"uri": "https://5019b1b4c81edc261b42efb844ba6cbc.m.pipedream.net",
"label": "Settings"
},
"primaryAction": {
"type": "IFRAME",
"width": 890,
"height": 890,
"uri": "https://5019b1b4c81edc261b42efb844ba6cbc.m.pipedream.net",
"label": "Primary Action"
},
"secondaryActions": [
{
"type": "ACTION_HOOK",
"httpMethod": "POST",
"uri": "https://b606d576a69b599b5900f96fc4ae6002.m.pipedream.net",
"label": "Action Example - POST",
"associatedObjectProperties": [
"firstname", "lastname", "current_enemies"
]
},
{
"type": "CONFIRMATION_ACTION_HOOK",
"httpMethod": "POST",
"uri": "https://b606d576a69b599b5900f96fc4ae6002.m.pipedream.net",
"label": "Confirmation Action Example - POST",
"associatedObjectProperties": [
"firstname", "lastname", "current_enemies"
],
"confirmationMessage": "Are you sure you want to run example action?",
"confirmButtonText": "Yes",
"cancelButtonText": "No"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment