LogoLogo
HomeExploreDocsAPIBlogContact
  • 🗃️Gooey.AI Docs
  • Changelog
  • 📖Guides
    • 🤖How to build an AI Copilot?
      • AI Prompting: Best practices
      • Curate your Knowledge Base Documents
      • Advanced Settings
      • Prepare Synthetic Data
      • Conversation Analysis
        • Glossary
      • Building a Multi-Modal Copilot
      • Frequently Asked Questions about AI Copilot
      • How to Automate Data Export?
    • 🚀How to deploy an AI Copilot?
      • Deploy to Web
      • Deploy to WhatsApp
      • Deploy to Slack
      • Deploy to Facebook
      • Broadcast Messages (via web or API)
      • Add buttons to your Copilot
    • ⚖️Understanding Bulk Runner and Evaluation
      • 💪How to set up Bulk Runner?
      • 🕵️‍♀️How to set up Evaluations?
      • How to use Bulk Run via API
    • 👄How to use AI Lip Sync Generator?
      • Lip Sync Animation Generator (WITH AUDIO FILES)
      • LipSync videos with Custom Voices
      • Set up your API for Lipsync with Local Folders
      • Tips to create great HD lipsync output
      • Frequently Asked Questions about Lipsync
    • 🗣️How to use ASR?
      • 📊How to create language evaluation for ASR?
    • How to use Compare AI Translations?
      • Google Translate Glossary
    • How does RAG-based document search work?
    • 🧩How to use Gooey Functions?
      • ✨LLM-enabled Functions
      • How to use SECRETS in Functions?
      • 🔥How to connect FirebaseDB to Copilot
    • 🎞️How to create AI Animations?
    • 🤳How to make amazing AI Art QR Codes?
      • API tips on AI Art QR Codes
    • 🖼️Create an AI Image with text
      • AI Image Prompting
      • API Tips for AI Image Generator
    • 📸AI Photo Editor
      • Build your avatar with AI
    • 🧑‍🏫How to use Gooey.AI’s Image Model Trainer?
    • 🔍Generate “People Also Ask” SEO Content
    • 🌐How to create SEO-Optimized content with AI?
    • How to use Workspaces?
      • How to use Version History?
      • How to add SECRETS in your Workspace?
    • 🍟How can I get free credits?
  • 😇CONTRIBUTING
    • Contributing
    • Documentation Style Guide
  • 🤓API REFERENCE
    • Getting started
    • API Generator
    • Rate Limits
    • Error Codes
  • 🍭ENDPOINTS
    • Copilot
    • Lipsync
    • Lipsync TTS
    • AI Art QR Generator
    • AI Animation Generator
    • Compare AI Image Generator
    • Gooey.AI on GitHub
Powered by GitBook
LogoLogo

Home

  • Gooey.AI
  • Explore Workflows
  • Sign In
  • Pricing

Learn

  • Docs
  • Blog
  • FAQs
  • Videos

Developers

  • How-to Guides
  • Get your Gooey.AI Key
  • Github
  • API Endpoints

Connect

  • Book a Demo
  • Discord
  • Team
  • Jobs

@Dara.network / Gooey.AI / support@gooey.ai

On this page
  • Step 1
  • Step 2
  • Step 3
  • Step 4
  • Step 5

Was this helpful?

Edit on GitHub
  1. Guides
  2. How to use Gooey Functions?

How to use SECRETS in Functions?

Last updated 4 months ago

Was this helpful?

Our main aim with Functions is to allow users to chain API calls and connect their other services to Gooey.AI's workflows. Several services like Supabase, Firebase and more require their own API keys. Now you can store them in your in the Accounts Page.

Step 1

Head over to

Step 2

Set up your API call. In this example, we'll create an API call to Open Weather Map, so that it can share real-time weather stats with the user.

async ({ city_name }) => {
  const API_KEY = process.env.YOUR_API_KEY;
  if (!API_KEY) throw new Error("API key not found in environment variables.");
  const encodedCityName = encodeURIComponent(city_name);
  const response = await fetch(`https://api.openweathermap.org/data/2.5/weather?q=${encodedCityName}&appid=${API_KEY}&units=metric`);
  if (!response.ok) throw new Error(`Error ${response.status}: ${response.statusText}`);
  return { weather_data: await response.json() };
};

Here process.env.YOUR_API_KEY calls the secret key from your "Secrets".

Step 3

Scroll down to the "Secrets" section in the Functions Workflow. Select the API you need for this function to work successfully.

Step 4

Hit "Run" and Save the function.

NOTE: Before saving the workflow check if your response output is correct.

Step 5

Add the saved Functions workflow in AI Copilot or other Gooey.AI Workflows.


Learn more about adding SECRETS to your Workspaces here:

📖
🧩
API Keys tab
Gooey.AI Functions
LogoHow to add SECRETS in your Workspace? | Gooey.AI Documentation