I've some Custom Coded Actions that contain an External API Endpoint defined as a variable in the Code.
I'm doing this in the Sandbox, and the External API Endpoint corresponds to the system's QA instance.
If we decide to manually create this Workflow in Production, it's fairly straightforward. We'll create a Workflow, Custom Coded Action and replace the API Endpoint to refer to the corresponding Production instance.
But if we decide to use some Scripts to move the workflow to Production, We still have to manually replace the API Endpoint to refer to the corresponding Production instance.
So my Question is, is there a concept called Global variables in Hubspot where I can refer to that in the code instead of hardcoding the API Endpoint in the code? Such that the Global Variable of the Hubspot Sandbox will have the External API Endpoint of 'QA instance,' and the Global Variable of the Hubspot Production will have the External API Endpoint of the Production instance.
What I ended up doing is creating a Custom Coded action at the very beginning acting as a "config". It has output variables which can then be accessed by other Custom Coded actions or even things like sending a slack message (superhelpful to have something like "workflow name" in my config so I can copy/paste the message to other workflows without having to edit them to refer to itself).
Previously, I also tried to have a "mode" for debugging (basically switches to whether or not it outputs the payload or executes the api request) in the config above but decided to move that to each custom coded action because editing config constantly got annoying.
What I ended up doing is creating a Custom Coded action at the very beginning acting as a "config". It has output variables which can then be accessed by other Custom Coded actions or even things like sending a slack message (superhelpful to have something like "workflow name" in my config so I can copy/paste the message to other workflows without having to edit them to refer to itself).
Previously, I also tried to have a "mode" for debugging (basically switches to whether or not it outputs the payload or executes the api request) in the config above but decided to move that to each custom coded action because editing config constantly got annoying.