Answered

How can we use custom templates when sending emails from intercom through the API? (Read details for more)

  • 18 September 2021
  • 6 replies
  • 318 views

Hi!

We are integrating the Intercom API in order to send email messages to our users from our App, and we're already being able to send them, being received, checking the seen status, etc...,

We would like to use a custom template when sending our emails, but we're not able to achieve that.

We've trying creating a new template, and when sending the email from the intercom page, it works (email is received with our custom style) but when sending through the API, we can just select plain or personal, but in both cases, the standard style is applied.

We're not aiming to do anything really special, just using some custom Google fonts and customising the colours of the buttons.

 

Thanks a lot in advance.

 

Cheers,

Diego.

icon

Best answer by Roy 20 September 2021, 03:47

View original

6 replies

Userlevel 1
Badge

Hello @diego r​ 👋

 

To make sure we are on the same page, are you using Send Message API?

 

Once you defining the template in API, it's not working?

 

Thanks for the reply @roy s11​ 

We're using this package: https://github.com/laravel-notification-channels/intercom (since our app uses Laravel)

 

However, on the Send Message API (I guess it's this? https://developers.intercom.com/intercom-api-reference/reference#admin-initiated-conversation) it states that "template" can be either "plain" or "personal"

I don't see any place where to set our template (Let's call it "custom_at") to be used.

 

Thanks in advance.

 

---

 

PS: Still searching, I've found another post here that points people to this Medium post from Cathal Horan (https://medium.com/@cathal.horan/how-to-send-html-emails-with-the-intercom-conversations-api-748eb2784b1 in which it shows how to basically use the Messages API.

 

Also, the official php SDK (https://github.com/intercom/intercom-php#messages states that more options can be found here: https://developers.intercom.io/reference#conversations/p>

but that URL is unfortunately not available.

 

Thanks for all your help, guys.

Userlevel 1
Badge

@diego r​ ,

 

Upon checking you are right, it does not support custom templates, and even Company or Announcement templates as well (Created by Intercom).

 

But the body in the message can contain HTML, which allows you to send directly HTML templates via API.

body - The message body, which may contain HTML.

I hope this workaround helps you send any template via HTML.

 

Best,

Roy

Hi again @roy s11​ 

Yes, I already knew about the (limited) support for HTML tags, but unfortunately, when we try to add inline styles, or custom <style></style> content, it gets stripped from our HTML, so we cannot add our own colours or fonts.

 

Let's try other workaround: Since we can only use "Plain" or "Personal" templates... is there a way to edit those templates?

Hi! Bump on this.

Is <style> still not supported as per https://medium.com/@cathal.horan/how-to-send-html-emails-with-the-intercom-conversations-api-748eb2784b1 ?

I'm also trying to use our direct HTML template but seem to be running into similar issues.

Nah, @chris l12​ They just strip everything from whatever you send...

Quite disappointed with the whole Intercom experience tbh.

 

[Edit]: I mean, from the integration PoV. Marketing team really love it.

Reply