<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How can I get the client_id in my email template?]]></title><description><![CDATA[<p dir="auto">I'm doing some email template configuration to add some conditional statements by application_id, to customize the email by application. In the FreeMarker template, I added a hash with the values I need for each application, and at the top of the template, I create a clientId variable to use as my index.</p>
<pre><code>[#assign clientId = state.client_id?string!"dafb6ef6-a2a8-4d34-9d69-59bfed3e31aa" /]
</code></pre>
<p dir="auto">This works in some emails, but in others I get an error that the state doesn’t exist, so I can’t reference <code>state.client_id</code>.</p>
<p dir="auto">Is there a more straightforward way to get to <code>client_id</code> in an email template, so the default operator <code>!</code> will work here if it doesn’t exist? Or is there a way to do some check on state first, and go straight to a default value if state doesn’t exist?</p>
]]></description><link>https://fusionauth.io/community/forum/topic/345/how-can-i-get-the-client_id-in-my-email-template</link><generator>RSS for Node</generator><lastBuildDate>Tue, 21 Apr 2026 13:06:54 GMT</lastBuildDate><atom:link href="https://fusionauth.io/community/forum/topic/345.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 26 Aug 2020 23:17:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How can I get the client_id in my email template? on Wed, 26 Aug 2020 23:19:02 GMT]]></title><description><![CDATA[<p dir="auto">I figured it out…. I just had to put state.client_id in parens so it resolved them together.</p>
<pre><code>[#assign clientId = (state.client_id?string)!"dafb6ef6-a2a8-4d34-9d69-59bfed3e31aa" /]
</code></pre>
]]></description><link>https://fusionauth.io/community/forum/post/993</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/993</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Wed, 26 Aug 2020 23:19:02 GMT</pubDate></item></channel></rss>