<?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: Workflow webhooks with nested parameters in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Workflow-webhooks-with-nested-parameters/m-p/762431#M61796</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/257487"&gt;@LMeert&lt;/a&gt;&amp;nbsp;looks like we'd need operations hub for both of those workarounds unless there's a way to flatten the JSON (Zapier uses underscores, but I can't find any documentation about this in Hubspot).&lt;BR /&gt;&lt;BR /&gt;Thanks for your prompt reply though &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; I appreciate the help.&lt;/P&gt;</description>
    <pubDate>Wed, 01 Mar 2023 04:32:37 GMT</pubDate>
    <dc:creator>Peta_APB</dc:creator>
    <dc:date>2023-03-01T04:32:37Z</dc:date>
    <item>
      <title>Workflow webhooks with nested parameters</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Workflow-webhooks-with-nested-parameters/m-p/752471#M61168</link>
      <description>&lt;P&gt;Hi all&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just wondering if someone can point me in the right direction with how to convert nested data into form data in a workflow webhook?&lt;/P&gt;
&lt;P&gt;Pretty simply, I’m just configuring a POST webhook to an external application and the expected payload is in CURL.&lt;/P&gt;
&lt;P&gt;I really just wanted some help on how to configure the nested parameters in the request body&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;I have the API documentation for an external application and want to send a POST webhook from a workflow in Hubspot, however I just need to understand how to configure the request body in Hubspot and keep getting a 422 error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can do this quite easily in Zapier using form data, but would prefer to be able to send it directly from Hubspot if I can.&lt;/P&gt;
&lt;P&gt;In Zapier it’s simply using a double-underscore, eg:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;details__legalType&lt;BR /&gt;details__sortCode&lt;BR /&gt;details__accountNumber&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately, this doesn’t work in Hubspot. I’ve tried single underscore, but this fails as well. Is there any information on this somewhere? Can anyone help?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the expected payload, so I'm fine with everything apart from the 3 nested parameters:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;curl -X POST "https://api.sandbox.transferwise.tech/v1/accounts" \
     -H "Authorization: Bearer &amp;lt;your api token&amp;gt;" \
     -H "Content-Type: application/json" \
     -d '{ 
          "details": {
           "legalType": "PRIVATE",
           "sortCode": "40-30-20",
           "accountNumber": "12345678"
           }
        }'
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 22:40:19 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Workflow-webhooks-with-nested-parameters/m-p/752471#M61168</guid>
      <dc:creator>Peta_APB</dc:creator>
      <dc:date>2023-02-06T22:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: Workflow webhooks with nested parameters</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Workflow-webhooks-with-nested-parameters/m-p/752643#M61178</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/27963"&gt;@Peta_APB&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You cannot customize the body of the webhook action in workflows to have nested fields.&lt;/P&gt;
&lt;P&gt;It only sends flat JSON (unless there's a secret, undocumented method for that ?&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/101258"&gt;@Teun&lt;/a&gt;,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/17186"&gt;@Anton&lt;/a&gt;)&lt;BR /&gt;&lt;BR /&gt;There are two workarounds I can think of :&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;This one works for sure but you'll need an operations hub pro subscription : use the &lt;A href="https://developers.hubspot.com/docs/api/workflows/custom-code-actions" target="_blank" rel="noopener"&gt;custom code action&lt;/A&gt; to make a custom API call using either Axios (NodeJS) or Requests (Python)&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;This one I haven't tried it till the end but I don't see why this wouldn't work :&lt;BR /&gt;Use a custom property named 'details' and format it using the "format data" action&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LMeert_0-1675763484876.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/84818i9CB4646011EEEE0C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LMeert_0-1675763484876.png" alt="LMeert_0-1675763484876.png" /&gt;&lt;/span&gt;
&lt;P&gt;Use the custom mode and concat function to format the inside of the "details" key.&lt;BR /&gt;&lt;BR /&gt;Then set up your webhook like so :&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LMeert_1-1675763624028.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/84819i310946804D302106/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LMeert_1-1675763624028.png" alt="LMeert_1-1675763624028.png" /&gt;&lt;/span&gt;
&lt;P&gt;&lt;BR /&gt;If this works for this specific use case that's nice, but if at some point you need a more advanced customisation (like support of an OAuth flow for authentication) you will have to find another way.&lt;BR /&gt;(Either the custom code action from the Pro subscrption or a webhooks to a third party solution like make.com).&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Hope this helps !&lt;BR /&gt;If it does, please consider marking this answer as a solution &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Ludwig&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 09:56:35 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Workflow-webhooks-with-nested-parameters/m-p/752643#M61178</guid>
      <dc:creator>LMeert</dc:creator>
      <dc:date>2023-02-07T09:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: Workflow webhooks with nested parameters</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Workflow-webhooks-with-nested-parameters/m-p/762431#M61796</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/257487"&gt;@LMeert&lt;/a&gt;&amp;nbsp;looks like we'd need operations hub for both of those workarounds unless there's a way to flatten the JSON (Zapier uses underscores, but I can't find any documentation about this in Hubspot).&lt;BR /&gt;&lt;BR /&gt;Thanks for your prompt reply though &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; I appreciate the help.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 04:32:37 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Workflow-webhooks-with-nested-parameters/m-p/762431#M61796</guid>
      <dc:creator>Peta_APB</dc:creator>
      <dc:date>2023-03-01T04:32:37Z</dc:date>
    </item>
  </channel>
</rss>

