Add button in email that has dynamic URL connected, based on Custom property

  • 31 March 2022
  • 4 replies

  • Anonymous
  • 0 replies


This is almost difficult to explain but here we go

  1. I have a list that is populated via Google sheets → Zapier
  2. One of the Custom properties added to each profile is a unique URL
  3. I want to find a way to include this unique URL, for each respective profile, in one of the emails in a flow
  4. Prefereably I would like it to be a button, that links to their unique URL that they have as a custom propery

Does that make sense?

I have been looking at dynamic properties etc. but I can’t seem to find exactly what I am looking for. 



Best answer by David To 1 April 2022, 17:05

View original

4 replies

Userlevel 7
Badge +60

Hello @nybrob,

Welcome to the Klaviyo Community!

I don’t see why this wouldn’t be possible since both text hyperlinks and link URLs for block elements accept dynamic variables. If you haven’t already, I would suggest taking a look at both our Guide to Properties and About Custom Properties Help Center articles to learn more about how to create and use custom profile properties.

Essentially, if you have a custom profile property of Unique URL:, you should be able to include the variable {{ person|lookup:'Unique URL' }} as a hyperlink or link URL which would render as This in turn will be recognized as a URL when a user receives and clicks on the element. 

In fact, this is use case is how a number of third-party reward programs use referral links within Klaviyo such as Yotpo, Swell, and You can see an example of this from one of my past Community post which I’ve linked below:

I hope this helps!


Badge +1

Hi David,


I have done something similar to this, but with a key difference, and it doesn’t seem to work. I’m looking for guidance. 


Essentially, I am bringing in a unique URL via, and adding it as a custom attribute. The issue is, I only want the part of the URL that makes it unique - it’s a type of user ID. I want to use that ID in a url. 

So at the moment, I’ve created this:{{ person.Feed_URL | cut:""}}/listen/7917102f

But while it works when text only, it doesn’t work as an href in a button, for example. The result in a button would be as opposed to, for example,

I’ve only started using Klaviyo in the last few days, so I don’t know if I am missing something simple!



Badge +1

@David To to add to the above, this is the link i’m being sent to when I click a button using the above:'Feed_URL'%20%7C%20cut:


Userlevel 7
Badge +60

Hey @JamesW,

Without knowing the fully story of how you’re passing this data to Klaviyo and how things are setup, it’s a bit hard to grasp. However, reading into your explanation, it appears there may be some encoding occurring that’s causing your URL to break - “%20” typically represents a space in an encoded URL. 

Therefore, this sounds like how the data is being passed and recorded within Klaviyo may not be fully set up correctly. 

If the only dynamic aspect you would need for a URL is the user ID, I’d also be curious to understand why you aren’t just passing and storing just the user ID as a custom profile property. This way instead of needing to use a cut| function, you could simply use something such as:{{ person|lookup:'user_id' }}/listen/7917102f

Along the same train of thought, since it seems like the dynamic URL inclusive of the user ID is already built out in your backend with the exception of the static ending (/listen/7917102f), I’d imagine you could potentially manipulate the data in the backend to be inclusive of this data when being passed to Klaviyo.This way, instead of having to build the dynamic URL you were looking for, you can just use a single variable to reference it similar to the solution I posed.

Overall, it seems to me that there may be something going on with your backend on how this data is being passed to Klaviyo that is causing the issue. I would recommend further working with your developer to review how this data is being synced back to Klaviyo as well as seeing if manipulating the data before it's shared to Klaviyo would make more sense.