In Workflow actions, anything you write as {{variable}} is replaced at runtime with each friend's actual value. This article covers the list of available variables, where you can enter them, and how they differ from the variables used in Message Broadcast and Auto Send Message.
How variables work
You write a variable by surrounding the name with double curly braces. Supported input fields have an "Insert variable" button that opens a list to pick from, and you can also type variables by hand. The "Emoji" and "LINE Emoji" buttons next to it insert emoji (LINE Emoji works in Send Message text and in free-input or quick-reply question text).
For example, if you write the following in a message body, it is replaced with the friend's display name when sent.
Hello, {{line.displayName}}!
- Spaces before and after the name inside the braces are optional (
{{ line.displayName }}also works) - Unsupported variable names, or variables whose value can't be found, can't be replaced (only property variables with a service name prefix, such as HubSpot, become blank). If an unreplaceable variable is left in the body, that message isn't sent
- If you add
or 'fallback text'to a variable, the fallback text is inserted when no value is found (example:{{line.displayName or 'there'}}) - Replacement happens when the Workflow runs. When testing, check the behavior with an actual friend
Fallback text for missing values (the or syntax)
If you add or 'fallback text' after a variable, friends without a value get the fallback text instead, so your message reads naturally even when a name or property is not set.
Hello, {{line.displayName or 'there'}}!
In this example, friends whose display name is available receive "Hello, Taro Tanaka!" with their actual name, while friends without one receive "Hello, there!".
- Put a half-width space before and after
or. UppercaseORalso works - Wrap the fallback text in quotes (
'or"). Full-width quotes typed with a Japanese IME also work - It also works with service-prefixed property variables, as in
{{hubspot.~ or 'N/A'}} - If you leave the fallback empty, as in
or '', nothing is displayed when there is no value - The number
0counts as a value and is not replaced with the fallback text - The same syntax works with Message Broadcast and Auto Send Message variables, such as
{{display_name or 'there'}}
Actions and input fields where variables work
Variables work in the input fields of the following actions. They are not replaced in any other input fields.
| Action | Input fields where variables work | Notes |
|---|---|---|
| Send Message | Message body (text) | All variables work |
| Question | Question text | Not available in choice labels or error messages. In the question text you can also use {{display_name}} and {{line_user_id}} (the Message Broadcast and Auto Send Message variables) |
| Send Webhook | Request body | Not available in the Webhook URL |
| Set Field | Value to set | |
| Set HubSpot Property | Value to set | For date-type properties, you can also set the value from options such as "Date at action execution" or "Selected date" |
| Set Klaviyo Property | Value to set | |
| Send Custom Event | Event name, value, and currency | |
| Customer Agent | Greeting message |
Variables can't be used in the following places.
- Condition Branch comparison values (you can't write variables in a property condition's value)
- The settings for Tag, Delay, Update Rich Menu, and Register to HubSpot Workflow
- Workflow variables in the body of a message selected in the Auto Send Message or Send LINE Notification Message action (in an Auto Send Message body, only display name and integrated-property variables work. If you want to insert a question answer or a date, use the text of the Send Message action instead)
Friend's basic profile variables
You can insert information from the friend's LINE Profile at any time, regardless of the trigger type.
| Variable | Value inserted |
|---|---|
{{line.userId}} |
The friend's LINE user ID |
{{line.displayName}} |
The friend's display name |
{{line.pictureUrl}} |
The profile image URL |
{{line.statusMessage}} |
The status message |
You can also insert the friend's acquisition route (where they became a friend) as variables. "First" is the route the friend was first added through; "latest" is the route of their most recent QR code scan or linking.
| Variable | Value inserted |
|---|---|
{{line.firstSourceType}} |
The type of the first acquisition route (tracking QR code, website friend-add CTA, and so on) |
{{line.firstSourceName}} |
The QR code name of the first acquisition route (for CTA routes, the placement name) |
{{line.firstSourceCategory}} |
The category of the first acquisition route |
{{line.firstSourcePageUrl}} |
The page URL of the first acquisition route (the page the friend add started on) |
{{line.lastSourceType}} |
The type of the latest acquisition route |
{{line.lastSourceName}} |
The QR code name of the latest acquisition route |
{{line.lastSourceCategory}} |
The category of the latest acquisition route |
{{line.lastSourcePageUrl}} |
The page URL of the latest acquisition route |
For friends with no recorded acquisition route, these variables are inserted as empty values. The same items are also available as conditions in the Condition Branch action (LINE profile conditions).
For compatibility with Workflows migrated from the previous product, {{lha_line_user_id}} is also replaced with the LINE user ID.
Received message and tap action variables
You can insert the content of the message or button action that triggered the Workflow. The value captured when the trigger fires is retained through the end of the flow, so you can use it in actions that come after a delay or a question.
| Variable | Value inserted | Triggers where it works |
|---|---|---|
{{message.text}} |
The body of the received message | Message Received |
{{postback.data}} |
The postback data of the tapped button | Postback Received |
{{trigger.params.date}} |
The date chosen with a datetime-picker button (yyyy-MM-dd) | Postback Received (datetime selection) |
{{trigger.params.datetime}} |
The date and time chosen with a datetime-picker button | Postback Received (datetime selection) |
Question answer variables
{{answers.lastAnswer}} is replaced with what the friend answered in the immediately preceding Question action. Use it to echo back the answer or to guide the friend based on their answer.
| Variable | Value inserted |
|---|---|
{{answers.lastAnswer}} |
The answer to the immediately preceding question (the choice value, the free-input text, or a yyyy-MM-dd date for a date selection) |
For example, if you place a Send Message action after a date-selection question and write the body as follows, you can echo back the chosen date.
So that's {{answers.lastAnswer}}. Understood!
Date and time variables
You can insert the date or time at the moment the action runs. Use it for reminders or to embed a date in a greeting.
| Variable | Value inserted | Example |
|---|---|---|
{{date.today}} |
The date of execution | 2026-07-22 |
{{date.now}} |
The date and time of execution (with timezone) | 2026-07-22T18:30:00+09:00 |
{{date.year}} |
Year | 2026 |
{{date.month}} |
Month | 7 |
{{date.day}} |
Day | 22 |
{{date.hour}} |
Hour | 18 |
{{date.minute}} |
Minute | 30 |
{{date.dayOfWeekJa}} |
Day of week (Japanese) | 火曜日 |
{{date.dayOfWeek}} |
Day of week (English) | TUESDAY |
{{date.formatted}} |
Date and time in Japanese format | 2026年07月22日 18:30 |
Dates and times are calculated in the timezone set for your workspace (Japan time if not set).
Integrated service property variables
When you have integrated HubSpot, Klaviyo, or Shopify, you can specify a property's internal name to insert its synced value. You can only insert properties you selected for syncing in each service's integration settings.
| Variable | Value inserted |
|---|---|
{{hubspot.property_internal_name}} |
A synced HubSpot contact property |
{{klaviyo.property_internal_name}} |
A synced Klaviyo profile property |
{{shopify.property_internal_name}} |
Synced Shopify customer data |
{{property_internal_name}} |
A form that omits the service name (values are looked up in the order HubSpot → Klaviyo → Shopify) |
The behavior when a value is not found differs depending on how you write it.
- With a service name (such as
{{hubspot.~}}): if the friend is not linked or the value is not set, it is replaced with a blank - Without a service name (
{{~}}): if no service has the matching property, it is left as-is as plain text - With either form, specifying fallback text with
or, as in{{hubspot.firstname or 'there'}}, inserts the fallback text when the friend is not linked or the value is not set
Trigger-specific variables
Using the {{trigger.key}} format, you can insert information specific to each trigger type. The main keys are as follows.
| Trigger | Available variables |
|---|---|
| Message Received | {{message.text}} (received message body) |
| Postback Received | {{postback.data}}, {{trigger.params.date}}, {{trigger.params.datetime}} |
| QR Code Scanned | {{trigger.qrCodeId}} (ID of the scanned QR Code) |
| Video Completed | {{trigger.trackingId}} (the video's tracking ID) |
| Cart Abandoned | {{trigger.checkoutUrl}} (URL to return to the abandoned cart), product information |
| Purchase Completed | {{trigger.orderNumber}} (order number), {{trigger.totalPrice}} (total amount), product information |
| Shipment Completed | {{trigger.orderNumber}} (order number), product information |
| Restock | {{trigger.productTitle}} (product name), product information |
| Restock (Amp) | Product information (such as {{trigger.products.0.title}}) |
| Browsing Reminder | {{trigger.productTitle}} (product name), product information |
| HubSpot property updated | {{trigger.propertyName}} (internal name of the updated property), {{trigger.propertyValue}} (the new value) |
| ID linked | {{trigger.provider}} (linked service), {{trigger.linkKind}} (link type), {{trigger.source}} (link source), {{trigger.externalObjectId}} (external object ID), {{trigger.qrCodeId}} (QR code ID), {{trigger.pageUrl}} (link page URL) |
The Friend Added and Blocked triggers have no trigger-specific variables. To insert the friend-add route or page, use the friend-level acquisition route variables: {{line.firstSourceType}}, {{line.firstSourceName}}, {{line.firstSourceCategory}} and {{line.firstSourcePageUrl}}.
Referencing product information
For Shopify integration triggers (Cart Abandoned, Purchase Completed, Shipment Completed, Restock, and Browsing Reminder), and for the Restock (Amp) trigger of the Amp Back in Stock integration, you can reference the list of relevant products by number. The numbering starts at 0 for the first product.
| Variable | Value inserted |
|---|---|
{{trigger.products.0.title}} |
The name of the first product |
{{trigger.products.0.price}} |
The unit price of the first product |
{{trigger.products.0.quantity}} |
The quantity of the first product |
For the second product onward, change the number to reference it, as in {{trigger.products.1.title}}. If there is no product at the number you specify, it is left as-is as plain text.
How these differ from Message Broadcast and Auto Send Message variables
Variables also work in the body of a Message Broadcast and an Auto Send Message, but they are a different set from Workflow variables. Even though the format is the same double curly braces, the available variable names differ.
In the body of a Message Broadcast or Auto Send Message, you can use variables for the friend's profile and integrated properties.
| Variable | Value inserted |
|---|---|
{{display_name}} |
The friend's display name |
{{line_user_id}} |
The friend's LINE user ID (mainly for use in URL queries) |
{{hubspot.internal_name}} / {{klaviyo.internal_name}} / {{shopify.internal_name}} / {{internal_name}} |
Synced properties from integrated services |
There are two differences worth remembering.
- The variable name for the display name differs. It is
{{line.displayName}}in Workflow actions, and{{display_name}}in a Message Broadcast or Auto Send Message (as an exception, the question text of a Question action accepts either form) - Workflow variables such as
{{answers.lastAnswer}},{{trigger.~}}, and{{date.~}}are not replaced in an Auto Send Message body. This is true even when you send an Auto Send Message from a Workflow
Message Broadcast and Auto Send Message variables work not only in text but also in the body of Flex Messages and Card Type Messages. For friends who have no value set, "--" is displayed, so specify fallback text with or, as in {{display_name or 'there'}}, or use a property that everyone has a value for. The same variables also work in the "Value" of a content feed's filter conditions, so the feed picks products per friend on every send.
When variables don't get replaced
If an unreplaceable variable is left in the body, that message isn't sent. Entering an unregistered variable name also shows a warning in the editor. When sending stops or a warning appears, check the following in order.
- Variable name spelling: Check that it matches the list exactly, including uppercase and lowercase. The braces are double curly braces
{{ }} - How the or syntax is written: Wrap the fallback text in quotes and put a space before and after
or, as in{{line.displayName or 'there'}}. The variable is not replaced if the fallback is unquoted or iforappears more than once in a single variable - Where you entered it: Variables only work in supported input fields. Workflow variables are not replaced in Condition Branch comparison values or in an Auto Send Message body
- Combination with the trigger: A value is filled in only when the Workflow fired from the matching trigger — for example,
{{message.text}}for Message Received, and{{trigger.params.date}}for a tap on a datetime-picker button - Property sync settings: For integrated-service properties, only those you selected for syncing can be inserted. Check the synced properties in your integration settings
- The friend's link status: If a friend is not linked (ID-linked) with a HubSpot contact or similar, that service's properties become blank