Add a field to an upstream result
UseFN.merge to combine an upstream result with new fields. Later objects in the list win on key conflicts:
Join a list of IDs to table rows
Look up one row per ID withfor_each:
for_each returns one result per item, in input order. Build an ID-to-row mapping with FN.zip_map:
[*], then read an entry by key:
Dates and time windows
Current time as an ISO string. Pass"seconds" to drop microseconds:
format_datetime takes a strftime pattern, to_datetime accepts ISO strings and epoch seconds, and set_timezone takes an IANA name:
Filter a list and count matches
A JSONPath filter returns the matching items as a list. When nothing matches it returns an empty list, neverNone:
FN.length, and take a single value with FN.at:
FN.at indexes into a filter result; appending [0] to the path indexes into each matched value instead. See Common mistakes.
Rejoin mutually exclusive branches
Whenrun_if sends a workflow down one of two branches, rejoin them with join_strategy: any on the downstream action. With the default all, a join with one skipped branch and one that ran is unreachable and the run fails:
null; || reads whichever branch ran.
Insert rows without duplicates
Give the table a unique index, then insert withupsert: true:
Apply a function to every item
EveryFN function has a .map variant that applies it to each item in a list:
${{ FN.prefix.map(TRIGGER.tags, "tag-") }} prefixes every tag. Two lists of unequal length silently truncate to the shorter one: ${{ FN.add.map([1, 2, 3], [10, 20]) }} returns [11, 22].
core.transform.map applies a python_lambda to each item:
Related pages
- See Common mistakes for the expression errors these recipes avoid.
- See JSONPath for the full filter syntax used in the list recipes.
- See Functions for the complete
FNfunction reference. - See Python script for the
core.script.run_pythoncontract, dependencies, and SDK access. - See Tables for table schemas, column types, and search behavior behind the deduplication recipe.