Custom Workflow action not showing outputs

I’m working on a custom workflow action which returns a result based on two input properties in a workflow. I’ve set up the inputs and outputs according to the docs, and the automation API accepts the definition without any complaints.

The workflow action also appears in my workflow builder.

However, the outputs from my custom action aren’t available for following workflow steps, no matter how I define them (different types, different options etc.).

The relevant part of my action definition is as follows (i tried multiple ways to define them because I suspected maybe the type / fieldType combination might have been what caused them not to appear):

Defined as Boolean checkboxes without options:

{"outputFields": [{"typeDefinition": {"name": "compare_result","type": "enumeration","fieldType": "booleancheckbox",}}],"outputFieldLabels": { "compare_result": "Result of comparison" }}

Defined as Boolean checkboxes with options specified:

{"outputFields": [{"typeDefinition": {"name": "compare_result","type": "enumeration","fieldType": "booleancheckbox","options": [{ "label": "True", "value": "false" },{ "label": "False", "value": "true" }]}}],"outputFieldLabels": { "compare_result": "Result of comparison" }}

Defined as String output:

{"outputFields": [{"typeDefinition": {"name": "compare_result","type": "string","fieldType": "text",}}],"outputFieldLabels": { "compare_result": "Result of comparison" }}

However, when trying to copy the output to a property, the custom actions outputs dont appear in the list of properties. Only the “Actions final success or failure state” which seems to be a predefined one.

Any pointers what’s going wrong here?

Hi @PFriederich,
I think the way you’re setting the output is fine but 2 things :

  1. Are you properly returning the output fields at the end of your script ?

  1. Have you filled the data output section of the custom code node ?
    You will need to do both in order to use them later on in your workflow.

Here’s the result of the example above :

Hope this helps ! If it does, please consider marking this as a solution :slightly_smiling_face:
Have a good day,

Ludwig

Hi @LMeert

My issue was actually not about “custom code” workflow steps but by custom workflow actions, provided by a hubspot app I’m working on. But you pointed me into the right direction anyways.
Even though I “tripple checked and was 100% sure…” that my return values were correct, I debugged them again with a fresh mind and voila, it works as expected.

Thank you very much!

Hey @PFriederich,

My bad, didn’t read the question properly !

It looks like custom workflow actions and custom code nodes do work the same way, which kinda make sense but is still a lucky coincidence for us.

Anyway, glad I could help and that you’ve sorted out your issue !
Take care,

Ludwig

Hi @PFriederich - I’m working on a custom workflow action with enumeration as an output, and I’m having the same issue. Could you please share your solution?

hello,

could you please explain how exactly ypu solved it. I am facing the same problem.

How did you solve this? I’m having the same problem, the output fields are not being shown for selection in further steps. if any solution found for this let me know!

make sure you are returning the exact output fields response from your server that you defined when creating the workflow action.

For example if the workflow action has defined output defined like this :

"outputFields": [
 {
 "typeDefinition": {
 "name": "my_output",
 "type": "string",
 "fieldType": "text",
 }
 }
]

The server response should return in the following format :

 res.status(200).json({
 "outputFields": {
 "my_output": "SAMPLE OUTPUT VALUE",
 "hs_execution_state": "SUCCESS"
 }
 });