Fetch Jobs from ServiceM8 and Create Leads in ZOHO CRM

Fetch Jobs from ServiceM8 and Create Leads in ZOHO CRM

Hi,

I am trying to get all the jobs from ServiceM8 to create them in my ZOHO CRM Leads module through deluge using API.
when I use the API like this
response = invokeurl
[
type : GET
headers: header_map
];
info response;

it says "info messages stopped as the size tried to exceeded 500000 characters"

if I try it in for each loop "
Failed to execute function Mismatch of data type expression. Expected List but found String Line Number:14"

So, the Solution I found is using pagination you can get records but in serviceM8 API you cannot use Pagination Like this page=2&per_page=25. you have to use cursor like this 
and then through for each loop you can get all the records in page one.
But the problem is cursor=-1 gets only records on 1 page and I am unable to go to next page or find a proper way to get to the next page and get records from that page and like this get records from all the pages from serviceM8.

Thanks.

    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