Update Record Example Deluge Script

Update Record Example Deluge Script

I need to write a deluge script to update a Projects task. Since the "update" API asks for "Record Id" , I must fetch the task first, then update it. 
Here the issue is that: I must pick the Task Id from the response object of the getRecords API, turn it into number then use it in update API. This requires coding skills and debug capabilities.

I've tried the below script, but it is not working. 
If you share an example script, it will be a good contribution for me and the community. 

taskName = "Service Request - " + input.ID;
data_map = Map();
data_map.put("name", taskName);
response1 = zoho.projects.getRecords("Zylker", 160XXXXXXX125, "tasks", data_map);

taskId = response1.get("task_id").get(0);

values_map = Map();
values_map.put("percent_complete", 90);
response2 = zoho.projects.update("Zylker" , 160XXXXXXX125, "tasks", taskId, values_map);

    • Sticky Posts

    • Announcing the Zoho Projects API

      Today we're excited to announce the API for Zoho Projects where any developer can extend the project management and collaboration capabilities through our APIs and can build their own customized applications for their business needs. We've tried to make the API follow the REST (Representational State Transfer) principles and generate a XML/ JSON object which allows you to access / read / write Zoho Projects data from third-party systems like Google/Yahoo gadgets, web sites, billing & invoicing systems,
    • Have you moved to REST API?

      Dear API Users, The Documentation of our Rest API is available here . All future development will be done to this version. We are deprecating the older API today. Its documentation will no longer be available and we will also be stopping the calls to this API soon. Thanks, Prasanna

          Zoho TeamInbox Resources

            Zoho DataPrep Resources

                Zoho CRM Plus Resources

                  Zoho Books Resources

                    Zoho Subscriptions Resources

                      Zoho Desk Resources

                        Zoho Projects Resources

                          Zoho Sprints Resources

                            Zoho Orchestly Resources

                              Zoho Creator Resources

                                Zoho WorkDrive Resources

                                    Zoho Campaigns Resources

                                      Zoho CRM Resources

                                                    Design. Discuss. Deliver.

                                                    Create visually engaging stories with Zoho Show.

                                                    Get Started Now

                                                      Zoho Show Resources

                                                        Zoho Writer Writer

                                                        Get Started. Write Away!

                                                        Writer is a powerful online word processor, designed for collaborative work.