Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom Identifier SendGrid Inbound Parse API

So, I'm using SendGrid to send marketing campaigns from my own SaaS platform. I recently discovered that SendGrid provide an Inbound Parse feature, so I can catch the emails that people reply to those campaigns. My idea then was adding to my platform 2 way email (sending and receiving within it)

I already setup everything and I'm parsing the emails using requestb.in. My question/problem is how can I identify who replied to the email without using the "from" header (the email account that replied) ?

For example, I send an email campaign to 100 customers. 20 of them reply to those emails. Is there a way to use a custom header or something so I can set a unique identifier and catch it when parsing the reply? In my case, my SaaS platform creates one database per signup customer. So the ideal solution would be having the database identifier within the email header when parsing it.

I have done this for the Notifications SendGrid feature, using when sending the email campaign:

->addUniqueArgument('user_database_id', IDENTIFIER)

Is there a way I can catch this information within the reply, using the Parse SendGrid API?

Thank you in advance!

Solution I used:

I decided that adding a hidden input with the identifier I needed was the best solution. Having that information within the subject or within the reply-to was too visible for the end user.

like image 435
dan Avatar asked Sep 26 '16 01:09

dan


1 Answers

You'll have to embed the unique identifier somewhere in the content itself. You'll want to put it somewhere that it's unlikely to be altered by the user. I think the easiest way is to put the unique identifier in the reply-to address itself, e.g. [email protected]. You can also use the subject line for this.

like image 115
bwest Avatar answered Sep 30 '22 14:09

bwest