Best answer

Using input fields in custom action API request URL?

  • 26 March 2024
  • 4 replies
  • 40 views

Does anyone know if the Custom Actions feature allows for the variable input fields to be used inside the API request URL? The Hubspot API that I’m working against requires that an object ID as part of the API address, however that’s one of the variables that I want to pass into the custom action. 

I tried setting it up, but got a generic error:

And I’m not sure if this is because the request URL was wrong (in the error it doesn’t look like it properly replaced the input variable) or if there’s something else wrong with my API request. 

icon

Best answer by Troy Tessalone 26 March 2024, 17:29

View original

4 replies

Userlevel 7
Badge +14

Hi @micahspieler 

An alternative Zap action to use is API Request.

 

Thanks @Troy Tessalone — do you know if you pass variables into the URL of the API request? The documentation on this is very unclear and I don’t see an obvious way to do it in the UI. 

OK, I did get it to work with the generic API Request action. One thing that was tripping me up is that Hubspot’s API really requires you to specify a Content Type header. I used ‘application/json;charset=utf-8’

 

I’m still curious if the Custom Actions could work the same way, since it’s a bit easier to parse through, but thanks for getting me unblocked @Troy Tessalone 

Userlevel 7
Badge +14

@micahspieler 

Yes.

Input fields allow these types of values:

  • Static
  • Dynamic
    • via Variable from previous step
  • Combo
    • Static + Dynamic

Reply