Standard Library
Libraries are bundled collections of reusable subflows — payments, formatting, weather, currency, and more. Instead of hand-writing an API integration, you import a library and call its subflows.
Importing a library
Add an import line before the bot block, then call its subflows with dot notation and await:
import format from "format"
bot MyBot {
flow price on command "/price" {
let { result } = await format.money(amount: 9.5, symbol: "$")
send.text(`That'll be ${result}`)
}
}
import format from "format"brings in the library under the aliasformat.await format.money(...)calls one of its subflows.let { result } = …destructures the named outputs (see Subflows).
Adding from the Store
You don't have to type the import by hand. In the Store, open the Libraries tab, find a library, and click Add to Bot — it inserts the import line for you. In the code editor, typing import " also autocompletes available library names.
Secrets stay in your bot
Libraries never read your global.* variables directly. Anything secret — an API key — is a parameter you pass in. Keep the secret in a global.* variable (set in the Variables panel) and hand it to the call:
let { temp } = await openweather.current_weather(city: "London", api_key: global.openweather_api_key)
The 22 bundled libraries
| Library | What it does | Page |
|---|---|---|
apirone | Apirone crypto payments (wallet/account model) | Crypto Payments |
nowpayments | NOWPayments crypto payments (receive-only) | Crypto Payments |
oxapay | OxaPay crypto payment gateway | Crypto Payments |
cryptomus | Cryptomus crypto payment gateway | Crypto Payments |
ai | LLM chat/classify/summarize/extract/moderate | Integrations |
notion | Notion pages & databases | Integrations |
airtable | Airtable records | Integrations |
openweather | OpenWeatherMap current weather | Integrations |
mailtm | Disposable email inboxes | Integrations |
translate | LibreTranslate text translation | Integrations |
geocode | Nominatim geocoding (place ↔ coords) | Integrations |
prices | CoinGecko crypto prices | Utilities |
shorten | is.gd URL shortener | Utilities |
qr | QR-code image URLs | Utilities |
fx_rates | Currency exchange rates | Utilities |
units | Crypto unit conversion (satoshi/sun) | Utilities |
math_x | Advanced numeric helpers | Utilities |
format | Display string formatting | Utilities |
datetime | Date/time helpers | Utilities |
text | Generic string utilities | Utilities |
validate | Input validation predicates | Utilities |
antispam | Spam/heuristic content checks | Utilities |
A library is self-contained — it can't import another library. Calls that hit the network can fail, so attach on error { } (see Error handling).