I have a workflow I’m trying to build out involving a few steps, curious for feedback on it and whether there’s a better way.
I want to build a form for a primary contact at a company to share with their staff to register for training sessions. I want each customer to receive a unique URL that they can share with their staff that pre-populates the company name into a hidden field, so that a workflow can add that person as a contact on the right company.
Here’s the rough flow I’ve built so far:
- Form has first name, last name, email, and company (hidden field)
- Pass the company name into the URL via a parameter, e.g.: https://hsforms.com/form-id?name=Company Name
- URL sent to staff members
- When link is clicked, form pre-populates the hidden field with the appropriate Company record name
- After submission, runs a workflow to create a Contact under the associated Company
With that contact created, we have them in our CRM and can run other automations from there.
Is there an easier way to do this? Is there a method for generating company-specific unique URLs?
Hi @colemanm ,
You’re definitely on the right track!
Just one suggestion, instead of using the company name (?company=ANC Inc), consider using the Company Record ID or Company Domain in your query string. These values are much more reliable for matching because company names can often vary slightly (e.g. “ABC”, “ABC LLC”, “ABC Corp”) or contain special characters that get URL-encoded.
For example, your link could look like this:
https://yourdomain.com/training-form?company_id={{ company.companyId }}
This helps avoid issues with name mismatches and ensures more consistent associations in your workflows.
Here are a few helpful resources for more details on pre-filling HubSpot forms via URL parameters:
Auto-populate form fields through a query string (HubSpot KB): Auto-populate form fields with a query string
Pre-filled Forms – Community Post: https://community.hubspot.com/t5/Tips-Tricks-Best-Practices/pre-filled-forms/m-p/815415
FormCrafts: Prefilling HubSpot Forms: https://formcrafts.com/help/hubspot/hubspot-form-prefill
Hope this helps!
Hi @colemanm,
If you’re sending these forms to companies, don’t all of the contacts share an email domain then? If so, why the need for the dynamic links?
With this feature enabled, contacts will automatically be associated to the company record: Automatically create and associate companies with contacts
With it disabled (if that’s not an option), you can create a contact workflow and use the “Create association” workflow action to connect contacts and companies via contact “email domain” and company “company domain name”.
No need for hidden fields.
Best regards!