Answered

Creating dynamic "personalized" email signatures

  • 20 April 2021
  • 8 replies
  • 215 views

Userlevel 3
Badge +5

I'm currently trying to set up an outbound template that includes the following dynamic data from every colleague of mine:

  • (full) Name
  • Job title
  • Picture

 

Last year I talked to the Intercom support about this, but it was too much work back then. Now I want to try it again. The last tip about it I got from support was to use something like this:

{{message.author.first_name}} from {{app.name}} and also use the variable for fetching the pictures: <img src="https://www.example.com/avatars/{{ message.author.first_name }}.png" height="40" width="40" class="avatar" alt="intercomavatar">

 

My first tries today weren't really successful, any other tips for me?

icon

Best answer by Milan 20 April 2021, 23:38

View original

8 replies

Userlevel 4
Badge +5

Hi @kevin b​ 

 

Can you share your HTML of the email? What part seems to be the issue? Do you have the correct naming of the images (mind capital letters)?

 

Also mind that there are just 3 author/app attributes - Author Name, Author full name and App name. So one way to achieve getting the Job title is maybe to set one of the name attributes to be the job title.

 

I tested it and on my Intercom and it seems it would work like this:

 

Screenshot 2021-04-20 233313

Userlevel 3
Badge +5

@user382​ Thanks for your response. I think the problem here is that I can only use the three attributes for authors. I guess Name and full name are related, that would leave the App name as the only option for the job title. But that would then be the same for every author. Also the images part only works as long the first names are unique (which is not the case in my company). So I guess we have to find a different solution.

 

How are you all handling this? Do you just use one of the predefined templates or do you use a different tool to send emails (maybe getting client info via the API)?

Userlevel 4
Badge +5

Yup, just checked, the Name fields are probably related - I originally thought that they can be set in your Intercom profile, but there's only one name field there.

 

There is a Job Title there but obviously not something that is used as an Attribute. Tagging @Product Wishlist​ to see this and note it as a small future improvement, as it is already there. It's not a complex thing to make it available as an author's attribute I assume.

 

So for that, you will have to live without it for now. I can not think of any other way to do it apart from squeezing the Name and Title in Full Name field 🙂

 

As for the image, try using the Full name then.

src="https://www.example.com/avatars/{{ message.author.name }}.png"

 

Again, mind the capital letters and spaces in the filename, needs to be exactly as in Intercom.

 

And for the space between names, it might be a challenge, but it should be %20 in the code. And you can upload the file with space in file name, it should work.

 

And if you still have the people with the same Full name 🙂 give them a middle name or at least a middle letter 😃

 

 

Userlevel 3
Badge +5

The job title attribute is what I was first experimenting with. Making those attributes available would be great. Unfortunately, our webspace changed the filename. I used "Kevin%20Bendixen.png" as the filename, but after uploading it was changed to "Kevin20Bendixen.png". Or did I get that point wrong?

Userlevel 4
Badge +5

Just upload it as "Kevin Bendixen.png" it will live like that on server but in the code it will be "Kevin%20Bendixen.png" as URL can not have spaces, it gets translated to %20. Server will understand :)

 

Try it :)

Userlevel 3
Badge +5

The server changes it to Kevin-Bendixen 😭

Userlevel 4
Badge +5

Naughty server 🙂 maybe the upload script you are using is doing the rename like that, try talking with some devs, dev ops team, or just host it on some other server.

Hi @Kevin Bendixen 

Just thought I’d weigh in on this in case you’d not see that it appears they have made Job Title available as an attribute in Signature .

You can also get at it using the below if you want to call it in html

{{ message.author.job }}

 

Reply