Skip to content
falang.ioRU

Files

A File is a small reference value — id, name, size, mime, and an optional publicUrl — never the bytes themselves. The bytes live in the platform’s own object storage; a scenario only ever passes the reference around between nodes, the same way it passes a number or a string. This keeps file handling out of a scenario’s own execution history, which has to stay small — a 50 MB attachment would never fit there as a value, but its File reference does.

  • Telegram media. A photo, document, voice message, audio or video attached to an incoming message is resolved into a File automatically, before the scenario even starts — message.photo, message.document, message.voice, message.audio and message.video are already File values (or absent, if the message carries none of that kind). No extra node is needed to “download” them.

  • “Download file” action. Fetches any URL and stores the response as a File — the one place a plain link turns into a file your scenario can act on.

  • “Call AI (image)” action. Asks an OpenAI-compatible model to generate an image from a text prompt and returns it as a File.

  • An HTTP request configured to return a file. The “HTTP request” node has a “response as” setting; set to “file”, the response body is stored as a File instead of being parsed as text or JSON — useful for downloading a binary payload (a PDF, an image, an archive) from any API. The same setting lets the request’s own body be a File, for uploading one to an API that expects raw bytes.

  • Manual upload. The project’s Files tab (see below) lets you upload a file by hand — handy for giving a scenario something to process during testing, without waiting for a real trigger.

  • “Create file from text” action. Turns a string your scenario built (a CSV, a JSON document, a rendered HTML page) into a File, so it can be sent on or downloaded like anything else.

  • Read it as text — the “Read file as text” action loads a file’s contents into a string variable, refusing files over a configurable size (workflow state has to stay small; large files are for streaming between nodes, not for holding in a variable).

  • Send it to Telegram — “Send file” delivers a File to a chat as a photo, document, video, audio or voice message (auto-detected from its type, or chosen explicitly).

  • Attach it to an AI request — “Call AI”/“AI Choice” accept a list of File attachments (images and, where the model supports it, documents), so the model can see what was sent along with the prompt.

  • Transcribe it — “Call AI (transcribe)” turns an audio File (e.g. a Telegram voice message) into text.

  • Delete it, or re-look it up by id (“File info”) if you only kept its id somewhere (a database row, per the database integrations) rather than the full reference.

A File is internal-only by default — reachable only from inside your own scenarios and from the project’s Files tab, never from a bare URL anyone could guess or share. The “Publish file” action turns on a public, unauthenticated link (a long, unguessable token, not the file’s own id) that anyone with the link can open; “Unpublish file” turns it back off without deleting the file itself. Deleting the file revokes any link immediately. This is deliberately separate from sending a file to Telegram or attaching it to an AI request — both of those work without ever publishing anything, since the file’s bytes are delivered directly rather than through a link a third party has to fetch.

Every file counts against two limits: a maximum size for one file, and a maximum total size for a project’s files taken together — uploading past either is rejected. Files also expire automatically unless a scenario explicitly asked for them not to: a file created by a run on the dev stand is removed after a day by default, a file Telegram delivered into a chat after a week, and a file created by a published (production) run never expires on its own. These defaults can be changed per user by an administrator (see Administration), so a deployment can raise or lower them for a specific account without changing the defaults for everyone else.

Every project has a Files tab (next to Runs) listing everything a scenario — or a manual upload — has put into storage: name, size, type, who created it, when it expires, and whether it’s published. From there you can download, delete, upload a new file, or toggle a file’s public link, and see how much of the project’s quota is currently used.