πŸ₯ž
Glif Docs/Guide
  • Getting Started
    • πŸ‘‹What is Glif?
    • πŸ’‘What can I do with a glif?
      • πŸƒRun a glif
      • πŸ”ŒBuild a glif
      • πŸ”€Remix a glif
      • πŸ—£οΈComment on a glif
      • πŸ”³Embed a glif
    • βš’οΈHow do I build a glif?
      • πŸ“½οΈVideo tutorial: Building a simple image generator
      • 🟰Using variables
    • βš™οΈProfile Settings
    • πŸͺ™Credits and Payments
    • ❓FAQs
  • Blocks
    • πŸ™‹Inputs
      • ✍️Text Input Block
      • πŸ–ΌοΈImage Input Block
      • πŸ“‹Multipick Block
    • πŸͺ„Generators
      • πŸ“ƒText Block
      • πŸ–ΌοΈImage Block
      • ➑️Image to Text Block
        • Florence2Sam2Segmenter
    • 🧰Tools
      • πŸ”€Text Combiner Block
      • πŸ”¬JSON Extractor Block
      • 🎬Videokit Tools
    • πŸ’…Styling
      • 🎨HTML Block
      • πŸ–ΌοΈCanvas Block
    • πŸ§‘β€πŸ”¬Advanced/Experimental
      • πŸŽ™οΈAudio Input Block
      • ↔️Glif Block
      • 🌐Web Fetcher Block
      • πŸ”ŠAudio Spell
      • 🧱ComfyUI Block
      • πŸ“‘Audio to Text Block
      • πŸŽ₯Video Input Block
      • πŸ”§JSON Repair Block
  • Apps
    • 🎨Glif It! Browser Extension
  • Glif University
    • πŸŽ₯Video Tutorials
      • 🐲How To: D&D Character Sheet Generator
      • 🧠How To: Expanding Brain Meme Generator
      • πŸ¦‘How To: Occult Memelord Generator
      • πŸ₯ΈHow To: InstantID Portrait Restyle Glif
      • πŸ•ΊHow To: Style and Pose a Character with InstantID + Controlnet
      • 😱How To: Create a Simple Cartoon Portrait Animation Glif (LivePortrait + Custom Blocks)
      • πŸ‘—How to Create a Clothing Restyler App (IP Adapter, ControlNet + GPT Vision)
      • 🀑How to Create a 4+ Panel Storyboard/Comic (Flux Schnell)
      • πŸŽ‚How to Create a Recipe Generator with Accompanying Pictures
      • How to Use JasperAI Depth Controlnet on Flux Dev
      • πŸ¦Έβ€β™‚οΈHow to Make a Consistent Comic Panel Generator
    • πŸ§‘β€πŸ«Prompt Engineering 101
    • πŸ–ΌοΈControlNet
    • πŸ“šAI Glossary
  • API - for Developers
    • ⚑Running glifs via the API
    • πŸ€–Using AI Assistants to build with the Glif API
    • πŸ“™Reading & writing data via the API
    • πŸ—ΎGlif Graph JSON Schema
    • πŸ“«Embed player & custom webpages
    • πŸ“«Sample code
    • ❓What can I make with the Glif API?
      • Browser Extensions
      • Discord Bots
      • Games
      • Social Media Bots
      • Experimental Projects
  • Policies
    • πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦Community Guidelines
  • Programs
    • πŸ–ΌοΈLoradex Trainer Program
  • Community Resources
    • πŸ§‘β€πŸ€β€πŸ§‘Resources Created by Glif Community Members
  • Contact Us
    • πŸ“£Send us your feedback
    • πŸš”Information for law enforcement
Powered by GitBook
On this page
  • 🟰 Using variables
  • Advanced usage
  1. Getting Started
  2. How do I build a glif?

Using variables

Unleash the power of variables within your glif's workflow.

PreviousVideo tutorial: Building a simple image generatorNextProfile Settings

Last updated 7 months ago

🟰 Using variables

Similar to using a variable within your spreadsheet program of choice, variables are a way to quickly and easily reference a longer block of text, an image, or something else generated by a previous block.

The name of the variable is determined by the title of the block.

Note: Changing the block’s title does not automatically update the name of the variable. Variables within your workflow will be highlighted in red after a block name change, indicating that the variable name needs to be updated.

In the example below, this image block shows options to use variables from previous user input blocks within the glif’s workflow. The "multi1" variable is selected, which will generate an image based on the user's selection from thefield.

Advanced usage

You can parse JSON into multiple variables using the .

Most blocks allow using in variables in many of their parameters. With the , this also includes using a variable as the glif ID. This lets you e.g. use an LLM call to decide between multiple glif options.

βš’οΈ
🟰
JSON Extractor Block
GlifBlock
multipick