Zoho Projects as part of Zoho CRM Plus - function to create new project when Deal status changes

Zoho Projects as part of Zoho CRM Plus - function to create new project when Deal status changes

Hi there,

This is my first post on this forum so bear with me :-).
I have created a Function to create a new project in Zoho Projects that I will associate to workflow automation to trigger this function when a deal stage changes. Being new to Deluge I am struggling to get the Group of the new project assigned. Below is the code of the function which is largely based on an article I found. 
I can't figure out how the Group Name is stored in the database (format). 
Any help on this will be much appreciated. 

  1. createMap = Map();
  2. createMap.put("name",ProjName);
  3. createMap.put("description",Description);
  4. createMap.put("template_id",TemplateID);
  5. //createMap.put("group_id",GroupID);
  6. //custom fields
  7. //end of custom fields
  8. response = zoho.projects.createProject(PortalName,createMap,"rwrelateproject");
  9. info response;
  10. mp = Map();
  11. mp.put("name",ProjName);
  12. datalist = List();
  13. datalist.add(mp);
  14. datamp = Map();
  15. datamp.put("data",datalist);
  16. resp2 = invokeurl
  17. [
  18. url :"https://www.zohoapis.com/crm/v2/Deals/" + id + "/Zoho_Projects/" + response.getJSON("projects").getJSON("id")
  19. type :POST
  20. parameters:datamp.toString()
  21. connection:"rwrelateproject"
  22. ];
  23. info resp2;
  24.  

    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