We use cookies to make HubSpot's community a better place. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. To learn more, and to see a full list of cookies we use, check out our Cookie Policy (baked goods not included).
Jan 26, 2022 9:06 AM
Hi,
The action from the ACTION_HOOK of a CRM Card seems not working.
I created a card for a contact object.
The fetch method returns this JSON
{
"results": [
{
"message": "Le contact est prêt à être envoyé dans la gestion des tiers.",
"objectId": 325467165,
"title": "Avertissement"
}
],
"totalCount": 1,
"primaryAction": {
"type": "ACTION_HOOK",
"httpMethod": "POST",
"uri": "https://XXX_my_Uri_XXX/save_gdt",
"label": "Création GDT",
"associatedObjectProperties": [
"hs_object_id",
"email",
"hubspot_owner_id",
"lastmodifieddate"
]
}
}
I can see the button in Hubspot.
When I click the action, Hubspot says "succeded" but my API method is never called.
The Uri in the JSON is the same as a Url that I set in the Custom Actions base Url in the card configuration.
What am I doing wrong ?
What is the way to get my API method to be called ?
Thanks
Jan 27, 2022 9:59 AM
Is this still an issue? Any errors in the logs?
![]() | Make sure to subscribe to our YouTube channel where you can find the HubSpot Community Developer Show |
Jan 28, 2022 2:16 AM
Hi,
I still have the problem.
I have no error message and no logs.
When I click my action, I can see those calls in my browser :
with no payload.
https://api.hubspot.com/sales-objects/execution/v1/actions?portalId=7123392&clienttimeout=14000&hs_s... with payload
{type: "ACTION_HOOK",…}
associatedObjectId: 64313916
associatedObjectProperties: ["hs_object_id", "email", "hubspot_owner_id", "lastmodifieddate"]
0: "hs_object_id"
1: "email"
2: "hubspot_owner_id"
3: "lastmodifieddate"
associatedObjectType: "CONTACT"
httpMethod: "POST"
objectTypeId: 300109
type: "ACTION_HOOK"
uri: "https://XXX_my_Uri_XXX/save_gdt"
But my API is never reached.
Thanks