APIs & Integrations

ebp
Participant

CRM Cards ACTION_HOOK

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

0 Upvotes
4 Replies 4
seedling
Member

CRM Cards ACTION_HOOK

Same issue.

But i found - the fetch URL are called, during processing ACTION_HOOK action.

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

CRM Cards ACTION_HOOK

@ebp 

Is this still an issue?  Any errors in the logs?

0 Upvotes
ebp
Participant

CRM Cards ACTION_HOOK

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 : 

https://api.hubspot.com/sales-objects/execution/v1/actions?portalId=7123392&clienttimeout=14000&hs_s...

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"

and this https://api.hubspot.com/sales-objects/execution/v1/objects?objectTypeId=300109&associatedObjectId=64...

 

But my API is never reached.

 

Thanks

 

0 Upvotes
mgandi
Participant

CRM Cards ACTION_HOOK

Hello @ebp ,

 

I ran into the same issue yesterday. I had a hard time fixing it but I finally found that by doing a GET instead of a POST the endpoint was finally reached by HubSpot. The documentation is completely misleading here but it worked for me. You can try doing this on your end.

 

Cheers!

0 Upvotes