V
V
Viktor2015-05-21 00:54:19
PHP
Viktor, 2015-05-21 00:54:19

How to integrate gmail with CRM?

Good evening everyone.
There is a CRM in which there is a list of contacts. Need to integrate Gmail. Integration means viewing all letters in the mailbox, matching them with contacts' addresses, and if there is a match, linking these letters to contacts. Each contact has an event feed consisting of different items, including sent and received emails.
With the help of gmail api I pull out all the letters, compare them with the addresses of the contacts, if they match, I save the message in the database. I parse parts of the message, find the text/html and text/plain versions, and save them to the database.
Next, you need to display them. The question is how to do it right. If I just output HTML, it turns out pretty bad, plus letters can contain styles that affect the entire CRM (for example, the color of the link is recolored). The only option I thought of was to display the layout in the iframe, but I think it's a crutch.
I looked in another CRM, their layout of the letter is different from the layout of the letter in gmail. I don’t really understand how this happens, because from gmail I managed to pull out either its html or pure text / plain which it’s not clear how to display at all.
Thank you.
Update
Once again, "Using the gmail api, I pull out all the letters, compare them with the addresses of contacts, if they match, I save the message to the database. In the message, I parse its parts, find the text/html and text/plain versions, save them to the database."
Yes, I looked at the api, I pulled out a list of letters with the help of api, saved them to the database, and now I'm displaying them. Right here {{ $message->htmlBody }}. After that, the floor of the site flies. inside letters their styles. Well, for example, somewhere "color: red !important" or something else. Plus, the display doesn’t look very good, for example, I don’t know how to hide the blockquote list, when you answer letters, the whole history will be saved in one letter, usually in Google this is hidden with an ellipsis "...".
I pushed the content into the iframe, but I think it's crooked, I don't know how else. I looked at getbase.com, synchronized letters there, I look at the html of the letter in gmail - there is one html, I look at the layout in getbase.com - there is a different html for the letter, it’s not clear, they don’t pre-process the letter?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
marble, 2015-05-21
_

Before we rub this thread, I'd like to clarify - have you looked at the gmail api ?

A
Andrey Ermachenok, 2015-05-21
@eapeap

There is a CRM in which there is a list of contacts.

Let's say Rarus-CRM. Boxes of Users cling to it, including on GMail.
On POP3 all letters are pulled out, and cling to clients. No problem.
Or what are we talking about?

I
Igor_shem, 2020-03-13
@Igor_shem

Through the online platform https://ApiX-Drive.com , you can connect CRM (Bitrix, amo, retail, my warehouse) and gmail.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question