Buzzy Functions & Constants

Buzzy Functions and Constants enable you to build full-stack applications entirely within Buzzy, eliminating the need for external tools like N8N, AWS Lambda console, or Make.com. These features provide secure, scalable integration with external APIs, AI services, and complex business logic.

Video Introduction

Watch this introduction to Buzzy Functions to see the features in action:

Overview

Buzzy Functions are AWS Lambda functions that run your custom code for external integrations, API calls, AI processing, and complex business logic. They provide a secure, cost-effective way to extend your Buzzy applications with custom functionality.

Constants provide secure storage for API keys, passwords, database URLs, and other configuration values. Secret constants are encrypted using AES encryption and can be safely referenced in your Functions.

Key Benefits

  • Full-Stack Development: Build complete applications without leaving Buzzy

  • Security: AES-encrypted storage for secrets, multiple authentication options

  • Scalability: AWS Lambda backend provides automatic scaling and cost optimization

  • AI-Powered: Generate functions from natural language prompts

  • Testing: Built-in testing interface with sample payloads and log viewing

  • Integration: Seamless connection between Constants and Functions

How They Work Together

Constants and Functions work together to provide secure, configurable integrations:

  1. Store Configuration: Create Constants for API keys, base URLs, and other configuration

  2. Reference in Functions: Use BUZZYCONSTANTS() syntax to access Constants in Function environment variables

  3. Deploy & Test: Deploy Functions to AWS Lambda and test with built-in interface

  4. Trigger from Apps: Call Functions from your Buzzy applications using actions

Example Workflow

// 1. Create Constants
API_KEY (secret) = "your-openai-api-key"
API_BASE_URL = "https://api.openai.com/v1"

// 2. Reference in Function environment variables
OPENAI_API_KEY = BUZZYCONSTANTS('API_KEY')
OPENAI_BASE_URL = BUZZYCONSTANTS('API_BASE_URL')

// 3. Use in Function code
export const main = async (event) => {
  const apiKey = process.env.OPENAI_API_KEY;
  const baseUrl = process.env.OPENAI_BASE_URL;
  
  // Make API call and process data
  const response = await axios.post(`${baseUrl}/chat/completions`, {
    model: "gpt-4",
    messages: [{ role: "user", content: event.body.prompt }]
  }, {
    headers: { Authorization: `Bearer ${apiKey}` }
  });
  
  return {
    statusCode: 200,
    body: { result: response.data }
  };
};

Getting Started

  1. Create Constants - Set up secure storage for API keys and configuration

  2. Build Functions - Create AWS Lambda functions for your integrations

  3. View Examples - See practical implementation patterns

Use Cases

  • AI Integrations: Connect to OpenAI, Anthropic, or other AI services

  • External APIs: Integrate with Stripe, Twilio, weather services, etc.

  • Webhooks: Handle incoming webhooks from external services

  • Data Processing: Perform complex calculations or data transformations

  • Legacy System Integration: Connect to existing databases or APIs

  • Scheduled Tasks: Run background processes and automation

Last updated