🧩How to use Gooey Functions?
Last updated
Last updated
@Dara.network / Gooey.AI / support@gooey.ai
In this guide, we will learn how to create a functions call on Gooey.AI and add it to our Gooey.AI workflows.
We'll take the example of our Copilot Analysis Scripts. All copilots have an integrated LLM script to analyze various user data. This could be user location, question category, user sentiment, etc. Once you have the data, you might want to push it to your servers, or database, or combine it with your other services.
We will take the "Gooey Chat Bot Analysis Script" in this example. This LLM script analyzes the incoming messages to our Gooey.AI Support Bot and categorizes the user's query into buckets like API Usage, Pricing, Sales, etc.
We want to push this output to our CRM so we get deeper analytics which helps us respond better to our customers.
Head over the Functions workflow
Create your POST Request with AFTER Function:
Here is a basic fetch call, you can copy or edit this code as per your needs, and paste it in the code editor on the Functions workflow.
Currently, we have added httpbin for our POST request, you can change this for your preferred API. You can find more examples here
Add your relevant variables.
Hit Submit, if your code is working fine you will get your outputs on the right side. Use the “Save as New” button and update the run name.
Now head over to the Gooey workflow where you want to add the saved functions.
Head over to the example below:
Check the Functions, choose “AFTER” and add your Saved example. And then hit "SUBMIT!
You can check your Functions output in the Workflow at the end of the page in "Details" section.
All the functions are available here:
Choose any of the Examples and Fork them!