Examples: Functions


Gooey.AI

Javascript Code Interpreter

Loading...

120 runs

Execute arbitrary js code. Great for doing maths, getting access to internet and doing any kind of data analysis and programming

Log and return variables (Response Only)

Loading...

7.52K runs

Use this function to Log and return variables from any Gooey.AI workflow.

FETCH API: Where is ISS?

Loading...

544 runs

Fetch API for the location of the International Space Station

Gooey.AI

Firebase RTDB GET (with Cryptohash)

Loading...

0 runs

This code snippet enables secure patient data retrieval from a Firebase Realtime Database using a hashed phone number. It utilizes CryptoJS for SHA256 hashing, ensuring data privacy. The script fetches user records, searches by mobile number, and returns detailed patient information. Ideal for healthcare applications requiring secure, efficient patient data access.

Add your own Firebase API Key in the Accounts section.

Gooey.AI

Firebase RTDB POST (with Cryptohash)

Loading...

3 runs

Secure Firebase Data Storage with CryptoJS Hashing.

This code snippet demonstrates how to securely store data in Firebase Realtime Database using CryptoJS for hashing sensitive information. Add your own Firebase API Key in the Accounts section.

It includes:

  1. Dynamic import of CryptoJS library
  2. SHA256 hashing of phone numbers
  3. Firebase database integration
  4. Error handling and logging

Perfect for developers looking to implement secure data storage in their Gooey.AI projects. Easily adaptable for various data types and Firebase configurations.

Google Search

Loading...

192 runs

Call the google search API and search the web. when using this function, remember to give citation URLs to the content you have used to answer the question

Log variables

Loading...

169 runs

Save Copilot Data to an External Server Endpoint

Loading...

1.21K runs

This example collects all the parameters (the user's query, the bot's answer, WhatsApp number number, etc) from the copilot workflow and sends it to an arbitrary endpoint. Alter this example with the REST API of your own server to log every interaction.

Timezone conversion

Loading...

32 runs

Converts an ISO date string (with the source timezone provided as an offset) to the specified timezone.

Current Weather

Loading...

195 runs

Fetches the current weather given the latitude and longitude of the location using open-meteo api

CryptoJS Sha256 Hashing example

Loading...

218 runs

Use crypto hashing with your copilot to secure your user data!

https://github.com/brix/crypto-js

Example POST Request

Loading...

602 runs

Run sandboxed Javascript functions & API calls inside your AI recipes. Connect the best of AI to your own data, server or any API.

This is a minimal example for how to perform a web POST request using the Fetch API and httpbin

Functions Minimal Web Request

Loading...

222 runs

Run sandboxed Javascript functions & API calls inside your AI recipes. Connect the best of AI to your own data, server or any API.

This is a minimal example for how to perform a web request using the Fetch API.