Skip to main content

How to fill in variables in a personalized version

Written by Jack

When a story uses variables, each personalized version gets its own values for them: the prospect's name, company, prices, logo and so on. This article explains how to fill in every kind of variable, including tables, repeatable rows and optional content, and how to do it automatically with the API.

Fill in the variables

  1. In the editor, click Share and open the Personalized versions tab.

  2. Click Create version.

  3. Give it a Version title, for example Proposal for Acme Inc.

  4. Under Fill out your version variables, enter a value for each variable.

  5. Click Create version.

1.png

The Create a new version form, filled in for Acme Inc.

If HubSpot or Fathom is connected, pick a record first. Its fields fill in automatically under Auto-enriched data, and anything left over appears under Additional variables.

Anything you leave empty shows the variable's fallback value to readers, or stays blank if it has none.

How each field works

Variable type

How you fill it in

Input

Type the text.

Number

Type a number. Letters show Enter a valid number.

Select / Multiselect

Pick from the list.

Date

Pick a date with Choose date. The label shows any offset the story adds, for example Expiry date +14d. Today-based dates fill in by themselves.

Image / Video

Choose a file from your media, or upload one. You can crop images.

Color

Pick a color.

Iframe

Paste an HTTP(S) link.

AI

Generated automatically once the variables its prompt uses are filled in. Use Additional instruction to steer it, then click Update.

Data (table or chart)

Click Add data to type rows into a spreadsheet, or Upload CSV.
​

  • Profile variables used in the story, such as Sender name and Sender picture, are pre-filled from your profile. Change them only if this version should show someone else.

  • Formulas don't appear. They're calculated from the other values.


​

Repeatable rows and optional content

If the story has repeatable content, such as a team member card designed once and repeated for each person, its rows appear below the variables. They start from the story's default rows. Edit them, click Add more for another row, or use Upload to import a CSV.

At the end of the form, Optional content lists the parts of the story that can be included or left out:


​


​

2.png


Optional content in the version form

  • Items with a switch are included by default. Turn the switch off to leave that content out of this version.

  • Items with a rule, such as Shown when {{plan_tier}} equals "enterprise", decide by themselves from the values you entered. You can't switch them.

Content that's left out is removed from the version completely, so readers can't find it.
​

Tables and charts in a version

When you open a version in the editor (Open in editor after creating it), tables and charts take their numbers from the version's data rather than from typing into the cells. They show a violet outline.
​

3.png

A table filled from a data variable, with Make static

  • Edit data / Filled from {{…}}. Click the badge, or click a selected table, to edit its data in a spreadsheet. For charts, use Edit data in the toolbar. The table or chart updates from what you enter.

  • Make static. Copies the current data into this version's table or chart and unlinks it. You can then edit cells, rows and styling directly. It stops following the data, and you can undo this.

4.png

Editing a table's data in a version

The first time you save data for a table or chart, Storydoc creates a data variable for it, such as table_data. It then appears in the share dialog and the API, so the next version can be filled the same way.
​

Create versions automatically with the API

To create versions from your CRM or another tool, open Personalized versions and, under Need to automate this process?, click Automations. You'll see a ready-made request for this story in cURL, Node.js, Python, Go, PHP, Ruby, Java, Salesforce Apex, HubSpot Workflow and more.

The request sends each value in data. Tables are lists of rows, and repeatable content is a list of objects, one per row:

{"senderEmail":"[email protected]","storyId":"your-story-id","data":{"title":"Proposal for Acme Inc.","prospect_first_name":"Sarah","company":"Acme Inc.","plan_tier":"enterprise","table_data":[["Plan","Seats","Price / year"],["Growth","12","$21,600"]],"team":[{"team_member_name":"Anna Kowalska","team_member_role":"Account executive","team_member_photo":"https://example.com/anna.png"},{"team_member_name":"Ben Ortiz","team_member_role":"Solutions engineer","team_member_photo":"https://example.com/ben.png"}]} 

}

Leave out AI variables, formulas and sender or organization variables. Storydoc fills those in itself.

FAQ

Why is Create version greyed out? A required field is empty or has an invalid value. Hover the button to see Please fill in all required fields, then check the fields marked in red.

I see "Upgrade to publish". The story uses variables from a higher plan. The dialog lists them. Upgrade, or ask the story's owner to remove them.

Can I change a version after sending it? Yes. Open Personalized versions, find the version and choose Edit version settings, or open it in the editor and click Update & Share.

Did this answer your question?