I am setting up the data action for the agentless email.
when I test it , I get
"message": "The request could not be understood by the server due to malformed syntax.",
"code": "bad.request",
Not sure where to look for this.
Any ideas?
I am setting up the data action for the agentless email.
when I test it , I get
"message": "The request could not be understood by the server due to malformed syntax.",
"code": "bad.request",
Not sure where to look for this.
Any ideas?
{
"fromAddressEmail": "test@dev.example.com",
"toAddressName": "sapna",
"rawRequest": "{"fromAddressEmail":"test@dev.example.com","fromAddressName":"test-dev","toAddressEmail":"sap-kore@example.com","toAddressName":"sapna","replyToAddressEmail":"test@dev.example.com","replyToAddressName":"tester","subject":"test1","htmlBody":"test>testing1"}",
"replyToAddressEmail": "test@dev.example.com",
"htmlBody": "test>testing1",
"subject": "test1",
"fromAddressName": "test-dev",
"integrationId": "cb98c908-091b-43af-865a-fc3f296deb7f",
"toAddressEmail": "sap-kore@example.com",
"orgId": "2779583b-7035-4801-ba13-e9177054763b",
"replyToAddressName": "tester"
}
You put the opening brace of your raw request in quotes so it's illegal JSON.
Is this what you meant to say?
{
"fromAddressEmail": "test@dev.example.com",
"toAddressName": "sapna",
"rawRequest":
{
"fromAddressEmail": "test@dev.example.com",
"fromAddressName": "test-dev",
"toAddressEmail": "sap-kore@example.com",
"toAddressName": "sapna",
"replyToAddressEmail": "test@dev.example.com",
"replyToAddressName": "tester",
"subject": "test1",
"htmlBody": "test>testing1"
},
"replyToAddressEmail": "test@dev.example.com",
"htmlBody": "test>testing1",
"subject": "test1",
"fromAddressName": "test-dev",
"integrationId": "cb98c908-091b-43af-865a-fc3f296deb7f",
"toAddressEmail": "sap-kore@example.com",
"orgId": "2779583b-7035-4801-ba13-e9177054763b",
"replyToAddressName": "tester"
}
Oh! that's interesting.
but that's coming from the first step of the display when I test my data action
I am not sure how it is forming that invalid JSON
I have Action contracts for Input as
{
"type": "object",
"properties": {
"fromAddressEmail": {
"type": "string"
},
"fromAddressName": {
"type": "string"
},
"toAddressEmail": {
"type": "string"
},
"toAddressName": {
"type": "string"
},
"replyToAddressEmail": {
"type": "string"
},
"replyToAddressName": {
"type": "string"
},
"subject": {
"type": "string"
},
"htmlBody": {
"type": "string"
}
},
"additionalProperties": true
}
Output contract as
{
"title": "ResponseObject",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"conversationId": {
"type": "string"
},
"senderType": {
"type": "string"
},
"fromAddress": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
"name": {
"type": "string"
}
},
"additionalProperties": true
},
"toAddresses": {
"type": "array",
"items": {
"title": "Item 1",
"type": "object",
"properties": {
"email": {
"type": "string"
},
"name": {
"type": "string"
}
},
"additionalProperties": true
}
},
"replyToAddress": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
"name": {
"type": "string"
}
},
"additionalProperties": true
},
"subject": {
"type": "string"
},
"dateCreated": {
"type": "string"
}
},
"additionalProperties": true
}
In config section, I have
VERB: POST
URL: /api/v2/conversations/emails/agentless
request body template as
{
senderType: "Outbound",
fromAddress: {
email: "${input.fromAddressEmail}",
name: "${input.fromAddressName}"
},
toAddresses: [
{
email: "${input.toAddressEmail}",
name: "${input.toAddressName}"
}
],
replyToAddress: {
email: "${input.replyToAddressEmail}",
name: "${input.replyToAddressName}"
},
subject: "${input.subject}",
htmlBody: "${input.htmlBody}"
}
response body as
{
"translationMap": {},
"translationMapDefaults": {},
"successTemplate": "${rawResult}"
}
What could be messing up the JSON ?
the request body should have been
{
"senderType": "Outbound",
"fromAddress": {
"email": "${input.fromAddressEmail}",
"name": "${input.fromAddressName}"
},
"toAddresses": [
{
"email": "${input.toAddressEmail}",
"name": "${input.toAddressName}"
}
],
"replyToAddress": {
"email": "${input.replyToAddressEmail}",
"name": "${input.replyToAddressName}"
},
"subject": "${input.subject}",
"htmlBody": "${input.htmlBody}"
}
it worked now
This worked with sending one email id, How do it modify to send to multiple email ids?
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.