Trouble with Action on CRM Extensions API


#1

I have successfully setup a CRM extension API and I’m seeing a card show up. I’m able to log the call to our fetch method. However, when I click the action button it fails immediately with no feedback on what went wrong and it never hits our system to log the call so it isn’t even getting that far. I’ve got base uris set that match just the domain of the action, all the way to the actual url: https://{mydomain}/, https://{mydomain}/hubspotactions, https://{mydomain}/hubspotactions/createlead


#2

Hi,
I have the same problem, did you resolve it?
Thanks


#3

I found out that the actions in a result like that works fine:

"results": [
    {
        "objectId": 246,
        "title": "xxxx",
        "actions": [
            {
                "type": "ACTION_HOOK",
                "httpMethod": "POST",
                "associatedObjectProperties": [ ],
                "uri": "https://xxxxxxxx.php",
                "label": "Test"
            }
        ]
    }
],

But if I use the same uri in a primaryAction:

"primaryAction": {
    "type": "ACTION_HOOK",
    "httpMethod": "POST",
    "associatedObjectProperties": [ ],
     "uri": "https://xxxxxxxx.php",
    "label": "Test"
}

It doesnt work, so its a bug of the Hubspot CRM Extensions.

Please fix it soon


#4

Hello admin team @comptly @dadams @Metcoff @nriley @Paul_Schwarz,

can you give me some feedback about my problem with action_hooks?

i created some screenshots to show this problem:

the request:

the parameters:

and the result:

thanks


#5

I’m attempting to request properties to be sent with my action but the only thing I ever get is the userId and userEmail, I don’t even get the associatedObjectId, associatedObjectType, or the portalId that are supposed to be included with every action hook call. Here’s an example of an action that I’ve put on a deal:
{
"$type": “HubSpot.Net.HubSpotCrmAction, HubSpot.Net”,
“type”: “ACTION_HOOK”,
“uri”: “https://xxx/hubspotactions/createlead”,
“httpMethod”: “POST”,
“label”: “Create New Lead Draft”,
“associatedObjectProperties”: [
“amount”,
“closedate”,
“createdate”,
“description”,
“dealname”,
“hubspot_owner_id”
]
}

Here’s the information I get from HubSpot in the request:
URI: /hubspotactions/createlead
Content: userId=XXXX&userEmail=support-XXX%40XXX.com

Also, the content when using post is supposed to be a JSON object, but as you can see it is just the same as the query string parameters from GET or DELETE just put into the content of the HTTP request.


#6

One other question: Is there any way to test this locally? Given that we are giving URLs to HubSpot that need to be called from within your system just providing localhost as a URL clearly won’t work. Instead the only way to test that I understand so far is to deploy my app and log all of the information I’m getting and then update my code accordingly. There’s got to be a better way for your developers to work with this.


#7

@Kenny_Kaplan
Did you use it as primary Action?


#8

Nope, still can’t get it to work as a primary action at all. This was the call that resulted when I kicked off an action tied to a HubSpot sales object.


#9

Okay thanks.
So it is still a bug in HubSpot CRM Extensions API.


#10

Hi All,

We just deployed a fix for this issue. Now using an ACTION_HOOK as a primary action should work. Sorry about the issue, here.


#11

@Paul_Schwarz did this fix the primary action and the missing properties?


#12

Yes, this fixes that “missing objectId” error when using action hooks for primary actions,


#13

Sorry, @Paul_Schwarz, not that. In a previous comment I noted that I was requesting several associatedObjectProperties but all I ever received was the userId and userEmail. Is the action now sending all requested associatedObjectProperties? Or is my object structured incorrectly?


#14

I just tested and can verify that the primary action link now does the same thing as the actions on a HobSpot Sales Object. And I’m still only getting the email and userid


#15

I also tested it and the primary action link works fine. But the associatedObjectProperties is still a problem, i dont know how it works… @Kenny_Kaplan I’m only getting the email and userid, too.


#16

@Paul_Schwarz any thoughts on the issue we’re having with associated object properties?


#17

Hi @Kenny_Kaplan, sorry about the long delay, here. There was an issue with this that was resolved last week. So, now, the values for all requested associatedObjectProperties are being sent back in actionhook requests.