Code function
v4Parse invoice
Python 3.13
Input
InvoiceFile
CurrencyOne of
Output
LinesList
TotalNumber
- Retries
- Up to 3 attempts
- Limits
- 60 s, 512 MB
Function call
Run 0142
Function call
Run 0143
Function call
Run 0144
New: Introducing the Lemma MCP Server, and what we learned building it.New: Introducing the Lemma MCP Server. Read the blog post
When the next step needs more than a mapping or a single API call, write it as a function in Python or Node.js. It runs as a step of the Worker, with the libraries, browser, credentials and files the task needs, in an isolated sandbox Lemma deploys and runs for you.
When the next step needs more than a visual mapping or a single API call, write it. A function runs as a step of the Worker, with the libraries, browser, credentials and files the task needs, in an isolated sandbox Lemma deploys and runs for you.
Add your function as a step wherever the process needs logic of its own. A payroll reconciliation passes its records to Python that calculates the discrepancies, and the Worker uses the result to decide whether to open a review. Lemma deploys and runs the function, so there is no server to keep.
Declare the public PyPI packages you need and their versions. Lemma builds them before deployment, so nothing is installed each time the code runs and there is no container image of your own to maintain.
Some systems offer what you need only through a web page. The browser runtime runs Playwright with Chromium: open a vendor portal built in JavaScript, sign in with a credential the Worker supplies, find the report, download it and capture a screenshot, then return both to the Worker as files.
A function declares what it needs by name: a credential such as payroll_api, an input file such as source_report, an output file such as exceptions_file. The Worker supplies the actual credential and file. The code reads the report from a local path, returns a small JSON summary, and writes the discrepancies to a file for the next step.
Each version runs in its own container. Your code cannot be changed while it runs, it is checked before it starts, and it is stopped at its time limit; where configured, a hardened sandbox such as gVisor wraps it all. Network access follows your deployment’s policy.
Choose a runtime when you create a function: five ship today across Python 3.13 and Node.js 22, and Go is coming soon.
Standard, with pandas and NumPy; Document Processing, for PDFs, Office documents and OCR; and Your own libraries, with the PyPI packages you declare, where enabled for your account.
Standard, for JSON and async work; and Browser Automation, with Playwright and Chromium for the pages only a browser can reach. TypeScript is supported in the editor and the SDK.
Coming soon to the runtime catalog.
Every real process has a step no vendor shipped. When that step is code inside the Worker, it inherits the retries, the identity, the scope, and the record the rest of the run already has, and nothing new has to be operated to run it.
See code run inside a Worker with our team.
Request a Demo