invokeUrl in Zoho QEngine | Zoho QEngine Help

invokeUrl task

In a nutshell
The invokeUrl task allows you to make API calls and interact with external services directly within a web test case, without leaving the testing environment. It supports calling web resources, accessing other Zoho services via their APIs, and connecting to third-party services using QEngine connections for secure authentication. This makes it possible to automate end-to-end workflows where frontend actions in the browser need to trigger or validate backend operations across multiple systems.

1. Overview 

In modern testing, web interactions rarely occur in isolation; tests often need to interact with APIs, manipulate data, or trigger other systems to reflect real-world workflows. The invoke Url task in Zoho QEngine bridges this gap, letting you integrate API calls and external operations directly into their web test cases. It lets you access web resources, communicate with other Zoho services via their APIs, or work with third-party services securely.

Zoho QEngine’s connections provide a safe and reliable mechanism for authentication and authorization, ensuring every API call is executed securely. With Invoke URL, you can orchestrate complex sequences, automate backend and frontend workflows, and execute multi-system scenarios, all from a single testing environment. This enables end-to-end automation and ensures tests mirror real-world use cases efficiently and reliably.

Notes

Notes:

  • Public web resources do not require authentication, so you can call them directly.
  • This task will throw "socket timeout error" if the web resource/API takes more than 60 seconds to respond. This means that the task will be terminated, and you need to wait for a few moments before trying again.
  • Any API that is private, whether it’s a Zoho service or third-party, must use a Connection to handle authentication securely.
  • The default connection timeout will happen in 10 seconds, and the connection request timeout in 5 seconds.
  • This task can download files up to 5 MB. 

1.1 Syntax 

  1. <response> = invokeUrl 
  2. url: <url_value>
  3. type: <type_value>
  4. headers: {<headers_value>}
  5. parameters: {<parameters_value>}
  6. connection: "<connection_name>"
  7. ];
Parameter
Description
<response>
The variable that stores the response of the invoke URL call. 
<url_value>
The endpoint URL to which the request is sent. Can be a web resource, another Zoho service API, or a third-party API.
<type_value>

The HTTP method for the request.

Supported values:

  • GET

  • POST

  • PUT

  • PATCH

  • DELETE

<headers_value>
(optional)
Contains HTTP headers to be sent with the request. Headers let you define authentication details, content preferences, and request conditions. 
<parameters_value>
(optional)

The data sent in the request body for POST/PUT/PATCH requests.

If you pass a plain text value, it is treated as Raw, and the body is sent exactly as defined. If you pass key–value pairs, it is automatically treated as x-www-form-urlencoded, where both keys and values are URL-encoded (for example, a space becomes %20). This format resembles a query string but is placed in the request body instead of the URL.
<connection_name>
(optional)
The connection link name of the required service.

To use this, you must first create a connection in Zoho QEngine with the necessary authentication and request details. Once created, the connection is identified by its link name, which you reference here to authorize the invokeUrl call. For detailed steps on creating and managing connections, see Connections

2. Using invoke Url in Zoho QEngine 

Use Case: Pull User Data to Automate Dependent Test Steps

In this example, we'll fetch the list of users from the Zoho QEngine portal named Zylker. The QEngine API call is made within the script to pull live portal data that can drive subsequent test actions. For example, fetching the latest user list before assigning test roles, validating user availability, or applying conditions based on user details. By retrieving this data through the API, your test scripts stay adaptive and always reflect the current state of the portal.

To do this, we first create a connection in QEngine, which securely links the portal to its API. The connection provides a link name, which we use in our GET request to identify and authenticate the portal when fetching the user list.

  1. response = invokeUrl
  2. [
  3. url:"https://qengine.zoho.com/api/v1/zylker/myusers"
  4. type: GET
  5. connection:"qengine"
  6. ];

  7. info(response); 
where:

response
Stores the API response, which contains the user details of the portal.
QEngine’s REST API endpoint for fetching users in the Zylker portal. Learn more
GET
The HTTP method used to retrieve the records.
"qengine"
The connection link name authorized with QEngine.
  

3. Examples

Example 1: Automating Client Record Creation

This script demonstrates how to create a new client record in Zoho Recruit using its API. While users could manually add a client via the Zoho Recruit UI, doing so via a script is essential when you need to automate repetitive tasks, create multiple records in bulk, or integrate client creation into a larger test flow. To do this, you first establish a connection to Zoho Recruit, which provides the authentication required to invoke the API. Using this connection, the script sends the client details, making it easier to automate record creation. 

  1. client_payload = {
  2.     "data": [{
  3.         "Client_Name": "Zylker Group",
  4.         "Billing_City": "Keralabank",
  5.         "Billing_State": "Kerala",
  6.         "Billing_Country": "India",
  7.         "Contact_Number": "74*******5",
  8.         "Industry": "Television",
  9.         "Source": "Meetup",
  10.         "Website": "https://www.zylkergroup.com/about-us.html",
  11.         "Territories": "T1"
  12.     }]
  13. };

  14. // 2. Call the API via invokeurl
  15. response = invokeurl
  16. [
  17.     url: "https://recruit.zoho.com/recruit/v2/Clients"
  18.     type: POST
  19.     parameters: client_payload.toString()
  20.     connection: "recruit"
  21. ];
  22. // 3. Log the response
  23. if(response.isFile()){
  24. info(response.getFileContent());
  25. }else{
  26. info(response.isFile());
  27. }

where,
     
client_payload
The data you are sending to Zoho Recruit API. It contains the values for the new record and must be formatted according to the API documentation to ensure the request is processed correctly.
This URL defines where the data is sent and ensures that your API call reaches the clients module in Zoho Recruit.
POST
HTTP request method specifying the action.
client_payload.toString()
The data sent in the request body. The toString() is a built-in function that converts the JSON object into a string so it can be sent in the API request. 
"recruit"
The name of the connection.

  1. Scripts
  2. Test Cases

5. What's next

Next step
Next step
You’ve learned how to use the invokeUrl task in test cases to make HTTP requests, fetch data, and integrate APIs securely in Zoho QEngine. 
 


        Create. Review. Publish.

        Write, edit, collaborate on, and publish documents to different content management platforms.

        Get Started Now


          Access your files securely from anywhere

            Zoho CRM Training Programs

            Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

            Zoho CRM Training
              Redefine the way you work
              with Zoho Workplace

                Zoho DataPrep Personalized Demo

                If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

                Zoho CRM Training

                  Create, share, and deliver

                  beautiful slides from anywhere.

                  Get Started Now


                    Zoho Sign now offers specialized one-on-one training for both administrators and developers.

                    BOOK A SESSION







                                Quick LinksWorkflow AutomationData Collection
                                Web FormsEnterpriseOnline Data Collection Tool
                                Embeddable FormsBankingBegin Data Collection
                                Interactive FormsWorkplaceData Collection App
                                CRM FormsCustomer ServiceAccessible Forms
                                Digital FormsMarketingForms for Small Business
                                HTML FormsEducationForms for Enterprise
                                Contact FormsE-commerceForms for any business
                                Lead Generation FormsHealthcareForms for Startups
                                Wordpress FormsCustomer onboardingForms for Small Business
                                No Code FormsConstructionRSVP tool for holidays
                                Free FormsTravelFeatures for Order Forms
                                Prefill FormsNon-Profit

                                Intake FormsLegal
                                Mobile App
                                Form DesignerHR
                                Mobile Forms
                                Card FormsFoodOffline Forms
                                Assign FormsPhotographyMobile Forms Features
                                Translate FormsReal EstateKiosk in Mobile Forms
                                Electronic Forms
                                Drag & drop form builder

                                Notification Emails for FormsAlternativesSecurity & Compliance
                                Holiday FormsGoogle Forms alternative GDPR
                                Form to PDFJotform alternativeHIPAA Forms
                                Email FormsFormstack alternativeEncrypted Forms

                                Wufoo alternativeSecure Forms

                                TypeformWCAG


                                    All-in-one knowledge management and training platform for your employees and customers.

                                              Create. Review. Publish.

                                              Write, edit, collaborate on, and publish documents to different content management platforms.

                                              Get Started Now





                                                                You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                                                    Manage your brands on social media


                                                                      • Desk Community Learning Series


                                                                      • Digest


                                                                      • Functions


                                                                      • Meetups


                                                                      • Kbase


                                                                      • Resources


                                                                      • Glossary


                                                                      • Desk Marketplace


                                                                      • MVP Corner


                                                                      • Word of the Day


                                                                      • Ask the Experts


                                                                        Zoho Sheet Resources

                                                                         

                                                                            Zoho Forms Resources


                                                                              Secure your business
                                                                              communication with Zoho Mail


                                                                              Mail on the move with
                                                                              Zoho Mail mobile application

                                                                                Stay on top of your schedule
                                                                                at all times


                                                                                Carry your calendar with you
                                                                                Anytime, anywhere




                                                                                      Zoho Sign Resources

                                                                                        Sign, Paperless!

                                                                                        Sign and send business documents on the go!

                                                                                        Get Started Now




                                                                                                Zoho TeamInbox Resources





                                                                                                          Zoho DataPrep Demo

                                                                                                          Get a personalized demo or POC

                                                                                                          REGISTER NOW


                                                                                                            Design. Discuss. Deliver.

                                                                                                            Create visually engaging stories with Zoho Show.

                                                                                                            Get Started Now








                                                                                                                                • Related Articles

                                                                                                                                • for each task

                                                                                                                                  In a nutshell The for each task repeats a defined set of actions for every entry in a collection, eliminating the need to duplicate steps when the same operations need to run across multiple records. It works with collections defined directly in the ...
                                                                                                                                • Configuring Zia for Zoho QEngine

                                                                                                                                  What does this page cover Learn how to configure an AI model for Zia, Zoho QEngine's AI assistant, to enable capabilities such as generating manual test cases and test data. This page explains how to set up Zoho GenAI or connect external AI models ...
                                                                                                                                • Introduction to Zoho QEngine

                                                                                                                                  In a nutshell Zoho QEngine is a unified test automation platform for your entire testing lifecycle. From test creation and management to execution and reporting, everything lives in one workspace. It supports cross-platform testing across web, ...
                                                                                                                                • concat()

                                                                                                                                  In a nutshell The concat() function takes a source text and an append text as arguments and returns a single string formed by joining them together. The return type is Text. It is useful in test scripts where you need to combine two text values into ...
                                                                                                                                • trim()

                                                                                                                                  In a nutshell The trim() function takes a string as an argument and returns the same string after removing all leading and trailing spaces. The return type is Text. It is useful in test scripts where you need to clean up text values before using them ...
                                                                                                                                  Wherever you are is as good as
                                                                                                                                  your workplace

                                                                                                                                    Resources

                                                                                                                                    Videos

                                                                                                                                    Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                                                    eBooks

                                                                                                                                    Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                                                    Webinars

                                                                                                                                    Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                                                    CRM Tips

                                                                                                                                    Make the most of Zoho CRM with these useful tips.



                                                                                                                                      Zoho Show Resources