Skip to main content
Contributor II
October 21, 2021
Solved

Data Feed Variables in Subject Line or Preheader

  • October 21, 2021
  • 3 replies
  • 1009 views

Is it possible to use variables from a data feed in a Campaign subject line or preheader? 

 

We have have a custom web feed from our blog that populates the body of an email template that we use for campaigns, but I haven’t been able to figure out how to insert the blog title into the subject line or preheader.

 

If it helps, here’s what we’re using to populate the email and I’d like to use the item.title in the SL or PH:

<p>{% with feed=feeds.LawnFawnBlog %} </p>

<h2>{% for item in feed.rss.channel.item|slice:"1" %}<span style="font-size:18px;"><a href="{{ item.link }}">{{ item.title }}</a> </span></h2>
<em>By {{ item|lookup:"dc:creator" }} on {{ item.pubDate|cut:":00 +0000" }}</em>

<p>{{ item.description|safe }}</p>

<p>{{ item|lookup:"content:encoded"|safe }} {% endfor %}</p>

<p>{% endwith %}</p>

 

    This topic has been closed for replies.
    Best answer by David To

    Hello @elyssa,

    Great question!

    Although you can use dynamic variables to personalize a subject line to address your recipients, the subject line does not support variables and syntax from a web feed/data feed associated with the email template. At present the subject line will support dynamical variables to reference profile properties or event data. Because web feeds are activated within the template itself, they would not carry over to the subject line for use. 

    You also can find a number of various dynamic variables you can use within your email’s subject line from the How to Format Date Variables in Templates Help Center article. 

    I do believe this is a great suggestion and that it would benefit a number of our Community members and clients who want more customization out of our template builder and will be sharing this feedback with our Product Team!

    Thanks for being a part of our Klaviyo Community!

    David

    3 replies

    David To
    Klaviyo Employee
    David ToAnswer
    Klaviyo Employee
    October 22, 2021

    Hello @elyssa,

    Great question!

    Although you can use dynamic variables to personalize a subject line to address your recipients, the subject line does not support variables and syntax from a web feed/data feed associated with the email template. At present the subject line will support dynamical variables to reference profile properties or event data. Because web feeds are activated within the template itself, they would not carry over to the subject line for use. 

    You also can find a number of various dynamic variables you can use within your email’s subject line from the How to Format Date Variables in Templates Help Center article. 

    I do believe this is a great suggestion and that it would benefit a number of our Community members and clients who want more customization out of our template builder and will be sharing this feedback with our Product Team!

    Thanks for being a part of our Klaviyo Community!

    David

    elyssaAuthor
    Contributor II
    October 22, 2021

    That would be awesome, thanks for your help and passing it along to the product team!

    Contributor I
    August 2, 2023

    Just putting in a +1 request for this feature.