OpenAI Alert - Plug Sample #6: Reach maximum potential with SalesIQ Zobot and ChatGPT Integration

OpenAI Alert - Plug Sample #6: Reach maximum potential with SalesIQ Zobot and ChatGPT Integration

In recent times, AI-powered tools have seen a remarkable surge in usage due to their exceptional capacity to enhance overall performance across diverse industries and sectors. One such tool is ChatGPT which businesses have started to use predominantly for multiple purposes. 

ChatGPT is an AI-powered chatbot that can understand natural language and respond to queries in real-time. On the other hand, we already know that SalesIQ's Zobot is an excellent tool to automate customer engagement which helps businesses to engage with their customers and perform actions based on unique business needs. 

By integrating ChatGPT and SalesIQ's Zobot, businesses can create a seamless customer service experience that is not only efficient but also productive. In this post, let's discuss how to integrate ChatGPT with SalesIQ's Zobot ( Codeless bot builder ) using Plugs.

Here is a sample plug to Integrate Zobot with ChatGPT Assistant

What can this plug do?
  • First plug helps to integrate the GPT model - text-davinci-003 with Zobot using your OpenAI's API key.
  • Second plug helps to integrate the GPT- model 3.5-turbo with Zobot using your OpenAI's API key.
  • Get a response from GPT for any text inputs such as questions/issues from the visitor.
Note : Remember that this script cannot train the GPT models according to your business resource. 

How to create the ChatGPT Plug?

Step 1 - Get API keys from the Open AI
  • Navigate to the OpenAI developer section.
  • Click " Log in " on the top right corner to log in with your account. 
  • If you belong to multiple organization, select your organization. 
  • Finally, click on " Create new secret key " to generate an API key for your account. 


Step 2 - Create the Plug
  • In your SalesIQ Dashboard, navigate to Settings > Developers > Plugs > click on Add .
  • Provide your Plug a name, description, select the Platform as SalesIQ Scripts , and click on Create Plug
  • Click on Parameters and provide the following
    • Input Parameter: question | Data Type: String
    • Output Parameter: answer | Data Type: String

  • Copy and paste the below script (text-davinci-003 model or gpt-3.5-turbo) and replace the token with your API key.
Plug script to integrate with GPT - text-davinci-003 model
  1. if(session.containsKey("question"))
  2. {
  3. question = session.get("question").get("value");
  4. }
  5. token = "Bearer sk-oxxxxxxxxxxxxxxxxxxxxxxxxxxxxxK";
  6. //replace the token with your API key | token = "Bearer <your API key>";
  7. header = Map();
  8. header.put("Authorization",token);
  9. header.put("Content-Type","application/json");
  10. chatgpt = Collection();
  11. chatgpt = {"model":"text-davinci-003","prompt":question,"temperature":0.9,"max_tokens":250,"top_p":1,"frequency_penalty":0.0,"presence_penalty":0.6,"stop":{" Human:"," AI:"}};
  12. params = Map();
  13. params.put(chatgpt);
  14. response = invokeurl
  15. [
  16. url :" https://api.openai.com/v1/completions"
  17. type :POST
  18. parameters:params.toString()
  19. headers:header
  20. ];
  21. info response;
  22. answer = response.get("choices").getJSON("text");
  23. info answer;
  24. response = Map();
  25. response.put("answer",answer);
  26. return response;
Plug script to integrate with GPT - gpt-3.5-turbo model
  1. if(session.containsKey("question"))
  2. {
  3. question = session.get("question").get("value");
  4. }
  5. token = "Bearer sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx2";
  6. //replace the token with your API key | token = "Bearer <your API key>";
  7. header = Map();
  8. header.put("Authorization",token);
  9. header.put("Content-Type","application/json");
  10. chatgpt = Collection();
  11. chatgpt = {"model":"gpt-3.5-turbo","messages":{{"role":"user","content":question}},"temperature":0.9,"max_tokens":250,"top_p":1,"frequency_penalty":0.0,"presence_penalty":0.6,"stop":{" Human:"," AI:"}};
  12. params = Map();
  13. params.put(chatgpt);
  14. response = invokeurl
  15. [
  16. url :"https://api.openai.com/v1/chat/completions"
  17. type :POST
  18. parameters:params.toString()
  19. headers:header
  20. ];
  21. info response;
  22. answer = response.get("choices").getJSON("message").get("content");
  23. info answer;
  24. response = Map();
  25. response.put("answer",answer);
  26. return response;
  • Click on Save to save the plug. 
  • Test the plug by giving any input.

  • The API response from GPT () will be as below.

  • Finally, click on Publish .
How to incorporate plugs in the Codeless bot builder?
  • Navigate to Settings > Bot > Add , provide the necessary information, and select Codeless Bot as a bot platform or open an existing bot.
  • Select the Plugs under Action Cards and select the required plug (Only published plugs will be listed here).
  • Provide the bot context variables for the plug input (question) and output (answer).

  • In this case, the "visitor.question" is the visitor's input (maybe a question/issue) that is stored in the bot context by the visitor fields card.

  • The plug executes and returns the answer from the GPT response as output (answer) which has to be stored in bot context (gptResponse) for displaying it to the visitors.
  • Click Save. 
  • Then using any input/response cards, display the answer. Type % to list all the dynamic and context variables. 


Heads up:
  • Use a single choice card to display the answer and provide two follow-up actions such as "I've another question" for the visitor to ask another question and "End chat" to end the conversation. 

  • Save the visitor's choice in a bot context and using criteria router , route the flow respectively. 



Cheers, 
Sasidar Thandapani







    • Recent Topics

    • Standalone function is not working

      Hi, We have created a standalone function to integrate with a third-party service using OAuth. However, the standalone function's REST API key is expiring automatically after some time. When we regenerate the API key from the admin account, the function
    • Marketer's Space: Leveraging CRM Data for Dynamic Content and Personalized Campaigns

      Hello Marketers! Welcome back to another post in Marketer’s Space! We’re excited to continue our series on the many advantages of integrating Zoho CRM with Zoho Marketing Automation (ZMA). This series is designed to help you unlock the full potential
    • Last sync date/time as a widget

      Is there any way to get the last date/time that the data shown (reports and dashboard) was last updated.  For example, If I have our data being synced every 3 hours and the last was done 2 hrs ago, I would like to show date/time of update OR updated #{hrs}
    • An update to improve email delivery | Email Authentication & Relay

      Dear Zoho Recruit Community, We hope this message finds you well. This post is to inform you about an important update regarding the authentication of all email domains in your Zoho Recruit account. Effective 31st December, 2024, emails sent using email
    • 100 record view limitation

      I have just migrated from another CRM and am starting in ZOHOcrm with over 5000 contacts. It seems that my searches and sorts are limited to 100 live records....or am I missing something. This seems to be very limiting...in a lot of scenarios (mass email,
    • Setting Up Direct Mail Campaigns

      If I need to set up a 5 step direct mail campaign is that possible? Basically every week I upload names from a CSV to Zoho and then would need to mail them every 45 days for about 6 months. I would want to be able to take names off the list when they say their house is sold or that they don't want to be contacted. I don't necessarily need to have it integrated with click2mail or anything but would at least need to be able to export the file in a CSV/excel for each mailing.  Does anyone know if that's
    • RFQ MODEL

      A Request for quotation model is used for Purchase Inquiries to multiple vendors. The Item is Created and then selected to send it to various vendors , once the Prices are received , a comparative chart is made for the user. this will help Zoho books
    • Recruit - How to Force a Job Opening out of a Blueprint

      In past versions of Zoho Recruit, there was the ability to create a custom button on a record's page that would evoke a URL that would force a record out of a blueprint. What is that URL or is there a better way to force a record out of a blueprint?
    • Introducing Zia LLM: Zoho’s in-house Generative AI solution for CRM's AI capabilities

      Hello everyone, We're excited to announce the launch of our in-house Large Language Model (LLM) by Zia to power our AI offerings. What is LLM? LLM stands for Large Language Model, a powerful AI technology that processes and generates human-like text based
    • ERROR

      I deleted a contact card, I want to add it again but it says that the contact already exists. I searched the records and it is not there, and I even deleted it in the trash. The email is this one:xxxxx. Please help!!
    • How to Automatically Populate the Deal ID in the Parent Lead After Creating a New Deal with Blueprint?

      Hello Everyone! 🎉 I wanted to share a solution to a problem that some of you might have encountered. In Zoho CRM, when creating a Deal from a Lead using a Blueprint, data can only flow in one direction—from the Lead (parent) to the Deal (child). But
    • Chroniques de l'année 2024 Zoho France : avec vous, pour vous !

      Nous vous adressons nos vœux les plus chaleureux pour une année 2025 exceptionnelle et pleine de réussites ! Fidèle à son habitude, Zoho France vous réserve chaque année de nombreuses mises à jour, des événements marquants, des activités diversifiées
    • Why can't I see the delivered Zoho Campaign automation email on Zoho CRM lead record?

      I recently did update the field mapping on our Leads sync services between Zoho CRM and Zoho Campaigns. The end goal is to create tailored email drip campaigns with the use of segments and automation. I understand you can build cadences, email templates,
    • Custom Function to Format Phone / Mobile numbers in Australian Standard format

      So I got sick of phone numbers being formatted incorrectly and Zoho not doing anything to standardise phone numbers to meet E.164 formats. So I went and coded my own function to fix this. And figured I'd share with the community This is specifically for
    • Kaizen #173: A Comparison of Zoho CRM REST APIs and GraphQL APIs

      Hello everyone! Welcome back to another week of Kaizen! Zoho CRM offers two API architectures for its users: REST API and GraphQL API. Each of these API architectures has its own strengths and ideal use cases. In this post, we will discuss the difference
    • How to preview a locked note? Or just lock one?

      Once a note is locked there is no preview, just a blur (good). But, if there are a lot of notes, wouldn't it be good to have the title show up and blur the rest? Or am I just being dumb - do they all unlock and lock at the same time?
    • Linkedin Plugin

      H, Is there a plugin to allow the connection to LinkedIn and simplify editing? I've looked at a few, but they all seem to be outdated and not working... What do you use or can you recommend?
    • Unable to use Sign "You have entereed some invalid characters"

      Unable to use Sign "You have entered some invalid characters" I do not see any invalid characters. The text in "Leave a Note" is plain text which I entered directly into the field. See attached screenshot
    • Remove the link between app admin roles and org admin privileges

      Greetings Zoho One Team, Currently, assigning someone as an admin in certain Zoho apps, such as Cliq, Connect, Mail, Vault, or Forms (and maybe other apps as well) automatically grants them org admin privileges, even though they are not listed as org
    • !! URGENT My sent mail goes to spam

      I tested a few times and every time I send mail out it goes the recipients spam box.  Why is it marking my mail as spam? please help me ! thanks
    • Difference between Admin, Team leader/Manager, Clinets/user profile and roles in Zoho Project

      I've been wondering to find out the difference between the key feature of Admin,Manager, and client/user in Zoho Project. I am student and trying to learn about the Zoho Project. I could not find the roles and profiles difference between this 3 users
    • Missing Modules such as RFQ, Purchase request and Store room

      Hi, I wonder why zoho doesn't add Purchase requests module e.g. ( a lower level staff wants to request for provision of something) which can be approved or rejected by his/her manager. In case of approval, same request can be converted into RFQ. Secondly
    • Important updates to Zoho CRM's email deliverability

      Last modified on: Jul 24, 2024 These enhancements are released for all users across all data centers. Modified on: Oct 30, 2023 Organisations that are in the Enterprise and above editions of Zoho CRM, and have not authenticated their email-sending domains
    • Paid Support Plans with Automated Billing

      We (like many others, I'm sure) are designing or have paid support plans. Our design involves a given number of support hours in each plan. Here are my questions: 1) Are there any plans to add time-based plans in the Zoho Desk Support Plans feature? The
    • Zoho expense linked with Campaign instead of customers

      Hi, Is there a development planned for linked an expense or a report to a zoho campaign? Indeed, suppose I created a campain in which I add different clients (for example a trip to a foreign country where I meet 3 different clients), I would like this campaign to be linked to the expenses I have. Say I have a plane ticket, taxis and 1 hotel night, I would like those expenses to be linked to the 3 clients. With Zoho expense, it is not possible at the time (or maybe it is but I do not know how!). thanks
    • Function #4: Schedule Customer Statements

      Regularly sending statements to customers is an imperative part of many business processes as it helps foster strong customer relationships and provides timely guidance on payments. While you can generate the statement of accounts and have it sent over
    • Export multiple Invoice PDF

      As part of end of year accounting a client needs to export all of their Invoices in PDF from Zoho CRM. Do they need to click into every single Invoice and click the Export to PDF button. Is there a means of either doing a mass Export to PDF of all Invoices
    • Introducing 'Dynamic display' in the latest version of the Bigin Android mobile app.

      Hello everyone! In the latest version of the Bigin Mobile Android app (1.6.0), we have introduced support for Dynamic Display, which transforms the List View into a powerful and customizable visual interface. Dynamic Display: This feature allows users
    • CRM - Copy data from Single Line to Lookup Field

      Hello, I need help to create a workflow with a custom function in order to copy value from a single value field to a Lookup Field. Module : Shipment Single value field API name : Customer_ID Lookup field API name : Account_ID WOuld be great to have some
    • How to Parse XML Data Returned by API?

      I have several APIs integrated with my CRM and they work great. I am having some trouble though parsing data out of a large string/array in Funtions? I need to be able to pull the DeviceId and the WebSiteDeviceName from each PanelDevice. I would appreciate
    • Unable to add organization consultants and contractors in Zoho People

      Hello Team: I am unable to add my few consultants and contractors in Zoho People. How to add these people as Users?
    • Linkedin - Recruiter System Connect

      Hi there! Does anyone here know how to connect Zoho Recruit to Linkedin Recruiter via Recruiter System Connect?
    • Lead Owner not importing all users only main user

      I have set up 3 users, 1 CEO, 2 Managers, all users have been verified. I'm using the Free ZOHO version. When I go to import Leads my Excel file has these 3 users listed as the Lead Owner. However when the import completes only 1 user is displayed as
    • Getting Data into zoho calendar from a creator app

      So how do you get a date that's created in an app, for example when a site visit is due, into the zoho calendar for the field engineers.
    • Create deal from estimate

      Hello, I have integrated CRM and books. I created an estimate on CRM but I would like to allocate that estimate to a deal with the contact. How can I do this please?
    • Lookup field, odd issue

      So I tried creating and app that has the names of engineers so I can use that for a lookup in the other apps that are being created . I add the look up in a new app, launch the app and when I try to fill out the form its just blank in the drop down menu
    • Custom module - change from autonumber to name

      I fear I know the answer to this already, but thought I'd ask the question. I created a custom module and instead of having a name as being the primary field, I changed it to an auto-number. I didn't realise that all searches would only show this reference.
    • Automating leave alerts in Zoho Cliq

      The constant ebb and flow of employee absences can disrupt projects and hinder productivity. With Zoho Cliq's leave alert automation, you can easily keep your team informed. Real-time notifications can be sent to team chats, ensuring that everyone stays
    • Strange pop up windows when sales order saving.

      Hi, May I ask what's the meaning of this pop up window. Our client script don't have this setting..
    • How to increase number of contacts shown in CRM Campaign ?

      Hello Everybody, I can't find a way of increase the number of contacts displayed per campaign. It is limited to 10 contacts which is very distressing when I need to update the status of several contacts. What a huge waste of time and energy Is there a
    • Next Page