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

    • Zoho Bookings Multilingual ?

      Hello, Not sure if there is a way to do it currently, but it would be very helpful if Zoho bookings allowed multilingual translations so we could have our booking pages and notifications setup in multiple languages. Thanks,
    • Allow customers to choose meeting venue and meeting duration on booking page

      My business primarily involves one-to-one meetings with my clients. Given the hybrid-work world we now find ourselves in, these meetings can take several forms (which I think of as the meeting "venue"): In-person Zoom Phone call I currently handle these
    • Problem viewing document imported from google drive.

      Hello, When I add a document via my google drive, it is impossible to preview it. I get the error “Files without extensions cannot be previewed. Download to view this file”. Could you please help me? Also, and this is more of a question: is there a way
    • Two way sync Zoho Mail and Bookings

      Hi, I know it’s possible to view Bookings appointments in Zoho Mail, but is there a way to see my Zoho Mail meetings in the Bookings calendar?
    • Modifying iframe data of Zoho booking iframe

      Hello, I have integrated a Zoho Bookings embedded iframe into my website. Currently, I am pre-filling the booking form with default values as part of our process flow. However, I want to ensure that if an input field is already populated with a default
    • Sending my emails to Spam Folder

      I am loosing my business because of this issue, many of my customers are receiving their email in the spam sometimes no one checks them
    • Why can't I sync my Zoho Mail tasks and notes with my mobile device, and is there a way to fix this issue?

      I'm having trouble syncing my Zoho Mail tasks and notes with my mobile device. Despite following the usual steps, the tasks and notes don't appear on my phone. Is there a way to fix this issue? Regards, Adamjes, Tekskills India Pvt Limited, India.
    • Re: constant rejected email form and to my account

      Hi, have had several rejection when I sent an email to Zoho account as well as other people have sent emails to my as your health Centre they have account and all aspects have been ejected. i wonder why the email are rejecting to and from. If you see
    • How do I redeem credits?

      How do I redeem credits that are shown in billing section?
    • Introducing 'Queries' In Zoho CRM

      Hello everyone! We are here with an exciting feature - Queries in Zoho CRM! A little context before we dive right into the feature specifics :) In today’s fast-paced business environment, immediate access to relevant data is essential for informed decision-making.
    • Will zoho thrive be integrated with Zoho Books?

      title
    • Cannot add IMAP account to "new" Outlook

      Hi, I am attempting to add an IMAP account to my copy of the "new" Outlook on my desktop computer. I have tried using the default password when MFA was disabled and an app password when MFA was enabled. But neither attempt worked. My Windows 11 OS number
    • Custom Module I made shows the records I uploaded are there but they are not showing up.

      Here's a screenshot of the module - It shows there are around 2000 records but it says that there aren't any. The module is viewable by administrators and I am on an administrator account so I am not sure why the records aren't showing. Any help would
    • Update Zoho Flow on Sprint Work Item Status Change

      Hello, I've contacted Zoho One support but have been unable to help in a timely manner, so I'm asking the community. I want to start using sprints, but I'm having an issue. I need to post updates to Slack when a Work Item has a status change. My understanding
    • Issue with skip_workflow Not Preventing Edit Workflow Trigger

      Hi Team, I am trying to upload a file to a form in Zoho Creator. However, during the upload, an edit workflow is being triggered. I want to prevent this workflow from running, so I have used the skip_workflow parameter as mentioned in the API documentation:
    • Create Dashboard using data/tables from different workspaces

      Is it possible do create a Dashboard using different tables that are part of different Workspaces? 
    • Este domínio já está associado a esta conta

      quando digitei meu domínio recebi essa mensagem que meu domínio estava associado a uma conta que eu nem faço idéia de quem seja. Como que faço pra resolver isso?
    • Storage addon failed to upgrade

      Hi, I am trying to purchase addon storage, but i am getting upgrade failed error Sorry! We are unable to process your information. Please try again after some time. If the problem occurs again, please visit our Contact Us page to reach out to the appropriate
    • no puedo recibir correos

      Hola, en la cuenta de la empresa desde hace unos tres días dejamos de recibir correos y no hemos realizado ningun cambio de configuracion, requerimos asistencia urgente por favor
    • Default reminders on Emails

      I have seen that it is possible to set, for each email, a reminder when the email remains unresponded for some time. This is very useful, so useful that I would like to set it for all my emails, by default. Because an unanswered email usually requires
    • NO PUEDO RECIBIR CORREOS EN MI CUENTA ZOHO MAIL

      LO QUE SI PUEDO HACER ES ENVIAR CORREOS PERO NO PUEDO RECIBIR CORREOS. Y LA CONFIGUIRACION DE MI DNS YA ESTA CORRECTA Y APUNTAN A ZOHO PERO AUN ASI NO PUEDO RECIBIR  NECESITO AYUDA URGENTE YA QUE EN MEXICO NO HAY FORMA DE COMUNICARNOS VIA TELEFONIA CON
    • Send email is not authenticated

      Hi, I’m getting an error in Gmail, when receiving an email from my account in zoho, my email is already authenticated in my domain, and I don't know why I keep receiving this message... also testing in outlook, the message goes directly to "junk".
    • Using Queries with dynamic parameters in Kiosk Studio

      Hi, I'm pretty new when it comes to developing within Zoho (I'm really a .NET developer), as it was just added to my responsibilities. For a new feature in the CRM, I'm trying to develop a Kiosk function to show a list of records (retrieved by the new
    • Workflow Based on Manual Journal

      Manual journal entries are one of the few areas that cannot kick off a workflow automation in Zoho Books currently. I would propose considering adding that. My use case is that the payroll provider I use (a flavor of SurePayroll) has a Zoho Books automation
    • Zoho sheets to crm and mapping

      i want to know more about mapping the contacts that i upload from the spreadsheet also couldnt able to understand flow
    • Condition-based data sharing rules are now available in CRM

      Dear All,   We are excited to introduce a much awaited feature: condition-based data sharing rules. We'd love to explain more about this enhancement.   Specify record conditions in data sharing rules Data sharing rules enable you to share all the CRM
    • Automatic Portal invite

      We have numerous customers we move through a blueprint in deals, when they get to a certain point we need to give them portal access, how can this be done through deluge or a workflow?
    • Directly Edit, Filter, and Sort Subforms on the Details Page

      Hello everyone, As you know, subforms allow you to associate multiple line items with a single record, greatly enhancing your data organization. For example, a sales order subform neatly lists all products, their quantities, amounts, and other relevant
    • Is it possible to trigger the review process when a record is edited?

      Hello, I need to trigger a review process whenever a field is updated to a specific value. This field is empty when the record is created and is only filled later. I know the approval process exists, but that's not what I'm looking for in this case. What
    • 【Zoho CRM】ウィザード機能のアップデート

      ユーザーの皆さま、こんにちは。コミュニティチームの中野です。 今回は「Zoho CRM アップデート情報」の中からウィザード機能のアップデート をご紹介します。 今回のアップデートにより、ウィザードの「条件処理ルール」機能が改良され、以前の入力画面の項目を基に条件を設定できるようになりました。 これまでは条件設定が1つの画面内に限られていたため、画面間で情報を関連付ける際に、余分な項目を作成する必要がありました。 今回のアップデートにより、前の画面の情報を利用して次の画面に条件を適用できるため、設定がより効率的になります。
    • Multiple date selection

      Hello, we want create app for our company. We need create tasks for our employers. For example - 1 employer have task every Friday the whole year. Second have task every Monday for 6 months. For simple way create Multiple date selection in date form
    • Last payroll of the year gives me an error

      Trying to run the last payroll of the year. The payment doesn't get to the employee until 1/1/25, which is correct. However when I try to process it I get the following error: Tax calculation is not supported for the year 2025. Please change the Pay date.
    • Partner with HDFC And Sbi Bank.

      Hdfc and sbi both are very popular bank if zoho books become partner with this banks then many of the zoho books users will benefit premium features of partnered banks.
    • Domain not usable

      We have not used this domain because the Chrome systems on our office devices are not compatible with your technology. I am sorry if no one has never advised you of this. Please cancel if it has not already been canceled. Ticket# 7526594 Please see
    • Send a formatted CV to multiple contacts at multiple clients - and have it associate with both candidate client

      I would like to send a formatted CV of a candidate to multiple contacts at multiple clients and have it kept on the record of all three; client, contact and candidate. I understand how to send an email to multiple contacts at multiple clients - and indeed I am able to attach the CV of a candidate through 'browse'. Obviously this does not associate it with the candidate though, only the contact it is sent to. Is there any way to do this? Thanks in advance.
    • Set organization level access to Knowledge Base and manage duplicate article permalinks (with date appended to them)

      Hello everyone, We have introduced two important updates in the Knowledge Base module: Permissions - A new permission called "Admin access" has been introduced under module permission. Permalink alert - Users will be alerted when an article with the same
    • Language Field on Contact Person-level

      Dear at Zoho Books, would it be possible for you to have a Field for 'Language' for the Contact Persons under a Company. In CRM and Bigin we could create a Custom Field (Dropdown) for this effect but without any present in Zoho Books we could never sync
    • This domain is not allowed to add. Please contact support-as@zohocorp.com for further details

      I am trying to setup the free version of Zoho Mail. When I tried to add my domain, theselfreunion.com I got the error message that is the subject of this Topic. I've read your other community forum topics, and this is NOT a free domain. So what is the
    • Zoho Books email notifications

      Hi, We are currently implementing Zoho books for our organisation. I have 2 questions. 1. Are we able to embed HTML into our emails to make them look as part of our business ? Branding is very big issue for us and i would like to make sure that all branding efforts are carried across into the notification emails.. 2. Is there a way to preview the notifications that are sent out to our customers so we can make sure the look and feel is as we require ? thanks
    • Multiple templates (Settings > Email templates)

      Hi Zoho, We would like to have more options to select a template when sending an email in Zohosign. Currently we can only add 1 template per option: Is this possible? Kind regards, Tristan
    • Next Page