Skip to main content
Answered

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

  • September 18, 2021
  • 7 replies
  • 565 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.

Best answer by Roy

@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

View original
Did this topic help you find an answer to your question?

7 replies

Forum|alt.badge.img+5
  • Expert User
  • 1152 replies
  • September 19, 2021

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?

 


  • Author
  • New Participant
  • 4 replies
  • September 19, 2021

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.


Forum|alt.badge.img+5
  • Expert User
  • 1152 replies
  • Answer
  • September 20, 2021

@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


  • Author
  • New Participant
  • 4 replies
  • September 20, 2021

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?


  • New Participant
  • 2 replies
  • June 22, 2022

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.


  • Author
  • New Participant
  • 4 replies
  • June 22, 2022

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.


Chris L12 wrote:

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.

NB: you can use inline styles


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings