Skip to content

MaSH

mash · Core

MaSH is all about Making Stuff Happen.

NameTypeDescription
actionsActions allow user-triggerable mashlets to perform actions at the client.
aiLibrary for making requests to AI models
assert
barcodesLibrary for generating barcodes and qr codes
calendar
captur
commsSend messages via email or SMS
crypt
csvRead and write to CSV files
dateCreate and process date objects
db
debug
fieldsTenant-wide enumeration and querying of custom fields.
files
geo
graceAsk Grace for contextual judgement at runtime
graphql
groups
guardian
hash
html
httpLibrary for making HTTP requests and processing responses
img
ipp
ixs
json
mailSend messages via email
math
money
office
pdf
pinecone
queue
regexBuild and quote regular expressions
reviewsAsk a person to review a file, from a script
sas
scripts
search
sharedTenant-wide enumeration and lifecycle of shared items (fLinks).
sheet
smsSend messages via SMS
store
string
tika
tmpdir
transformer
users
validatorValidate values against rules (numeric, email, ranges, …) — chain rules then call validate(value).
vex
xlsx
xml
zip
mash.binToHex(str: string)

No description yet.

mash.broadcast(title: string, message: string, recipients: Collection, action: Action)

Notify the users and groups named, signed in to Foldr now.

The recipients were looked up and then ignored: every notification went out with no user or group on it, which the stream delivers to everyone signed in to the tenant, so any script could message the whole tenant (2026-10-03). Each recipient is now its own targeted notification.

mash.bytestr(string?: mixed = "") → ByteString

No description yet.

mash.canIterate(value: mixed)

No description yet.

mash.canLoop(value: mixed)

No description yet.

mash.chr(val: mixed)

No description yet.

mash.clone(value: mixed, depth?: int = 0)

clone(x): a copy that shares nothing with x. clone is a reserved word of the language, so it is a call here and not a method. Arrays, dictionaries, collections, plain objects and dates are copied deeply (a date is mutable: e = clone(d); e.addDays(30) leaves d alone). Text and numbers are values already. Other objects (files, models, connections) are handles, not data, and are refused rather than half-copied.

mash.collect(arr?: mixed = []) → Collection

Create a collection from an array for filtering, mapping, and transforming data.

mash.color(colorOrRed: array, green?: string, blue?: string)

No description yet.

mash.count(value: mixed)

No description yet.

mash.date(args?: mixed) → Date

No description yet.

mash.dateInterval(args?: mixed)

No description yet.

mash.file(share?: Share, path?: string = "", user?: User, result?: SearchResult) → File

Access files and folders in a share by path. Returns a File, or a Folder for a folder.

mash.flush()

No description yet.

mash.formatNumber(num: mixed, decimals?: int = 0, decimal_separator?: string = ".", thousands_separator?: string = ",")

No description yet.

mash.fromBase64(data: string)

No description yet.

mash.group(data?: mixed, type?: mixed) → Group

Look up a group by name, ID, or attributes.

mash.guid()

No description yet.

mash.isIterable(value: mixed)

No description yet.

mash.lazyCollect(arr?: mixed = [])

No description yet.

mash.lock(name: string, seconds?: int = 60, wait?: float = 0) → Lock

Take a named lock, so two runs never do the same work at once (two runs of one automation calling an outside system for the same document). Returns the lock, or false at once when another run holds that name; the script decides what to do. The lock is this tenant’s only (and, for a script that runs as its author, that author’s only), and it is released by lock.release(), by the end of this run (even a failed one), or after seconds, whichever comes first. Not re-entrant: a second lock() on a name this run already holds returns false. A script this run starts (mash.scripts.run) is part of it: its lock() on a name this run holds shares this run’s lock, and its release() leaves the lock to this run.

mash.lowercase(value: mixed)

No description yet.

mash.print(value: mixed, prefix?: mixed = "", suffix?: mixed = "")

No description yet.

mash.printline(value: mixed)

No description yet.

mash.send(value: mixed)

No description yet.

mash.sendheader(key: string, value: string)

No description yet.

mash.sendline(value: mixed)

No description yet.

mash.sendstatus(code: string)

No description yet.

mash.sleep(seconds: float)

No description yet.

mash.str(string?: mixed = "") → String

Convert a value to a string of text with helper methods for manipulation.

mash.strpos(src: mixed, str: mixed)

No description yet.

mash.toBase64(data: string)

No description yet.

mash.type(value: mixed) → string

No description yet.

mash.uppercase(value: mixed)

No description yet.

mash.uri(uri?: string = "")

No description yet.

mash.user(data?: mixed, type?: mixed) → User|Collection

Look up a user by username, ID, or attributes — or, with NO arguments, the user this run is acting as: the sandbox context user for a user-authored automation, else the event’s acting user, else the signed-in user (HTTP), else the saved automation’s owner. Returns one User when you give no argument (the user the run acts as) or a dictionary of attributes. Given a username it returns a Collection of the matching users, so take the first with [0].

mash.uuid() → string

No description yet.

mash.value(value: mixed)

No description yet.

mash.xml(data?: mixed = "")

No description yet.