ChatGPT integration

I have just discovered ChatGPT and developed a process for creating an education assessment report based on test data provided. Very excellent results.

I want to integrate this into my Glide CRM so coordinators can automatically produce the assessment report (de-skilling the process) rather having a skilled educator do it.

ChatGPT has provided Python code to achieve the acceptance of data and production of the report (to browser output). Initial thought is the user would copy/paste this into a notes field on the CRM which can then be incorporated in a Document using a Merge API in Google Docs.

It would, of course, be great to have the process automatically add the report to the Google sheet but have no idea how that could be achieved.

I know I can build a url in a template field to pass data from the CRM record and then use that to link to the url with a button action.

If anyone has attempted the reverse process of writing the output from a linked url to the google sheet I would like to understand how that works.

Are you using the Code Interpreter mode? I doubt GPT-3.5 or GPT-4 can produce that result.

Not sure what you mean. Using the Chat to get the algorythm right then take a copy of teh python code and run in an online python test environment. Works fine

Ah so you still have to run the Python code in an external environment. Is it purely for the production of the report, or ChatGPT can’t create the text version of the report itself?

ChatGPT is a bot. The interface is interactive. I spent a couple of hours training it how to interpret data and construct a report base don the results. If I keep feeding resuts to the bot it consistently produces the report I want.

It then provide Python code I could use to do the same thing which incorporates all the decision making and text formatting code. When I run this in a test Python environment it produces the same report.

I now need to find a coder who can set up a url that calls and executed the Python code suitably modified to extract data from url parameters and present the report as a text output to the browser. The user would then copy and paste into the CRM or the Google Docs assessment report (haven’t decided which approach yet).

This means I can then have a totally education unskilled admin person generate reports instead of having to hire someone who a=can interpret data.

I know how to structure the url with a template field so just need someone to do the python bit … way beyond me!

I was a little sceptical of AI until I did this.

Does it have to be a URL though? I mean if you can pass data from Glide to the “Python” module, in a third party service like Make perhaps, then it may work.

What is “Make”?

Here, formerly called Integromat. It’s a service to create automation flows.

Something else to learn I’m afraid. :slight_smile:

I prefer to get a coder to do something on Fiver. Have never spent more than $100

Looking at the Python code I don’t think there is anything it does that cant be done in an AppScript so could just have the google sheet generate the report as data loads into each record. I am engaging with my preferred programmer to see if he can do it.

ChatPGT is now trained to produced a defined report with variables inserted so don’t need the AI bit anymore unless I want to change the logic. It’s actually a bit flaky as it wants to be cretaive every time it does a new report and gets it wrong in the process. More like Automated “Lack of” Intelligence some times :slight_smile:

So, now I have worked out how to include array formulas in the spreadsheet to calculate all the rules and done an if-the-else column to choose the correct template based on column values and then added a template column to replace variables in the templates with values from the CRM columns. Who needs ChatGPT and there complex Python approach when Glide has it covered. :slight_smile:

Just need a programmer to do an App Script that will replace variables in a google docs template to produce the formatted report now. Much easier!

I don’t really understand what exactly you are trying to make, but it seems like you want to create Python code with the necessary text, divided into blocks and sections. To achieve this, you just need to create one perfect prompt that will handle all your complex tasks in one go. After that, you can separate it using JavaScript within Glide table, dividing it into the sections you need, and then send it to different rows or columns as required. Once done, you can create an action that will use question about the table to restructure the information if needed. Finally, you can set up automation to create any document you desire.

Thanks Alex, Actually discovered I could build the report text using logic in Glide columns and then feed data to a google doc via url parameters. Had a programmer in Pakistan charge me $40 to write an App script to read parameters and insert into a new google doc and file it in an appropriate google drive folder. In the end ChatGPT is actually unpredictable. Seems it has a personality and likes to change its response to suit its mood. :slight_smile:

1 Like

GPT is very predictable if you are using comprehensive prompt :wink:
If you need to write perfect prompt without any knowledge, you can use services specially developed for it, for example you can try this service to create prompts you need, but I think it will be better to have gpt-4 api to make it works perfect.


This is correct. If you have the right idea for the “system” prompt then it would serve you the right way.