How to use the data from a POST API call

Hello,

I am making a POST API call to HubSpot where I create a deal. The API call is working fine, but I want to capture the data from the response and save it to the database.

I’ve re-watched the API videos but can’t find a way to do this. This is what I have tried:

I have attempted to save the returned data from the API call into a new variable called dealDetails. I’ve tried this as with and without the create list block:

I then try to use the variable to populate the required field in the database:

Any help much appreciated.

Thanks,
Luc

Hello @Luc_Zentar

Can you show us what the “sealDeatils” variable is?

Regards,
Viktor

How would I do that?

@Luc_Zentar
Is it the ui-builder or business logic?

It is set in ui builder

@Luc_Zentar

Use “print” block
The result of the “print” block you can see in the browser terminal/console.

Sorry Viktor, I’m trying to print but can’t find the result in the console:

@Luc_Zentar

You can add marker
Like:
print: ‘DATA HERE’
print: ‘dealDetails’

I see your response data here
I see “createdAt”, “archived” properties but I don’t see “hs_object_id” property here.
You should open this response, maybe “hs_object_id” is in property “properties”

Also, remove block “create list with”

Thank you Viktor. So how would I call this? Would it be:

Get property properties.hs_object_id of deal details?

Thanks,
Luc

Hello @Luc_Zentar!

Can you provide me with your App ID?

Regards,
Alexander