MaSH
mash · Core
MaSH is all about Making Stuff Happen.
Properties
Section titled “Properties”| Name | Type | Description |
|---|---|---|
actions | Actions allow user-triggerable mashlets to perform actions at the client. | |
ai | Library for making requests to AI models | |
assert | ||
barcodes | Library for generating barcodes and qr codes | |
calendar | ||
captur | ||
comms | Send messages via email or SMS | |
crypt | ||
csv | Read and write to CSV files | |
date | Create and process date objects | |
db | ||
debug | ||
fields | Tenant-wide enumeration and querying of custom fields. | |
files | ||
geo | ||
grace | Ask Grace for contextual judgement at runtime | |
graphql | ||
groups | ||
guardian | ||
hash | ||
html | ||
http | Library for making HTTP requests and processing responses | |
img | ||
ipp | ||
ixs | ||
json | ||
mail | Send messages via email | |
math | ||
money | ||
office | ||
pdf | ||
pinecone | ||
queue | ||
regex | Build and quote regular expressions | |
reviews | Ask a person to review a file, from a script | |
sas | ||
scripts | ||
search | ||
shared | Tenant-wide enumeration and lifecycle of shared items (fLinks). | |
sheet | ||
sms | Send messages via SMS | |
store | ||
string | ||
tika | ||
tmpdir | ||
transformer | ||
users | ||
validator | Validate values against rules (numeric, email, ranges, …) — chain rules then call validate(value). | |
vex | ||
xlsx | ||
xml | ||
zip |
Methods
Section titled “Methods”binToHex
Section titled “binToHex”mash.binToHex(str: string)
No description yet.
broadcast
Section titled “broadcast”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.
bytestr
Section titled “bytestr”mash.bytestr(string?: mixed = "") → ByteString
No description yet.
canIterate
Section titled “canIterate”mash.canIterate(value: mixed)
No description yet.
canLoop
Section titled “canLoop”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.
collect
Section titled “collect”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.
dateInterval
Section titled “dateInterval”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.
formatNumber
Section titled “formatNumber”mash.formatNumber(num: mixed, decimals?: int = 0, decimal_separator?: string = ".", thousands_separator?: string = ",")
No description yet.
fromBase64
Section titled “fromBase64”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.
isIterable
Section titled “isIterable”mash.isIterable(value: mixed)
No description yet.
lazyCollect
Section titled “lazyCollect”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.
lowercase
Section titled “lowercase”mash.lowercase(value: mixed)
No description yet.
mash.print(value: mixed, prefix?: mixed = "", suffix?: mixed = "")
No description yet.
printline
Section titled “printline”mash.printline(value: mixed)
No description yet.
mash.send(value: mixed)
No description yet.
sendheader
Section titled “sendheader”mash.sendheader(key: string, value: string)
No description yet.
sendline
Section titled “sendline”mash.sendline(value: mixed)
No description yet.
sendstatus
Section titled “sendstatus”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.
strpos
Section titled “strpos”mash.strpos(src: mixed, str: mixed)
No description yet.
toBase64
Section titled “toBase64”mash.toBase64(data: string)
No description yet.
mash.type(value: mixed) → string
No description yet.
uppercase
Section titled “uppercase”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.