<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Custom Code Action Not Returning Output Fields — Workflow Shows Success but Output Is Empty in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Custom-Code-Action-Not-Returning-Output-Fields-Workflow-Shows/m-p/1229365#M85792</link>
    <description>&lt;P&gt;Hi &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/333244"&gt;@GMaheshwari&lt;/a&gt;&lt;/SPAN&gt;, I hope you’re doing well!&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for reaching out to the HubSpot Community!&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are a couple of resources that might be helpful:&lt;BR /&gt;&lt;BR /&gt;- &lt;A href="https://developers.hubspot.com/docs/api-reference/automation-actions-v4-v4/custom-code-actions" target="_blank"&gt;Workflows | Custom Code Actions&lt;/A&gt;&lt;BR /&gt;- &lt;A href="https://developers.hubspot.com/docs/api-reference/automation-actions-v4-v4/guide" target="_blank"&gt;Automation API | Custom Workflow Actions&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I’d also love to hear from our amazing Top Experts: Hi &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/313109"&gt;@HFisher7&lt;/a&gt;&lt;/SPAN&gt;, &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/601366"&gt;@sylvain_tirreau&lt;/a&gt;&lt;/SPAN&gt; and &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/871581"&gt;@BGrenon&lt;/a&gt;&lt;/SPAN&gt; do you have any suggestions to help &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/333244"&gt;@GMaheshwari&lt;/a&gt;&lt;/SPAN&gt;, please?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks so much, and wishing you a fantastic weekend!&lt;BR /&gt;Bérangère&lt;/P&gt;</description>
    <pubDate>Fri, 28 Nov 2025 13:02:19 GMT</pubDate>
    <dc:creator>BérangèreL</dc:creator>
    <dc:date>2025-11-28T13:02:19Z</dc:date>
    <item>
      <title>Custom Code Action Not Returning Output Fields — Workflow Shows Success but Output Is Empty</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Custom-Code-Action-Not-Returning-Output-Fields-Workflow-Shows/m-p/1229284#M85773</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi Community,&lt;/P&gt;&lt;P&gt;I’m facing an issue with a &lt;STRONG&gt;Custom Code Action inside a workflow.&lt;BR /&gt;The code executes successfully and the logs show success: true, but &lt;STRONG&gt;no output fields are returned to the workflow.&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;H3&gt;&lt;span class="lia-unicode-emoji" title=":magnifying_glass_tilted_left:"&gt;🔍&lt;/span&gt; &lt;STRONG&gt;What’s happening&lt;/STRONG&gt;&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Custom code runs successfully&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;No errors reported&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;callback({ success: true, outputFields: {...} }) is executed&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;But in the workflow execution details:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Output fields section is blank&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Downstream actions receive undefined&lt;/P&gt;&lt;H3&gt;🧪 &lt;STRONG&gt;Checked already&lt;/STRONG&gt;&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Output fields are properly defined in the action&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Field names match exactly&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Tried both formats:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;DIV class=""&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;callback({ &lt;SPAN class=""&gt;outputFields: { &lt;SPAN class=""&gt;lineItemId: data.&lt;SPAN class=""&gt;id } });&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;and&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;DIV class=""&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;callback({ &lt;SPAN class=""&gt;success: &lt;SPAN class=""&gt;true, &lt;SPAN class=""&gt;lineItemId: data.&lt;SPAN class=""&gt;id });&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Added debug logging → values are present in code&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;No timeouts&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;No exceptions&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Tried multiple workflows — same issue&lt;/P&gt;&lt;H3&gt;🧵 &lt;STRONG&gt;Example log&lt;/STRONG&gt;&lt;/H3&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;DIV class=""&gt;&lt;SPAN&gt;&lt;SPAN&gt;{ &lt;SPAN class=""&gt;success: &lt;SPAN class=""&gt;true, &lt;SPAN class=""&gt;lineItemId: &lt;SPAN class=""&gt;"123456789" }&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;But the workflow UI shows:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Output Fields: &lt;STRONG&gt;empty&lt;/STRONG&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Next action input: &lt;STRONG&gt;undefined&lt;/STRONG&gt;&lt;/P&gt;&lt;H3&gt;&lt;span class="lia-unicode-emoji" title=":question_mark:"&gt;❓&lt;/span&gt; &lt;STRONG&gt;Question&lt;/STRONG&gt;&lt;/H3&gt;&lt;P&gt;Is this a known issue with Custom Code Actions not returning output fields?&lt;BR /&gt;Is there any recent change to output handling in workflows?&lt;/P&gt;&lt;P&gt;Would appreciate any guidance or confirmation.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Fri, 28 Nov 2025 07:00:18 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Custom-Code-Action-Not-Returning-Output-Fields-Workflow-Shows/m-p/1229284#M85773</guid>
      <dc:creator>GMaheshwari</dc:creator>
      <dc:date>2025-11-28T07:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Code Action Not Returning Output Fields — Workflow Shows Success but Output Is Empty</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Custom-Code-Action-Not-Returning-Output-Fields-Workflow-Shows/m-p/1229365#M85792</link>
      <description>&lt;P&gt;Hi &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/333244"&gt;@GMaheshwari&lt;/a&gt;&lt;/SPAN&gt;, I hope you’re doing well!&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for reaching out to the HubSpot Community!&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are a couple of resources that might be helpful:&lt;BR /&gt;&lt;BR /&gt;- &lt;A href="https://developers.hubspot.com/docs/api-reference/automation-actions-v4-v4/custom-code-actions" target="_blank"&gt;Workflows | Custom Code Actions&lt;/A&gt;&lt;BR /&gt;- &lt;A href="https://developers.hubspot.com/docs/api-reference/automation-actions-v4-v4/guide" target="_blank"&gt;Automation API | Custom Workflow Actions&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I’d also love to hear from our amazing Top Experts: Hi &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/313109"&gt;@HFisher7&lt;/a&gt;&lt;/SPAN&gt;, &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/601366"&gt;@sylvain_tirreau&lt;/a&gt;&lt;/SPAN&gt; and &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/871581"&gt;@BGrenon&lt;/a&gt;&lt;/SPAN&gt; do you have any suggestions to help &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/333244"&gt;@GMaheshwari&lt;/a&gt;&lt;/SPAN&gt;, please?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks so much, and wishing you a fantastic weekend!&lt;BR /&gt;Bérangère&lt;/P&gt;</description>
      <pubDate>Fri, 28 Nov 2025 13:02:19 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Custom-Code-Action-Not-Returning-Output-Fields-Workflow-Shows/m-p/1229365#M85792</guid>
      <dc:creator>BérangèreL</dc:creator>
      <dc:date>2025-11-28T13:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Code Action Not Returning Output Fields — Workflow Shows Success but Output Is Empty</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Custom-Code-Action-Not-Returning-Output-Fields-Workflow-Shows/m-p/1229442#M85813</link>
      <description>&lt;P data-start="0" data-end="121"&gt;Hi &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/333244"&gt;@GMaheshwari&lt;/a&gt;&amp;nbsp;, this one is frustrating because everything “looks green” in the logs while the workflow shows nothing.&lt;/P&gt;
&lt;P data-start="123" data-end="786"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-start="123" data-end="786"&gt;A couple of quirks to double-check. First, HubSpot only persists values that are nested under outputFields and whose keys exactly match the internal names you defined in the action config. The canonical pattern is callback({ outputFields: { line_item_id: data.id } }); and nothing else at the top level.&lt;/P&gt;
&lt;P data-start="123" data-end="786"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-start="123" data-end="786"&gt;Extra keys like success: true are simply ignored by the workflow engine, even though they show up in logs (&lt;A href="https://developers.hubspot.com/docs/api-reference/automation-actions-v4-v4/custom-code-actions" target="_blank"&gt;https://developers.hubspot.com/docs/api-reference/automation-actions-v4-v4/custom-code-actions&lt;/A&gt; )&lt;/P&gt;
&lt;P data-start="123" data-end="786"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-start="123" data-end="786"&gt;Also make sure the output field type matches the value you’re returning: if the field is a number and you send a string, HubSpot quietly drops it instead of casting. Second, confirm you’re defining the outputs on that specific custom code action, not on a different revision or cloned action, and that you’re using the internal names (usually snake_case) in the callback.&lt;/P&gt;
&lt;P data-start="123" data-end="786"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-start="123" data-end="786"&gt;A quick litmus test is to strip the code down to a minimal snippet that hardcodes a value, run “Test action,” and see if it appears. If even that doesn’t populate the Output fields section, it’s likely a platform-side issue and worth opening a ticket with the workflow run link and timestamp. When this custom code’s main job is just shuttling IDs between HubSpot and another system, Stacksync can handle that two-way sync layer so your workflows only read clean properties instead of wrestling with callback edge cases.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Nov 2025 17:47:44 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Custom-Code-Action-Not-Returning-Output-Fields-Workflow-Shows/m-p/1229442#M85813</guid>
      <dc:creator>RubenBurdin</dc:creator>
      <dc:date>2025-11-28T17:47:44Z</dc:date>
    </item>
  </channel>
</rss>

