Smart Variable (ChatGPT API)

Use Case #

We have created a new Variable type that can allow you to send your prompts to ChatGPT API and get the answer back for use in your automation flow or simply for saving it as a property in you results section. This is very useful for your data enrichment and or content generation needs and you can use the response from ChatGPT API to create blog articles out of keywords or a title, or other outputs that can be assisted by Ai content creation.

Get your ChatGPT API Key #

Before you can starting using this command, you need to first generate a ChatGPT API Key. You can find your API keys on this URL of your OpenAi account:

You will need to click on “Create new secret key” and then copy the generated key as shown in the screenshot below.

Add your ChatGPT API Key to project settings #

Once you have copied or saved your API key, you can add it to your project settings. You first need to go click on the Gear icon of your concerned project from the Projects panel. See below screenshot

Now go to the MORE OPTIONS > CHAT GPT Tab and enter your API key and click on SAVE ALL SETTINGS

Send Smart Variable prompt to ChatGTP API #

Now that your project is configured with the ChatGPT API you can start using this command. You can add this command by searching for “smart” in the variable group. You can then rename this variable if you with but more importantly you can add your prompt in the message field. See screenshot below. Note that you can use a variable to automate the prompt you want to send to ChatGPT API, to do so you can use a variable calling syntax: {{Dynamic}} or {{List}} if you have a list if your prompts specified in a List Variable.

Get & Use ChatGPT API response #

Once you will run this automation it will send your prompt to and get an answer back from ChatGPT API. The response is stored in the Smart variable itself and you can call and use this response value by calling this syntax: {{Smart}}

You can use the {{Smart}} value in other automation commands such as an Alert Command. But you can also save it in a DataSet property. See below the two examples.

    Powered by BetterDocs

    Leave a Reply