User Tips: Create a bot & have users chatting with ChatGPT in 30 seconds!

User Tips: Create a bot & have users chatting with ChatGPT in 30 seconds!

If you want your users to be able to chat 1-1 with a bot, this post is for you! This builds on the great post by Poorvik Palanikumar here that walked users through the process of creating a bot that could respond on a channel. If you followed that post and set everything up can can skip to "3." below and continue from there.

(The lazy instructions... Copy code below, create a bot, click "edit code" for the message handler & paste the code, insert your own token and save.)

To create & enable a bot to respond privately to user instead of on a channel follow the steps below.
  1. Create a bot. (Click your profile pic>Bots & Tools > "Create Bot" (top right)
  2. Name the Bot, add description and set it to "Organization" and Save
  3. Click "Edit Code" from the "Message Handler" section and delete the existing code (presuming you don't use it!)
  4. Paste in the code below and save. Make sure to add in your own token. Get one here
You're all set! Go and subscribe to your bot and ask it a question... you'll have to grant permissions from the popup message.

Message Handler Code: 
(Bots & Tools > Edit Handlers (for your bot) > Go to Message Handler & click "Edit Code")

response = Map();
//
//Reassign the inbound message from the user, which we'll send to ChatGPT
question = message;
//
//
// Need to add your OWN openAI token below. Replace the xxxxxxx with your own token
token = "Bearer xxxxxxxxxxxxxxxx";
//
//
header = Map();
header.put("Authorization", token);
header.put("Content-Type", "application/json");
//
//
//Set the params which we'll send to chatGPT
//Increasing the temperature increases response creativity, decreasing has the opposite affect
params = { "model": "text-davinci-003", "prompt": question, "temperature": 0.4, "top_p": 1
"max_tokens": 256, "frequency_penalty": 0, "presence_penalty": 0, "stop": { " Human:", " AI:"} };
//
//
// Making post request to ChatGPT
fetchCompletions = invokeurl
[
type: POST
parameters: params.toString()
headers: header
detailed: true
];
//
//
info "Fetch completions: " + fetchCompletions;
//
//
//Check we got a good response from ChatGPT
if (fetchCompletions.get("responseCode") == 200) {
// Grab the answer from Chat GPT
answer = fetchCompletions.get("responseText").get("choices").getJSON("text");
//
//
//Put the answer into the response map which is what we'll return to the user
response.put("text", answer);

}
else if (fetchCompletions.get("responseCode") == 429)
{
response = { "text": "Oops! I can't help with this. Try asking something else :wink:" };
}
//
//
// Trigger the response back to the user.
return response;


27 Second Gif... use the extra 3 seconds to set your own OpenAI "token" before you paste the code (get your token here)

 


Some FAQ:

Will this allow users to subscribe to a bot and ask it questions and get answers?
Yes but it is not the current ChatGTP version that everyone is raving about. It's the ChatGPT-3 Da-Vinci model which is excellent but not on the same level as ChatGTP-4 which is still in research mode and does not yet have an API connection.

Will it remember my previous questions?
It generally depends on how you phrase the questions and give the context. It's not on the same level as ChatGPT-4.

I asked it a question but it does not give me a great answer, why?
How you enter your "prompt" (question) is the important part. Generally the more context and instruction you give the better the answer. Google or YouTube  "ChatGPT Prompt Design" and you'll be an expert in no time. 


      Zoho Campaigns Resources


        • Desk Community Learning Series


        • Digest


        • Functions


        • Meetups


        • Kbase


        • Resources


        • Glossary


        • Desk Marketplace


        • MVP Corner


        • Word of the Day


        • Ask the Experts


          • Sticky Posts

          • Automating Employee Birthday Notifications in Zoho Cliq

            Have you ever missed a birthday and felt like the office Grinch? Fear not, the Cliq Developer Platform has got your back! With Zoho Cliq's Schedulers, you can be the office party-cipant who never forgets a single cake, balloon, or awkward rendition of
          • Accelerate Github code reviews with Zoho Cliq Platform's link handlers

            Code reviews are critical, and they can get buried in conversations or lost when using multiple tools. With the Cliq Platform's link handlers, let's transform shared Github pull request links into interactive, real-time code reviews on channels. Share
          • App Spotlight : PagerDuty for Zoho Cliq

            App Spotlight brings you hand-picked apps to enhance the power of your Zoho apps and tools. Visit the Zoho Marketplace to explore all of our apps, integrations, and extensions. In today's fast-paced world, seizing every moment is essential for operational
          • Automate your status with Cliq Schedulers

            Imagine enjoying your favorite homemade meal during a peaceful lunch break, when suddenly there's a PING! A notification pops up and ruins your moment of zen. Even worse, you might be in a vital product development sprint, only to be derailed by a "quick
          • Bulk user onboarding for Cliq Channels in a jiffy

            As developers, we frequently switch between coding, debugging, and optimizing tasks. The last thing we want is to be burdened by manual user management. Adding users one by one to a channel is tedious and prone to errors, taking up more time than we could

          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 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 コンテンツ








                                ご検討中の方

                                  • Recent Topics

                                  • Introducing notifications in the vendor portal

                                    Imagine this: You're a recruiter working with multiple vendors on a high-volume hiring project. You’ve just updated a job description after a last-minute change from the hiring manager. One of your vendors, however, is still working off the older version
                                  • CRM limit reached: only 2 subforms can be created

                                    we recently stumbled upon a limit of 2 subforms per module. while we found a workaround on this occasion, only 2 subforms can be quite limiting in an enterprise setting. @Ishwarya SG I've read about imminent increase of other components (e.
                                  • Settings Icon No Longer in ZOHO Desk?

                                    In ZOHO desk, there has been a gear icon for settings. as of yesterday, it is no longer there. I showed up briefly this morning but is gone again. Anybody else experiecing this?
                                  • LESS_THAN_MIN_OCCURANCE - code 2945

                                    Hi I'm trying to post a customer record to creator API and getting this error message. So cryptic. Can someone please help? Thanks Varun
                                  • How to update "Lead Status" to more than 100 records

                                    Hello Zoho CRM, How do I update "Lead Status" to more than 100 records at once? To give you a background, these leads were uploaded or Imported at once but the lead status record was incorrectly chosen. So since there was a way to quickly add records in the system no matter how many they are, we are also wondering if there is a quicker way to update these records to the correct "Lead Status". I hope our concern makes sense and that there will be a fix for it. All the best, Jonathan
                                  • Analytics for notes created

                                    Is there a way I can see how many notes were created per day? Via reporting or analytics?
                                  • Add Custom Reports To Dashboard or Home Tab

                                    Hi there, I think it would be great to be able to add our custom reports to the Home Tab or Dashboards. Thanks! Chad
                                  • Cannot update Recurring_Activity on Tasks – RRULE not accepted

                                    Hello, I am trying to update Tasks in Zoho CRM to make them recurring yearly, but I cannot find the correct recurrence pattern or way to update the Recurring_Activity field via API or Deluge. I have tried: Sending a string like "RRULE:FREQ=YEARLY;INTERVAL=1"
                                  • Add image to report...

                                    Greetings, I send a weekly color coded report via Creator email. I would like to add the legend somewhere in the report. Header, footer where ever. I have the legend saved on Google Drive and can access it via shared link. Sure someone has wanted to add
                                  • More controls for User Fields in CRM

                                    Dear All, We are here with a minor but crucial enhancement to the user fields—now set accessibility permissions to the records for user field. User field allows you to extend co-ownership of records to your peers. You can collaborate with them for certain
                                  • Calls to accounts rather than leads or contacts?

                                    So..... We have a dilemma and I'm hoping someone has encountered this before and figured out a fix. We have just migrated to Zoho. It's great.....expect for how "Calls" are handled.... We are B2B. We do not use the leads module. A "Lead/Prospect" for
                                  • Image Upload Field | Zoho Canvas

                                    I'm working on making a custom view for one of our team's modules. It's an image upload field (Placement Photo) that would allow our sales reps to upload a picture of the house their working on. However, I don't see that field as a opinion when building
                                  • Power of Automation :: Automated 'Delayed & Closed' Status Update Based on Due Date

                                    Hello Everyone, A custom function is a software code that can be used to automate a process and this allows you to automate a notification, call a webhook, or perform logic immediately after a workflow rule is triggered. This feature helps to automate
                                  • Lead Blueprint transition in custom list view

                                    Hi, Is It possible to insert the Blueprint transition label in a custom Canvas list view? I am using Lead module. I see the status, but it would be great if our users could execute the Blueprint right from the list view without having to enter the detailed
                                  • Range names in Zoho Sheet are BROKEN!

                                    Hi - you've pushed an update that has broken range names. A previously working spreadsheet now returns errors because the range names are not updating the values correctly. I've shared a video with the support desk to illustrate the problem. This spreadsheet
                                  • Can Zoho Flows repeat Actions more than once?

                                    I'm attempting to make an intentional Zoho Flow loop using the below layout. However, when "WithinLimit" condition is met, the program fails to execute the action "Get & Add Request Co..." again. Is this by design? Is Zoho Flows unable to repeat actions
                                  • Has anyone integrated SMS well for Zoho Desk?

                                    Our company does property management and needs to be able to handle inbound sms messages which create a ticket for Zoho Desk. We then need to be able to reply back from Zoho desk which sends the user an sms message. This seems like a fairly common thing
                                  • populate email address and name in zoho desk?

                                    Is it possible to populate the email address and name in the zoho desk widget? We only use it in the context of an authenticated user, so we already know the user's name and email. Thanks,
                                  • Are there default/pre-built dashboards in Zoho Desk?

                                    Hi, I am looking for some pre-built dashboard templates in Zoho Desk, similar to what we can find in CRM/Projects, etc Thank you
                                  • Enable Locations for Expense

                                    Hi, please enable Locations (ex Branches) for Zoho Expense so that there is consistency between this app and Zoho Books. Thanks in advance.
                                  • Adding branded signature to tickets reply

                                    Hi, i am unable to figure out how to add signatures with logo to tickets reply. please advice .
                                  • Zoho Calendar not working since a few days

                                    Hey there, first off a minor thing, since I just tried to enable the Calendar after reading this in another topic (there was no setting for this though) : For some reason my current session is showing me based in New York - I'm in Germany, not using a
                                  • Zoho Marketing Automation 2.0 - Landing Page function not working

                                    Dear Zoho Team, I am working on implementing Zoho Marketing Automation 2.0, and am now looking into the section "Lead Generation". If I open the "Landing Pages" section, I immediately get an Error code: Error: internal error occurred. Can you help me
                                  • WebDAV / FTP / SFTP protocols for syncing

                                    I believe the Zoho for Desktop app is built using a proprietary protocol. For the growing number of people using services such as odrive to sync multiple accounts from various providers (Google, Dropbox, Box, OneDrive, etc.) it would be really helpful if you implemented standard protocols such as WebDAV / FTP / SFTP so that alternative inc clients can be used.
                                  • Zoho Mail Android app update: Manage folders

                                    Hello everyone! In the latest version(v2.9) of the Zoho Mail Android app update, we have brought in support for an option to manage folders. You can now create, edit, and delete folders from within the mobile app. You can also manage folders for the POP
                                  • How to share ticket numbers across different ticket types

                                    I'm running an event and have three different ticket types. Add on Event + Main Event - Early bird Main Event only - Early bird Add on Event only - Early bird And Standard class - shown but not available until early bird finishes Add on Event + Main Event
                                  • Adding Social Media Buttons to Basic Campaigns

                                    Hi, I'm quote new to using Zoho Campaigns and I can't work out how to add Social Media Buttons into my basic campaign? In MailChimp there's a button that brings the icons into your campaign for you. I've tried adding the social media icons as 'buttons' in Zoho but it's not looking great. Can anyone help? Thanks!
                                  • Hide Inactive Social Sign-In Providers from Login Screen

                                    Hello Zoho Team, We hope you are doing well. Currently, Zoho One allows admins to configure security policies and enable or disable Social Sign-In options for third-party providers such as Apple, Google, Microsoft, LinkedIn, Yahoo, Twitter, Facebook,
                                  • Zoho Cliq not working on airplanes

                                    Hi, My team and I have been having this constant issue of cliq not working when connected to an airplane's wifi. Is there a reason for this? We have tried on different Airlines and it doesn't work on any of them. We need assistance here since we are constantly
                                  • [Free Webinar] AI Agents in Zoho Creator - Creator Tech Connect

                                    Hello Everyone! We welcome you all to the upcoming free webinar on the Creator Tech Connect Series. The Creator Tech Connect series is a free monthly webinar that runs for around 45 minutes. It comprises technical sessions in which we delve deep into
                                  • Ship via Carrier Not Working Since Commerce Update

                                    Since the recent update to the Commerce platform, I can no longer use the ship via carrier function. It will take me to the address screen and let me verify them but when I go to save and move tot he next screen it will not do anything. This is happening
                                  • automations: Can I execute a step on a specific date?

                                    I have created a form in Zoho forms, and created a contacts list. I have also begun setting up an automation with the intention of sending the form to the contact list on a specific date every month (via email) for the entire year (essentially sending
                                  • Zoho Expense - The ability to add detail to a Trip during booking

                                    As an admin, I would like the ability to add more detail to the approved Trips. At present a requestor can add flights, accommodation details and suggest their preferences. It would be great if the exact details of the trip could be added either by the
                                  • Adding Folders in Android App

                                    Is it possible to create a new email folder within the Zoho Mail Android app?  Or can this only be done from the desktop version of Zoho Mail? Cheers!
                                  • Schedule Exports for Regular Project Updates

                                    Tracking project data often means exporting data at regular intervals. Instead of manually exporting data every time, users can schedule exports for Phases, Tasks, and Tasks in Zoho Projects. These exports can be set to run once, daily, weekly, or monthly
                                  • Question about custom fields using Pivot Tables.

                                    I have created a pivot table showing annual revenue of a client and how much payment that client is paying my company. Is there a way using pivot table to add an additional field that subtracts those to fields / shows me a percentage of that difference?
                                  • Request for Light/Dark Mode

                                    Would love the ability to switch between Light and Dark mode similar to Zoho CRM. https://help.zoho.com/portal/en/community/topic/introducing-dark-mode-light-mode-a-new-look-for-your-crm
                                  • Signature field is showing black

                                    Hello, When customer signed the service form, it is showing as below picture Phone model: iPhone 16 Pro We tried delete and install application, but it not solved. This has on phone of a few person. There is any advice to solve this?
                                  • Journey Email - Ignored Contacts

                                    I have a journey setup which simply sends a string of emails over time. For some reason I am getting large amounts of the contacts who enter the first email being ignored and I can't find anywhere in reports or audit logs why these contacts are not
                                  • Involved account types are not applicable when create journals

                                    { "journal_date": "2016-01-31", "reference_number": "20160131", "notes": "SimplePay Payroll", "line_items": [{ "account_id": "538624000000035003", "description": "Net Pay", "amount": 26690.09, "debit_or_credit": "credit" }, { "account_id": "538624000000000403", "description": "Gross", "amount": 32000, "debit_or_credit": "debit" }, { "account_id": "538624000000000427", "description": "CPP", "amount": 1295.64, "debit_or_credit": "debit" }, { "account_id": "538624000000000376", "description":
                                  • Next Page