APIs & Integrations

04774
Member

Save webhook response to set value to a property in a workflow

SOLVE

Hello,

I am having trouble understanding how to save a webhook response value and use it to assign the value to a property later in the workflow. I see the value is saved under the name "data.create_item.id" but I do not see how I can use that value later on in the worklow. Any help or guidance towards the right direction is highly appreciated, thank you! Screen Shot 2022-09-12 at 10.42.53 AM.pngScreen Shot 2022-09-12 at 10.40.55 AM.png

1 Accepted solution
OSoax
Solution
Participant

Save webhook response to set value to a property in a workflow

SOLVE

hey guys! 
I were able to find at least how to copy webhook responce into HubSpot property.
So, After webhook activity you need to add step "copy property value" and in a field "Property or value to copy from" you will see your webhook step with all properties that you mark in body outputs. 
then just choose Object and Object's property where to add value. Remember property field type have to be single line text, otherwise you will not be able to select property field with other field type.
Hope it will help someone to avoid headache with research🤪

OSoax_0-1681834269898.png

 

View solution in original post

5 Replies 5
OSoax
Solution
Participant

Save webhook response to set value to a property in a workflow

SOLVE

hey guys! 
I were able to find at least how to copy webhook responce into HubSpot property.
So, After webhook activity you need to add step "copy property value" and in a field "Property or value to copy from" you will see your webhook step with all properties that you mark in body outputs. 
then just choose Object and Object's property where to add value. Remember property field type have to be single line text, otherwise you will not be able to select property field with other field type.
Hope it will help someone to avoid headache with research🤪

OSoax_0-1681834269898.png

 

brycekunkel
Contributor

Save webhook response to set value to a property in a workflow

SOLVE

Thanks so much - this was helpful. For whatever reason the "Set property value" doesn't function this way. The workflow errors out that way but works correctly with Copy Property Value.

0 Upvotes
misch331
Participant

Save webhook response to set value to a property in a workflow

SOLVE

We were able to do this using the 'Custom Code' workflow action. Assuming your webhook is returning say some JSON data back to Hubspot in the webhook response, you can define the hs_server_response as an input to the custom code, the custom code can do a JSON.parse() of that data, extract the field you want and include it in the outputFields. You'll have to define the output fields of the custom code much like you do the input fields, but once you do that you can then use a 'Copy Property Value' action after that custom code action and you'll see that one of the possible input values is the output value of the custom code. 

 

This page has helpful info https://developers.hubspot.com/docs/api/workflows/custom-code-actions

IMcLean
Member

Save webhook response to set value to a property in a workflow

SOLVE

Also looking for an answer to this, is it possible? Seems stupid if you can't set a property value based on a response from the webhook.  But this is hubSpot after all, maybe in 10 years......

0 Upvotes
Jaycee_Lewis
Community Manager
Community Manager

Save webhook response to set value to a property in a workflow

SOLVE

Hi, @04774 👋 Thanks for your question. Hey, @Mike_Eastwood @RMones, do you have any experience or troubleshooting tips you can share with @04774

 

Thank you for taking a look! — Jaycee


HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates.
Learn More.


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !