Using merge fields for dynamic content in emails

Is there a way to use merge fields to create dynamic content in emails?

For context: I have a website that has forms to download content but I dont want to create 100s of forms for each download - is there a way to have one form and then have dynamic content (merge fields) for the these files to be sent via email.

In pardot - I had the form URL, with the {{name_of_download}} and {{url_of_download}} and in the email that was sent to the user it would pull the correct file, but it was one universal form.

I really hope this makes sense - been searching all day for this but can’t find an answer

Hey @TWheeler0 merge tags are just called “personalization tokens” within HubSpot and can be used quite easily in emails! As long as the information is within a property you can use them. There’s a great article on these here.

Hey @TomM2 , sorry if I am not getting it - but if I wanted to add the file to an email - where would I add these properties.

For an example this is an exisiting form with the merge fields

https://info.bradfordjacobs.com/l/540262/2022-09-06/3v5gn1k?**Name\_of\_Latest\_Download=Saudi%20Arabia%20EOR%20Guide**&**URL\_of\_Latest\_Download=Saudi-Arabia-Country-Guide**

These merge fields would then be pulled into the email - so I am wondering how I would add this to my form as well as the email!

I think I have just confused the issue!

Hey @TWheeler0 any fields should be created as a property within HubSpot and added to your form, if you don’t want them displayed on the form, you can add them as a hidden field and populate them via a query string as you have in the url provided.

Once the fields are submit on the form, the contact will have them as a contact property value. Which you can just insert as a personalization token in any email (see the link on my initial comment).

What’s happening in your example
That URL you shared is passing values into the form via query parameters:

?Name_of_Latest_Download=Saudi%20Arabia%20EOR%20Guide
&URL_of_Latest_Download=Saudi-Arabia-Country-Guide
Those parameters populate hidden form fields (or mapped fields) when the page loads.
Step 1 — Add fields to your form
In your form builder (likely Pardot/Account Engagement, HubSpot, etc.):
Create custom fields:
Name_of_Latest_Download
URL_of_Latest_Download
Add them to your form as:
Hidden fields (typical for this use case), OR
Visible if you actually want users to see/edit them
Configure them to accept URL parameters
(often called “query string mapping” or “prefill from URL”)
Step 2 — Pass values via the link
When someone lands on the form page, you append parameters like:

?Name_of_Latest_Download=Your%20File%20Name
&URL_of_Latest_Download=yourfilelink.com
That’s what auto-fills those fields behind the scenes.
Step 3 — Use the fields in your email
Now comes the payoff.
Inside your email template, you insert merge tags like:
{{Name_of_Latest_Download}}
{{URL_of_Latest_Download}}
(Exact syntax depends on your platform—Pardot uses %%field_name%%, HubSpot uses {{ contact.field_name }}, etc.)
Example:
Download your guide here: {{URL_of_Latest_Download}}
The key idea (this is the part that trips people up)
You do not attach the file directly in the form.
Instead:
The form captures/stores the link + name
The email pulls that data and displays it
Think of it like a relay race:
URL → Form fields → Email merge tags
Common gotchas
Field API names must match exactly (case-sensitive in some systems)
URL encoding matters (%20 for spaces, etc.)
Hidden fields won’t work unless explicitly set to accept query params
Emails won’t show anything if the field is empty