Using {user: email} to automatically change content within a snippet?

Hi all!

I was wondering if someone might be able to give me some advice on the following issue.

I've been trying to create a menu for all of our specialists to be able to select their email templates from (see below)

{formmenu: default=<< SELECT A USER >>\ ; User 1; User 2; name=tbUser}

{if: tbUser = "User 1"; trim=right}
{formtoggle: default=no; name=Imported Snippet 1} Email Tempalte 1{endformtoggle}
{formtoggle: default=no; name=Imported Snippet 2} Email Template 2{endformtoggle}
{elseif: tbUser = "User 2"; trim=yes}
{formtoggle: default=no; name=Imported Snippet 3} Email Template 3{endformtoggle}
{formtoggle: default=no; name=Imported Snippet 4} Email Template 4{endformtoggle}
{else: trim=yes}<< PLEASE SELECT A USER >> {endif}

This example is very stripped back, but our team headcount is in the 30s and growing, which may present a problem in the near future.

So, I was wondering: Is there a way to use the {user: email} property to have the snippet automatically pull through the user's email templates, instead of having to use the dropdown menu each time? Instead of having to find my name in the dropdown menu, I could use the command and then just select the type of email template I want to send.

Cheers,

Hey @Dan_Fear , welcome to the community.

This is definitely possible. The question is a little light on specifics, so maybe we should do a call to discuss and then post our results here for others with similar question to use in the future? Email me andrew@blaze.today to set that up.

To provide some very general advice in the meantime, you're on the right track with your example snippet. If you have a lot of users, I'd probably create a new attribute for user type instead, and then do something along these lines:

{if: {user: type}="Type A"}Contents for user type A{elseif: {user: type}="Type B"}Contents for user type B{elseif: {user: type}="Type C"}Contents for user type C etc...{endif}

Hey! I have set up a similar use-case.

I used Datablaze, making one row for each team-member, where their name is stated in the first field. Second field is the specific template-text for the corresponding user.

Then I used the organization setting to set a new property {user: name} for each user.
In the snippet, I gave the user property a formula reference by adding {firstname={user: name}}.

Next I added the Datablaze table, applying / loading the needed fields (name, template). I set a condition to the table, that the field "Name" has to be equal (=) to formvalue {=firstname}.

Then I just add the formula {=template) in the snippet.

My actual use-case was to make a daily overview snippet. It shows each team-members their own task for the day, lunch-time, and more - all managed in Datablaze.

PS: I hid the Datablaze table in a "note" set to preview=no.

2 Likes