Hubspot & Gravity Forms - Get Thank You url to hubspot when submit

Hi there! I want to send the thank you url data to hubspot when someone submits the gravity form. I’m working with a few ty pages using “Confirmation” configuration in the Gravity settings. I tried to add a hidden field with the {embed_url} but this shows the actual page of the form.

Any ideas to send the data to hubspot?

Thank you!

Hi there @FGodoy7 and thank you for your question!

I want to share a Community thread that explains how HubSpot captures hidden fields from Gravity Forms:
https://community.hubspot.com/t5/Lead-Capture-Tools/Capturing-hidden-fields-from-Gravity-Forms/m-p/649235

For your specific goal, this Ideas post discusses a workaround (I suggest upvoting it and adding your specific use case in the comments):

https://community.hubspot.com/t5/HubSpot-Ideas/Capture-URL-parameter-in-hidden-form-field/idi-p/762401

I would also like to tag a few community experts who can share additional ideas here. Hey there @TomM2 @HubDoPete @amjadkhatri I hope you’re having a great week! Any insights you would like to share?

Thanks!

Victor

Hey @FGodoy7 , yeah {embed_url} will always return the page where the form lives, not where the confirmation sends them. That’s by design in Gravity Forms since the merge tag resolves before the confirmation fires.

Looking at your setup with all those conditional confirmations (Resident Yes/No, Student Visa, Tourist Visa, etc.), the simplest path is to skip capturing the URL entirely and just map the form fields that drive the routing straight to HubSpot custom contact properties. Those field values already tell you which thank you page the person landed on since they’re the same conditions your confirmations use. So if “Are you a Resident = Yes” maps to a HubSpot property, you know exactly which path they took without needing the actual URL.

The other thing worth checking: if you have the HubSpot tracking code installed on your WordPress site (including those thank you pages), HubSpot already captures the page view on the contact’s timeline automatically once the form associates them. So the data is technically already there, you just can’t filter on it as a property. But you could build a HubSpot workflow that triggers on “Contact has viewed URL containing [your thank you page path]” and sets a custom property based on that.

If you really need the exact confirmation URL as a field value, the only clean way is a small PHP snippet using the gform_after_submission hook to check the entry values, determine which confirmation matches, and push the URL to HubSpot via API. But honestly for your use case the field mapping approach is way simpler and gives you the same segmentation power. Note: This response was written based on my own experience and lightly reformatted with AI for clarity.

Hope this helps

Hi @RubenBurdin I just replied to @amjadkhatri 's comment to refine the workflow configuration!

Thank you for leaving your comments here :slightly_smiling_face:

:white_check_mark: Prerequisites

1. HubSpot Tracking Code Installed
If you’re using the official HubSpot WordPress Plugin, the tracking code is automatically added to all pages.
Alternatively, you can manually add the tracking code to your theme’s header.php or via a third‑party plugin.
Make sure your thank you pages are also tracked (they usually are if the code is site‑wide).
2. Gravity Forms Connected to HubSpot
You need a way to associate form submissions with HubSpot contacts.
The easiest method is using the HubSpot WordPress Plugin – it creates contacts when forms are submitted (provided an email field is present and mapped).
Alternatively, you can use Gravity Forms’ native HubSpot add‑on or a third‑party integration like Zapier.
3. HubSpot Account with Workflows Access
Workflows are available in Marketing Hub Professional and Enterprise, or Sales Hub Professional and Enterprise.
If you have a lower tier, you may need to upgrade or use the PHP solution instead.

:hammer_and_wrench: Step-by-Step Implementation

1. Create a Custom Property in HubSpot

This property will store which thank you page the contact saw (or the exact URL).

In your HubSpot account, go to Contacts > Settings (gear icon) > Properties.
Click Create property.
Object type: Contact
Name: e.g., “Thank You Page Type” (or “Thank You Page URL”)
Internal name will auto‑fill – note it down (e.g., thankyoupagetype).
Field type: Choose Single‑line text (if you want to store the URL) or Dropdown (if you prefer a readable label).
Save the property.

2. Identify Your Thank You Page URLs

List the exact URLs (or URL patterns) for each conditional thank you page.
Examples:

etc.

You’ll use these in the workflow conditions.

3. Build a Workflow for Each Thank You Page

You’ll create one workflow per thank you page. Each workflow will:

Trigger when a contact views that specific page.
Update the custom property to reflect the page type.

Example Workflow for the “Resident” Thank You Page:

1. Create a new workflow
Go to Automation > Workflows.
Click Create workflow and choose Start from scratch.
2. Set the enrollment trigger
Trigger: “Contact views a page” (under “Web activity”).
Condition: Page URL contains /thank-you-resident/ (or is exactly the full URL).
This ensures only contacts who land on that specific thank you page are enrolled.
3. Add an action to update the property
Click the + icon and choose Set property value.
Select the custom property you created (e.g., “Thank You Page Type”).
Set the value to something meaningful, e.g., Resident or the full URL.
Save the action.
4. Review and turn on the workflow
Name your workflow (e.g., “Set Thank You Page – Resident”).
Make sure it’s set to Automatically enroll contacts.
Turn it on.

Repeat the same steps for each conditional thank you page, adjusting the URL condition and property value accordingly.

5. Test the Integration

Submit a test entry through your Gravity Form and land on one of the thank you pages.
Go to the contact record in HubSpot (find the test email).
Check the “Thank You Page Type” property – it should now contain the value you set (e.g., “Resident”).
Also, the contact’s timeline will show the page view event.

:stopwatch: How It Works (Behind the Scenes)

1. User submits the Gravity Form.
2. HubSpot’s tracking code captures the form submission and creates/updates the contact (if email is provided and the integration is active).
3. The user is redirected to the conditional thank you page.
4. HubSpot’s tracking code sends a page view event for that thank you page.
5. The workflow detects the page view, matches the URL condition, and updates the custom property.

All of this happens in near real‑time, though there may be a slight delay (usually a few seconds) while HubSpot processes the events.

Hi @amjadkhatri thanks for your explanation here!
I was doing some testing with your steps. Here’s some comments:
In the workflow creation section, this is the workflow that I’ve created (I think that the config is wrong):

I can’t find the “Trigger: “Contact views a page” (under “Web activity”).” into the workflow trigger so I tried with two triggers:

With these two configurations I can’t update the custom property “Type of Student TY Page” that I’ve created for the workflow:

Could you please let me know which trigger exactly matches to catch:

1 - People who submits the form “Gravity Forms - Type Of Student - Quiz EN ( Do not delete or edit )”

AND

2 - People who visited "F-1 Visa Student - LANGUAGE ON Schools "

Thank you in advance!

Franco

Hi @FGodoy7

The specific trigger you need is called “Contact views a page”. It’s located under “Web activity” when you are adding a trigger to your workflow. You do not need a separate trigger for the form submission. The workflow works like this:

  1. The person submits your Gravity Form, which identifies them as a contact in HubSpot.
  2. They are then sent to the conditional thank you page.
  3. HubSpot’s tracking code records that they viewed that page.
  4. The workflow sees this “page view” event, checks if the URL matches your condition (e.g., contains “/thank-you-resident/”), and then updates the custom property you created.

So, you only need the one “Contact views a page” trigger with the URL condition. Make sure your custom property name in the workflow action exactly matches the internal name you created (like thank_you_page_type). Once you select the correct trigger, the workflow will update the property automatically when someone lands on that page.

please read the following post regarding page view activity:
https://community.hubspot.com/t5/Marketing-Integrations/Pageviews-web-activity-in-a-contact/m-p/625260
https://knowledge.hubspot.com/account/how-does-hubspot-track-visitors