People are scheduling reports to run with the email action and some go, but some fail with that error. This is not APR, it’s just the base “email” action when submitting a report.
Any help or tips or breadcrumbs that lead to something are greatly appreciated!
{"errors":[{"message":"The content value must be a string at least one character in length.","field":"content.0.value","help":"http://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/errors.html#message.content.value"}]}
means that when you’re sending an email via the SendGrid API, the “content” field in your JSON payload is either empty or missing. The “value” for your content must be a non-empty string.
How to Fix
Check your API request body, especially the “content” array. It should look something like this:
"content": [
{
"type": "text/plain",
"value": "This is the body of your email."
}
]
Make sure "value" is present and contains at least one character (not just spaces).
If you’re dynamically generating the content, ensure your code is not passing an empty string or null.
Example of a valid payload:
{
"personalizations": [
{
"to": [
{ "email": "recipient@example.com" }
]
}
],
"from": { "email": "sender@example.com" },
"subject": "Test subject",
"content": [
{
"type": "text/plain",
"value": "This is a test email sent via SendGrid API."
}
]
}
If you update your request to include a non-empty string for the content value, the error should be resolved.
If you need help reviewing your specific payload or code, feel free to share the relevant (non-sensitive) part, and I can help you troubleshoot further!
@Mark_Wonsil or @spaceage or @kve using ice.MailLog, do I turn that on at the app server side and would that log the payload? Any downsides to turning this on? performance hits, etc?
Or?
I am trying to understand how the task is going from this (see screenshot below), to the payload that sendgrid is expecting:
Also cloud here. And either way, I mostly set up my own mailers using a function and a BPM Data Form, since that SSRS one doesn’t allow HTML and is difficult to pre-populate.