Data to be posted with sendReply in Desk or Flow with custom functions

Data to be posted with sendReply in Desk or Flow with custom functions

Hello,

I want to create email reminder in a ticket.

I try with Flow but the preconfigured Send Email create a new ticket.

I try to use invokeUrl into a customer function but i can't push the data correctly neither in Zoho Desk nor in Flow

In Zoho Desk i get a 400 Bad Request with this code :

// Create a map that holds the values of the new contact that needs to be created
 data_info = Map();
 data_info.put("channel","Email");
 data_info.put("to","foo@bar.com");
 data_info.put("fromEmailAddress","support@zoho.com");
 data_info.put("contentType","plainText");
 data_info.put("content","Hello World.");
 data_info.put("isForward","true");
 

 // Format the data as specified in the Zoho Books API
data  = Map();
 header_data  = Map();
header_data.put("Content-Type", "application/json");

response = invokeurl
[
    url :urltoreply
    type :POST
    parameters: data
    headers: header_data
    detailed:true
    connection:"internal2"
];
info response;

In Zoho Flow i tried "postToUrl" and i get the message in output:
Invalid JSON Format String at number line 3
with the following input :
{
	"DataToBePosted": "channel:EMAIL, to:foo@bar.com, fromEmailAddress:support@zoho.com, contentType:plainText, content:test, isForward:true",
	"PostURL": "https://desk.zoho.com/api/v1/tickets/xxxx/sendReply"
}



    Access your files securely from anywhere

        Zoho Developer Community




                                  Zoho Desk Resources

                                  • Desk Community Learning Series


                                  • Digest


                                  • Functions


                                  • Meetups


                                  • Kbase


                                  • Resources


                                  • Glossary


                                  • Desk Marketplace


                                  • MVP Corner


                                  • Word of the Day



                                      Zoho Marketing Automation


                                              Manage your brands on social media



                                                    Zoho TeamInbox Resources

                                                      Zoho DataPrep Resources



                                                        Zoho CRM Plus Resources

                                                          Zoho Books Resources


                                                            Zoho Subscriptions Resources

                                                              Zoho Projects Resources


                                                                Zoho Sprints Resources


                                                                  Qntrl Resources


                                                                    Zoho Creator Resources



                                                                        Zoho Campaigns Resources


                                                                          Zoho CRM Resources

                                                                          • CRM Community Learning Series

                                                                            CRM Community Learning Series


                                                                          • Kaizen

                                                                            Kaizen

                                                                          • Functions

                                                                            Functions

                                                                          • Meetups

                                                                            Meetups

                                                                          • Kbase

                                                                            Kbase

                                                                          • Resources

                                                                            Resources

                                                                          • Digest

                                                                            Digest

                                                                          • CRM Marketplace

                                                                            CRM Marketplace

                                                                          • MVP Corner

                                                                            MVP Corner





                                                                              Design. Discuss. Deliver.

                                                                              Create visually engaging stories with Zoho Show.

                                                                              Get Started Now