openai-icon-2021x2048-4rpe5x7n

ONE Simple Way to Use ChatGPT in Your Scenarios

If you’re a small business owner pursuing automation, or a process automation specialist working for clients, I have no doubt that you’ve considered ways to use AI (like the chat completion models of https://chat.openai.com/), to help your business. Like many, you also might be intimidated by the possibilities. I’ve seen AI, ChatGPT and other LLMs used at a wide range of businesses, but it’s mostly for customer service chat-bots, article generation, and often at large expenses for large businesses with the capabilities to make use of this new, useful, and complex technology. Let me show you one easy ways you can get started using LLMs and their wide variety of capabilities in short, easy to implement scenarios.

Parsing Data using the “Transform Text to Structured Data” module.

If you’ve ever touched a line of code in the past decade, you’re likely closely familiar with the challenges of unstructured data. No matter how hard you might work to keep incoming data to the correct format, customers find ways to invent new formats for phone numbers, emails, and names.

One way I’ve found to use AI in automation is via OpenAI’s Transform Text to Structured Data module in Make.com scenarios.

One of the most immediate cases of using the Transform Text to Structured Data module is with emails, phone numbers, and customer names. The OpenAI module can easily format a phone number in a variety of different formats to any unique formats that work best for your systems. It can also take a date in a string and format it however works best for you. Two ways I’ve found to use the module are with names: chiefly in pulling out names from emails, and putting names in more complex formats into formats that fit better for the systems I’m working with.

Let’s take a look at a sample of how I’ve got the module setup in an example scenario:

Incoming we have an email which we don’t know the exact format, but we can take a guess. We also don’t have a user’s first and last name which we want for registration. We want to ask ChatGPT to give us the first name and the last name of the user so we can input their information into our system. In this example, I’ve started by defining an email in the Tools module that is “[email protected]”. We want the AI to give us the first and the last name, and let’s see how:

The Text to Parse field is the text that we want information from, and the Prompt field is a plain English, short description of what we want out of it. There I’ve tried to do my best to describe to the model how to find the text within the incoming data. Then I start to define the exact variables I want back in the Structured Data Definition prompt below:

I provide the name of the variable, the type of variable to expect back, and I give the model several names as examples. I also declare the parameter as Required. This isn’t always a good idea, depending on how you have your scenario setup. I personally like to run a check or two after my modules have ran (so having it required is okay), but sometimes leaving the flag as No means ChatGPT might not be comfortable enough to return something to you. In this case my testing with the flag on No left me without results, but gave me good data when I turned it to Yes.

After defining what first name examples look like, I did the same for the last name variable as well, which is setup much the same.

Now let’s see what we get once we’re done running!

As you can see, we’re given a successful output by the model, and we’re now supplied with a first and last name as supplied by the model! Parsing emails like these via Regex patterns or other libraries is absolutely possible, but using the Unstructured module as we have here can save us valuable time and help us account for a wider variety of patterns from unfamiliar data!

Bonus:

Another common issue I run into are full names entered in patterns that I don’t typically anticipate (but are of course not all uncommon). We can do much the same as before with those names, with minimal changes. See the output from an example module: