I connected Zoho CRM to my M365 account via the imap integration.
Now I want to post a note for every incoming email from a contact. Basically my function is working fine, EXCEPT for the mail body. It seems that there is no parameter that I can map for the body.
// Parameter: email_subject, email_body, email_from, contact_id
// Get the details of the contact
contact_id = input.contact_id.toString();
contact_details = zoho.crm.getRecordById("Contacts",contact_id);
// Create a note
note_map = Map();
note_map.put("Note_Title","Email: " + input.email_subject);
note_map.put("Note_Content","From: " + input.email_from + "\n\n" + input.email_body);
note_map.put("Parent_Id",contact_id);
note_map.put("se_module","Contacts");
create_note_response = zoho.crm.createRecord("Notes",note_map);
if(create_note_response.get("code") != "SUCCESS")
{
// Error handling
info "Error creating note for contact ID: " + contact_id + ". Error: " + create_note_response.get("message");
}
else
{
info "Successfully created note for contact ID: " + contact_id;
}