Ebook download email
Every ebook download page can use the same HubSpot form. The page tells HubSpot which ebook the visitor downloaded: when the form loads, the website fills two hidden form fields with this page’s PDF link and ebook title. They are submitted together with the visitor’s answers, and a HubSpot workflow uses them to send the download email.
You set the two values per page in Storyblok. The form ID stays the same on every page.
Before you start: set up HubSpot
Section titled “Before you start: set up HubSpot”The website only fills fields that exist on the form. Without this setup, nothing is stored and the email cannot include the link. It is done once, in HubSpot.
- Create two contact properties with these internal names:
pdf_download_urlandebook_title. Use single-line text. - Add both properties to the shared form as hidden fields.
- Build a workflow that triggers on a submission of this form and sends the download email. In the email, insert the two contact properties where the link and the title belong.
The internal names must match exactly, including the underscores. The website cannot fill a field with a different name.
Set up an ebook page
Section titled “Set up an ebook page”- Open the ebook download page in Storyblok and select its HubSpot Form component.
- In the HubSpot form group, enter the Portal ID and Form ID of the shared form.
- Open the Ebook download email group.
- In PDF download URL, paste the full link to the PDF, starting with
https://. - In Ebook title, enter the name of the ebook as it should appear in the email.
- Save and publish the page. Check it on the production website once the rebuild has finished.
Leave both fields empty on forms that are not ebook downloads, such as contact forms. Empty fields are not sent.
How it works
Section titled “How it works”- The values are filled in when the form appears on the page. Visitors do not see them and cannot change them.
- Each page sends its own values, so two pages with the same form still send different links.
- HubSpot stores the values on the contact. When a visitor downloads a second ebook, the values are replaced with the newer ones. The workflow sends the email right after the submission, so each email uses the ebook that was just requested.
- Spaces at the beginning or end of a value are removed.
- The website does not check the PDF link. A wrong link is sent exactly as entered.
Check that it works
Section titled “Check that it works”- Open the published ebook page and submit the form with a test email address.
- In HubSpot, open that contact and check that pdf_download_url and ebook_title show this page’s values.
- Check that the email arrives with the correct link and title.
If the contact shows the right values but no email arrives, or the email is wrong, check the workflow and the email in HubSpot. If the contact shows no values, check the two Storyblok fields on the page and the hidden fields on the form.
Field reference
Section titled “Field reference”These fields are in the Ebook download email group of the HubSpot Form component.
| Field | Default | What it does |
|---|---|---|
| PDF download URL | empty | Link to the PDF, sent as the hidden field pdf_download_url. |
| Ebook title | empty | Name of the ebook, sent as the hidden field ebook_title. |