Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send Multiple emails to the same contact in a single request #23

Open
leandroPodo opened this issue Mar 2, 2021 · 2 comments
Open

Send Multiple emails to the same contact in a single request #23

leandroPodo opened this issue Mar 2, 2021 · 2 comments

Comments

@leandroPodo
Copy link

leandroPodo commented Mar 2, 2021

Hello everyone, I reach your support team and they asked me to raise an issue here.

Context: We are integrating SendGrid with our CRM and one of the main goals will be to send all the invoice emails by SendGrid. So we were running some testing with the API and one of them was sent an email to a customer that has multiple invoices.
Example: One customer that has 5 or more invoices to be sent at the same time.

So we will do a single request to the API, to send multiple emails to the same contact(email addresses), the request will have the same template ID (Dynamic template), but with different "Dynamic_template_data".

In our testing, the contact is receiving only one mail, instead of five. So is that expected behavior?

Request JSON:

{
  "personalizations":[{

	"to":[{"name":"Test","email":"[email protected]"}],"subject":"Testing this","Dynamic_template_data":{"Pv2_SendGrid_Producto_luz__c":"Flexible","Pv2_SendGrid_Fecha_activacion__c":"2021-01-27 00:00:00","Pv2_SendGrid_Total_a_pagar__c":"10.00","Pv2_SendGrid_Numero_factura__c":"10000","Pv2_SendGrid_Ano_corriente__c":"2021-02-09 00:00:00","Pv2_SendGrid_Direccion__c":"Huertas 45, 28021, Madrid, Madrid","Pv2_SendGrid_Nombre__c":"Test"}},{
	
	"to":[{"name":"Test","email":"[email protected]"}],"subject":"Testing this","Dynamic_template_data":{"Pv2_SendGrid_Producto_luz__c":"Flexible","Pv2_SendGrid_Fecha_activacion__c":"2023-05-18 00:00:00","Pv2_SendGrid_Total_a_pagar__c":"6370.00","Pv2_SendGrid_Numero_factura__c":"62440000","Pv2_SendGrid_Ano_corriente__c":"2021-02-09 00:00:00","Pv2_SendGrid_Direccion__c":"Huertas 45, 28021, Madrid, Madrid","Pv2_SendGrid_Nombre__c":"Test"}},{
	
	"to":[{"name":"Test","email":"[email protected]"}],"subject":"Testing this","Dynamic_template_data":{"Pv2_SendGrid_Producto_luz__c":"Flexible","Pv2_SendGrid_Fecha_activacion__c":"2023-05-21 00:00:00","Pv2_SendGrid_Total_a_pagar__c":"6400.00","Pv2_SendGrid_Numero_factura__c":"62740000","Pv2_SendGrid_Ano_corriente__c":"2021-02-09 00:00:00","Pv2_SendGrid_Direccion__c":"Huertas 45, 28021, Madrid, Madrid","Pv2_SendGrid_Nombre__c":"Test"}},{
	
	"to":[{"name":"Test","email":"[email protected]"}],"subject":"Testing this","Dynamic_template_data":{"Pv2_SendGrid_Producto_luz__c":"Flexible","Pv2_SendGrid_Fecha_activacion__c":"2023-05-24 00:00:00","Pv2_SendGrid_Total_a_pagar__c":"6430.00","Pv2_SendGrid_Numero_factura__c":"63040000","Pv2_SendGrid_Ano_corriente__c":"2021-02-09 00:00:00","Pv2_SendGrid_Direccion__c":"Huertas 45, 28021, Madrid, Madrid","Pv2_SendGrid_Nombre__c":"Test"}}],
	
  "from": {
    "email": "[email protected]",
    "name": "Test"
  },
  "reply_to": {
    "email": "[email protected]",
    "name": "Test"
  },
  "template_id": "TEMPLATE_ID_HERE"
}
@leandroPodo
Copy link
Author

Hi, @thinkingserious thanks for the answer! But I already read these links, and none of them cover my case, that's why the support request me to raise an issue here. We need to send to the same contact multiple emails with the same template ID but the Dynamic_template_data will be different for each one of them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants