Json parse error while trying to send html content with zoho mail call api

Hi

I would like to send an email with html body content with Zoho api and attachment.
I have to use zoho api call module.
I put email body content in a string variable.
When I use this body in zoho api call module

{
“fromAddress”: “from@adress.com”,
toAddress":"to@address.com”,
“subject”: “test subject”,
“content”: “MyVarHTML”,
“attachments”: [
{
“storeName” : “{{5.body.data.storeName}}”,
“attachmentPath” : “{{5.body.data.attachmentPath}}”,
“attachmentName” : “{{5.body.data.attachmentName}}”

  }

]
}

I get an error at execution :

The operation failed with an error. [404] JSON_PARSE_ERROR

I tried using the function escapehtml but the user who received email get a text email with content like “…” and no HTML formatting email.

How can I send HTML content using Zoho Mail API Call ?

Thank you

looks like your json is not valid , you can validate json as well
|and if you are using HTML so best it to use JSON module to convert this to this to JSON string and then use in the API part

2 Likes

Welcome to the Make community!

1.

Please share screenshots of the module fields and output bundles in question? It would really help other community members to see what you’re looking at.

You can upload images here using the Upload icon in the text editor:
Screenshot_2023-10-07_111039

2.

Please provide the output bundles of the module by running the scenario, then click the white speech bubble on the top-right of each module, save the contents as a bundle.json file, and upload it here into this discussion thread:

Screenshot_2023-10-06_141025

Following these steps will allow others to assist you here. Thanks!

2 Likes

Thank you. I use json formatter on the input bundle but it don’t change anything.

Hi,

here is blueprint and screenshot :

blueprint json error.json (18.3 KB)
image

and output bundle is :
[
null
]

Thank you for your help,

Arnaud

PS : when I execute scenario manually, one of Zoho module get an error (invalid ticket). I have to reauthenticate zoho connection several times a day.