Can't quite get data in from Zoho Desk

Can't quite get data in from Zoho Desk

So I'm getting my feet wet with Deluge in Flow, to make up for a few edge cases that we have with Desk, where we have variable scheduled tasks based on the week of the month. I have the entire flow fleshed out, however have hit a stumbling block with retrieving ticket data from Desk.

I already have a trigger that runs every Monday, which handles raising the covering ticket, I'm now trying to get the ticket data back to work out which week of the month it is.

I have 2 main issues. The first is that the other steps are producing a variable called ${createTicket_3.id}, which doesn't appear to work in the below code (says there's a missing ; somewhere in the line)
The second is that while the below code does save, I get the following error, which refers to the zoho.desk.getRecords line - "'TEXT' can not be cast to '[MAP]' for the function '836' at line number 5. Resolve the errors and try executing it again"

Going off of the example code, I added in the QueryValue mapping, however I then get "ZohoDesk connection doesnot exists at line number 1. Resolve the errors and try again"

What I have is this...

int weekNumber()
{
TicketNum = 157; //Find a way of getting ${createTicket_3.id} in, from the other blocks
QueryValue = {"":""}; //This doesn't seem to work?
ticketDetails = zoho.desk.getRecords(20067444635,"tickets",TicketNum,1,"ZohoDesk");
createdDate = ticketDetails.get("createdDate");
ticketDay = createdDate.getDay();
dayNumber = ticketDay / 7;
weekNumber = dayNumber.round(2);
info weekNumber;
return weekNumber;
}

The end goal of the block is to take ${createTicket_3.id} from the previous step, and insert that in as TicketNum, so the block returns the ticket that the flow created earlier. This will then run through the rest of the block, and will return a week number, where I can then trigger the right tasks through a decision block later on.
Any ideas anyone?
    Zoho Desk Resources

    • Desk Community Learning Series


    • Digest


    • Functions


    • Meetups


    • Kbase


    • Resources


    • Glossary


    • Desk Marketplace


    • MVP Corner


    • Word of the Day


      Zoho CRM Plus Resources

        Zoho Books Resources


          Zoho Subscriptions Resources

            Zoho Projects Resources


              Zoho Sprints Resources


                Zoho Orchestly 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




                          Zoho Writer Writer

                          Get Started. Write Away!

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

                            Zoho CRM コンテンツ




                              ご検討中の方