Hubspot custom workflow action error on external api call
SOLVE
Hi all,
I am trying to create a custom action for workflow for whoever uses my application. I want to make an external API call to get data based on the `portalId` of the account. I have drop down a drop down select which will show options based on the data that is returned from the external API call. But for some reason I am getting error could not load due to a 3rd-party API failure.
I'm getting the same error message when trying to implement the only full example using the "PRE_FETCH_OPTIONS" function type outlined in the HubSpot documentation. (Example #3, right down the bottom of the doc). The only meaningful change I made to the documented example was to point to my 'actionUrl' and 'optionsUrl' endpoints:
That request succeeds in creating the custom workflow action. Then, when I try to interact with the workflow action in HubSpot UI, I get the same error message experienced by @neer and no request is received by my example endpoint. There could be something funny going on, or at least the example in the documentation needs to be reviewed (I suspect something wrong with the example 'functionSource', but I could be wrong).
I hope this proves helpful. Please let me know if you have any follow-up questions.
All the best,
Zach
--
Zach Klein HubSpot Integrations & App Developer Meanjin / Brisbane, Australia
Hubspot custom workflow action error on external api call
SOLVE
I'm also encountering this issue now. For some reason, the fields and inputFields are empty. I have 2 identical apps with same custom actions and it's only happening to my test app.
Hubspot custom workflow action error on external api call
SOLVE
@nickiearchuaI think the issue is related to your local environment because the local project URL can't be called by HubSpot to fetch options. Can you please tell me which language you use?
Hubspot custom workflow action error on external api call
SOLVE
@nickiearchua Do you get a HubSpot call for fetching options? Because when I worked on this, I had a problem with my project's local URL, which couldn't be accessed by HubSpot.
Hubspot custom workflow action error on external api call
SOLVE
@neer@zach_threadint@Jaycee_Lewis There is any solution for above problem because I also faced same problem for my action. Please let me know if there is any solution for it. Thanks.
Hubspot custom workflow action error on external api call
SOLVE
Hi @zach_threadint@Jaycee_Lewis Is there any work around for this? My "actionUrl" is working fine but "optionsUrl" is not. Show the functionType be "PRE_FETCH_OPTIONS" or is there any other things I am missing ?
Hubspot custom workflow action error on external api call
SOLVE
I also used Example 3 from hubspot custom workflow action documentation.
Just changed the `optionsURL` and `actionURL`. I am able to hit my 'actionURL' but don't know why 'optionsUrl' is not getting hit and I am getting error while populating the fields
Hubspot custom workflow action error on external api call
SOLVE
Adding to what @Jaycee_Lewis is writing above, if you have the option to observe the traffic either on your code or on the external API's side, that might give you some more details on that error message you are getting here. As it is, it's hard to tell what might be going wrong since we do not know what you are calling, or what the exact error message from the other endpoint is. If this is not an option, you would have to resort to the steps above to narrow things down a little.
Hubspot custom workflow action error on external api call
SOLVE
Hi, @neer👋 Thanks for your question. I'd like to invite some of our community members to the conversation — hey @zach_threadint@MatthiasKunz do you have any recent experience with similar errors to what @neer shared?
I have some basic troubleshooting steps:
Check that the external API (https://api.example.com/v1/widget-sizes) is operational and accessible. You can use a tool like Postman to test the endpoint directly
Ensure the API’s response matches the expected format for HubSpot, like [{ "value": "size1", "label": "Size 1" }]
Double-check your custom function that modifies the request to ensure it constructs a valid API URL and correctly passes all necessary parameters. Make sure the method (GET or POST) matches the requirements
Confirm there are no network issues or CORS policies preventing HubSpot from accessing the API
Best,
Jaycee
Join us on March 27th at 12 PM for the Digital Essentials Lab, an interactive session designed to redefine your digital strategy!
Engage with expert Jourdan Guyton to gain actionable insights, participate in live Q&A, and learn strategies to boost your business success. Don't miss this opportunity to connect and grow—reserve your spot today!
Did you know that the Community is available in other languages? Join regional conversations by changing your language settings !
I'm getting the same error message when trying to implement the only full example using the "PRE_FETCH_OPTIONS" function type outlined in the HubSpot documentation. (Example #3, right down the bottom of the doc). The only meaningful change I made to the documented example was to point to my 'actionUrl' and 'optionsUrl' endpoints:
That request succeeds in creating the custom workflow action. Then, when I try to interact with the workflow action in HubSpot UI, I get the same error message experienced by @neer and no request is received by my example endpoint. There could be something funny going on, or at least the example in the documentation needs to be reviewed (I suspect something wrong with the example 'functionSource', but I could be wrong).
I hope this proves helpful. Please let me know if you have any follow-up questions.
All the best,
Zach
--
Zach Klein HubSpot Integrations & App Developer Meanjin / Brisbane, Australia