Retrieve the reCaptcha score and submit via a webhook [RESOLVED]

Simply put I need to retrieve the reCaptcha score from the reCaptcha add-on for V3 and send it to an external API via a webhook.

Just wondering if anyone has any ideas on this.

How is the webhook request body configured, all fields or select fields?

Hi Richard,

I’m only selecting specific fields.


Hi Andrew. If you are selecting specific fields, you can map the reCAPTCHA Score in the “Entry Meta” section to whatever meta key you like. It looks like this:

I replied to your support ticket at well. If you have any other questions, please let us know.

Thanks, I figured this one out.

I do have one last question.

We are obviously submitting to an external API with the webhook add-on. I’m capturing the response but then I need to redirect based on the results of the response and I need to add certain results from the response to the redirect. I have no problem getting the response and creating what I need with code in the “gform_webhooks_post_request_1“ but can’t seem to figure either the redirect or getting the response into the form redirect.

I can’t seem to find anything in the documentation or anything online on how to do.

Can you point me in the right direction?

Hi Andrew. The webhook is processed independently of the confirmation and notification, so you won’t be able to use the webhook response in your confirmation redirect.

Is there a way to redirect from the webhook response? I’m capturing the response and doing certain things but haven’t managed to get a redirect working.

So with code not using the confirmation settings?

Not really. The webhook could be processed minutes or hours after the form submission - it’s not associated with the user’s browser session at all. There is no way to redirect the browser based on what happens with the API.

If you need to query an API and use that result in a confirmation redirect, you could use the gform_validation filter, and not use the Webhooks Add-On at all.

You would need to write the code to connect to your API, retrieve the response, and then store that in the entry and based your confirmation redirect on that result in the entry.

There are other ways to do that as well, but none of them involve the Webhooks Add-On. It’s sort of a one-way communication. The response comes back, but you can’t affect what the browser is doing at that point.

Thanks. That is actually what I decided to do already.