Automation of Tags on Tasks

Automation of Tags on Tasks

I have written a deluge custom function

  1. endPoint = "https://projects.zoho.com/api/v3/portal/";
  2. tagsParam = Map();
  3. tagsParam.put("tag_id","2342963000000148480");
  4. tagsParam.put("entity_id",taskid);
  5. tagsParam.put("entityType",5);
  6. url1 = endPoint + portalId + "/projects/" + projectId + "/tags/associate";
  7. response = invokeurl
  8. [
  9. url :url1
  10. type :POST
  11. parameters:tagsParam
  12. connection:"cdzohoprojectstasks"
  13. ];
  14. return response;
When I run the custom function and provide the task ID. 

I get this

  1. {"error":{"status_code":"401","instance":"/api/v3/portal/858012919/projects/2342963000000148005/tags/associate","title":"INVALID_OAUTHSCOPE","error_type":"FIELDS_VALIDATION_ERROR","details":[{"message":"Invalid OAuth scope."}]}}
As this is my first custom function I understand what it is saying I think. I suspect that one of my mapped params is wrong. Any direction can be helpful. 





      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 WorkDrive Resources



                                                                      Zoho Campaigns Resources


                                                                        Zoho CRM Resources

                                                                        • CRM Community Learning Series

                                                                          CRM Community Learning Series


                                                                        • Tips

                                                                          Tips

                                                                        • 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