I'm trying to send out mails using mandrill. The problem is that when I add multiple recipients to the 'to' parameter, it sends out the same mail multiple times with ALL the recepients in the 'to' list. I was expecting the same mail to be sent out individually to every person in the to list. Am I missing something ?
{
"key": "app-key",
"template_name": "platform-invite",
"template_content": [
{
"name": "connection",
"content": "<a class=\"mcnButton \" title=\"Lets Go\" href=\"http://someurl\" target=\"_blank\" style=\"font-weight: normal;letter-spacing: normal;line-height: 100%;text-align: center;text-decoration: none;color: #FFFFFF;\">Lets go</a>"
},
{
"name": "mailbody",
"content": "<p>Hi </p>\n<p>I would like you to be a ... Tic tic tic...</p>"
}
],
"message": {
"subject": "My subject line over herer",
"from_email": "superman#mydomain.co",
"to": [
{
"email": "person1#gmail.com,
"type": "to"
},
{
"email": "person2#gmail.com",
"type": "to"
},
{
"email": "person3#gmail.com",
"type": "to"
},
{
"email": "person4#gmail.com",
"type": "to"
}
],
"merge_vars": {}
},
"async": false,
"ip_pool": "Main Pool"
}
There's an option in your Sending Options to expose recipients to one another. You can uncheck that box to not show everyone's information in the 'to' header. The option(s) you select in the Sending Options are used by default for your account. You can override any of these options in individual API calls. In this case, you could use the preserve_recipients parameter to override the current default that's set for your account.
Related
I am trying to send a simple password reset email that's defined in a dynamic template. I have tested the template within SendGrid and it works fine. I have copied and pasted the template_id from the website, checked and double-checked it, but trying to post this message:
{
"personalizations": [
{
"to": [
{
"email": "chairman###########.org.uk"
}
],
"dynamic_template_data": {
"firstname": "Tim",
"url": "https://localhost:5001/account/ProcessPasswordReset?id=4&code=############"
},
"send_at": 0
}
],
"from": {
"email": "membership###########.org.uk",
"name": "A Person"
},
"reply_to_list": [],
"subject": "Password Reset",
"content": [],
"template_id": "d-23a2c68a9e5349488be23299a04a9485",
"send_at": 0
}
I get the following response
{
"errors": [
{
"message": "Unless a valid template_id is provided, the content parameter is required. There must be at least one defined content block. We typically suggest both text/plain and text/html blocks are included, but only one block is required.",
"field": "content",
"help": "http://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/errors.html#message.content"
}
]
}
As far as I can tell from the documentation, this is a well-formed message with a correct template_id.
Ok so the problem was the empty
"content": [],
This must not be sent at all if there is no content to send. Working as expected now this is removed.
I have a messenger bot built with google's dialogflow engine, to respond the user I have a webhook. when I send a message with a "hello", the default welcome intent its triggered and the webhook it its called and it responds to me.
After that I need the products of my business so I write "Comprar" (Buy), the Products intent it is triggered and the webhook responds with a fulfillment message with a list of available products.
In the history section in google dialogflow, I can see the json respond of the wekhook with the message that the user will receive.
But facebook does not show the message. I use the same webhook for many intents, and it is not working in this case.
this is the respond I got in the History section for this case:
{
"id": "f75002cd-2f8a-422a-960d-dd2c9e00b490-74fe87bc",
"fulfillmentText": "",
"language_code": "es",
"queryText": "Comprar",
"webhookPayload": {},
"intentDetectionConfidence": 1,
"action": "GET_CATEGORIES",
"webhookSource": "",
"parameters": {},
"fulfillmentMessages": [
{
"quickReplies": {
"title": "Escoge alguna de estas CategorÃas:",
"quickReplies": [
"Volver",
"",
"FIRMA ELECTRONICA"
]
}
}
],
"diagnosticInfo": {
"webhook_latency_ms": "732.0"
},
"webhookStatus": {
"webhookStatus": {
"message": "Webhook execution successful"
},
"webhookUsed": true
},
"outputContexts": [
{
"lifespanCount": 1,
"name": "vercatalogo-followup",
"parameters": {}
}
],
"intent": {
"isFallback": false,
"displayName": "ver.catalogo",
"id": "41dcecf2-11b6-4e50-8294-b86d849093e1"
}
}
I solved lol
Apparently quickReplies must not contain a empty string ("") as a quick reply, that option is not valid. So I removed it and it worked.
Is there a simple way to send emails from an Azure logic app using SendGrid to multiple recipients, e.g. comma-separated etc?
This is how it looks now:
"actions": {
"Send_email_(V3)": {
"type": "ApiConnection",
"inputs": {
"host": {
"connection": {
"name": "#parameters('$connections')['sendgrid']['connectionId']"
}
},
"method": "post",
"body": {
"from": "webserver#hotmail.com",
"to": "firstaddress#somemail.com",
"subject": "** My subject **",
"text": "Some text",
"ishtml": ""
},
"path": "/v3/mail/send"
},
Is it possible to have
"to": "firstaddress#somemail.com, secondaddress#somemail.com"
?
The SendGrid V3 connector documentation states that you can separate the email addresses by comma in the To, CC or BCC fields:
Valid email addresses separated by a semicolon or comma
Checkout the documentation: SendGrid Connector
I need to send a payload to multiple recipients in SendGrid. I use the Dynamic Templates to construct the email body, and all is working fine.
I would like to add a 'Hi {{recipientName}}' line to the email but I cannot find any documentation on it, is it possible?
I cannot include the recipient detail in the payload as a single payload goes out to many recipients
Use personalizations.
Personalizations allow you to override these various metadata for each email in an API request.
Your request will look like this:
{
"from": "gilbert#techmail.com",
"template_id": "YOUR TEMPLATE ID",
"personalizations": [
{
"to": [
{
"email": "john#example.com"
}
],
"substitutions": {
"%fname%": "John",
"%CustomerID%": "C001"
},
},
{
"to": [
{
"email": "peter#example.com"
}
],
"substitutions": {
"%fname%": "Peter",
"%CustomerID%": "C005"
},
"send_at": 1629723541
}
]
}
and it will go as a single request.
Also look at this github comment.
I can successfully add recipients to an existing DocuSign envelopes using REST API. When I add a signer to the envelope I am also able to specify the Document Visibility using excludedDocuments element. However I cannot set the document visibility using this parameter for the carbon copy recipient. My business requirement is that one carbon copy recipient should not receive some of the documents in the envelope.
Below is my JSON request:
{
"carbonCopies": [
{
"email": "123#hotmail.com",
"excludedDocuments": [
"1"
],
"name": "testCC1",
"recipientId": "5"
}
],
"signers": [
{
"email": "123#gmail.com",
"excludedDocuments": [
"1"
],
"name": "ssgmail signer",
"recipientId": "7"
}
]
}
Both the above recipients are added successfully. The first recipient(signer) is setup properly without visibility to document 1. The second recipient(carbon copy) is set up with full visibility.
Interestingly I can go to DocuSign interface and correct the envelope to remove the visibility for the carbon copy recipient. So I think DocuSign does support this functionality.
Any idea how I can add/change the visibility of individual documents for the carbon copy recipient for an existing envelope using the rest / soap API?
Note:-
Frankly I do not know how to query the document visibility in an envelope/recipient using API. For this I go to the "View/Modify Document Visibility" link in the correct envelop screen to check the current visibility setting.
I have set the the Document Visibility to "Must Sign to View Unless Sender Account" to enable the Document Visibility feature.
You are missing one property in the JSON Request, "enforceSignerVisibility":true, I have below request which is working fine with DocumentVisibility:
{
"documents": [
{
"documentBase64": "<Base64>",
"documentId": "1",
"fileExtension": "docx",
"name": "Challenge3"
},
{
"documentBase64": "<Base64>",
"documentId": "2",
"fileExtension": "docx",
"name": "Challenge4"
}
],
"emailSubject": "Test Subject",
"recipients": {
"signers": [
{
"email": "Signer#gmail.com",
"name": "Signer",
"recipientId": "2",
"routingOrder":1,
"excludedDocuments":[2],
"tabs": {
"signHereTabs": [
{
"documentId": "1",
"recipientId": "1",
"xPosition": "300",
"yPosition": "300",
"pageNumber":1
}
]
}
}
],
"carbonCopies": [
{
"email": "CC#gmail.com",
"name": "CC",
"recipientId": "1",
"routingOrder":1,
"excludedDocuments":[1]
}
]
},
"status": "sent",
"enforceSignerVisibility":true
}