Grab and use response from a webhook request

I am sending data from a form to an external server using the webhooks addon. The API returns an id in response like shown below:

body: [{"id":"c4120194-af09-46df-905c-xxxxxxxxxxxx"}] 

I have another form on the website and I am using another webhook to send data to an external site. I want to use the id above in the other form’s request URL. I have created a custom merge tag and have the script ready to replace data of the merge tag with the id received. I am having issues in saving the ‘id’ response and using it to replace the value of merge tag.

I know gform_webhooks_post_request_FORMID can be used to log response but need some guidance on how to grab and use the response from here.

Hi Jarrett. Can you store that ID in the entry of the first form (using the gform_webhooks_post_request hook) and then pre-populate the field in the second form, using the gform_field_value filter?

I don’t want to use the ID in the second form. The ID is supposed to be part of URL for the webhook. Something like this:

www.example.com/v1/c4120194-af09-46df-905c-xxxxxxxxxxxx/example

Also, how do I save the ID using [gform_webhooks_post_request] ?

Hi Jarrett. In order to get more details and help you with your specific application, can you open a support ticket here please?

https://www.gravityforms.com/open-support-ticket/technical/

Thank you.

© 2008 - 2021. Gravity Forms is a project by Rocketgenius Inc.