⚙ Operations Hub

PFriederich
Participant

Custom Workflow action not showing outputs

SOLVE

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.

 

PFriederich_0-1647547192420.png

 

Any pointers what's going wrong here?

 

0 Upvotes
1 Accepted solution
LMeert
Solution
Guide | Platinum Partner
Guide | Platinum Partner

Custom Workflow action not showing outputs

SOLVE

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 ?
    LMeert_0-1649168458643.png
  2. 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.
    LMeert_1-1649168502592.png

     

Here's the result of the example above :

LMeert_2-1649168582520.png

 

Hope this helps ! If it does, please consider marking this as a solution 🙂

Have a good day,

Ludwig

Agence Mi4 - Data DrivenCTO @ Mi4
Hubspot Platinum Partner and Integration Expert

Passionate human, very curious about everything data and automation.

Any problem with Hubspot you need help solving ?

Let me know !

View solution in original post

4 Replies 4
LMeert
Solution
Guide | Platinum Partner
Guide | Platinum Partner

Custom Workflow action not showing outputs

SOLVE

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 ?
    LMeert_0-1649168458643.png
  2. 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.
    LMeert_1-1649168502592.png

     

Here's the result of the example above :

LMeert_2-1649168582520.png

 

Hope this helps ! If it does, please consider marking this as a solution 🙂

Have a good day,

Ludwig

Agence Mi4 - Data DrivenCTO @ Mi4
Hubspot Platinum Partner and Integration Expert

Passionate human, very curious about everything data and automation.

Any problem with Hubspot you need help solving ?

Let me know !

PFriederich
Participant

Custom Workflow action not showing outputs

SOLVE

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! 

GnHAutomation
Participant | Diamond Partner
Participant | Diamond Partner

Custom Workflow action not showing outputs

SOLVE

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?

0 Upvotes
LMeert
Guide | Platinum Partner
Guide | Platinum Partner

Custom Workflow action not showing outputs

SOLVE

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

Agence Mi4 - Data DrivenCTO @ Mi4
Hubspot Platinum Partner and Integration Expert

Passionate human, very curious about everything data and automation.

Any problem with Hubspot you need help solving ?

Let me know !

0 Upvotes