[{"data":1,"prerenderedAt":359,"buildId":360},["ShallowReactive",2],{"\u002Fautomations":3,"\u002Fautomations-surround":289,"navigation":299},{"id":4,"title":5,"body":6,"description":279,"extension":280,"meta":281,"navigation":282,"path":285,"seo":286,"stem":287,"__hash__":288},"docs\u002F2.automations\u002F01.index.md","How automations work",{"type":7,"value":8,"toc":268},"minimark",[9,18,25,30,33,57,61,136,143,147,158,185,191,195,198,214,217,221,247,251],[10,11,12,13,17],"p",{},"An automation is a ",[14,15,16],"strong",{},"workflow",": a trigger followed by steps. The trigger decides when the workflow runs and what it starts with. Each step does one thing, such as resizing an image, adding a tag or saving a file, and passes its results on to later steps.",[10,19,20,21,24],{},"You'll find automations under ",[14,22,23],{},"Automations"," in the sidebar. Every user can create workflows for their own files, and a workflow always acts as the person who owns it.",[26,27,29],"h2",{"id":28},"two-kinds-of-workflow","Two kinds of workflow",[10,31,32],{},"When you create a workflow you choose its kind. It can't be changed later.",[34,35,36,45],"card-group",{},[37,38,42],"card",{"icon":39,"title":40,"to":41},"i-lucide-library","Library workflow","\u002Fautomations\u002Ffirst-workflow",[10,43,44],{},"Runs on files that are already in your library: when a file is uploaded, when a tag is added, or when you start it yourself from Files. Use it to rename, tag, move, share or trash files.",[37,46,50],{"icon":47,"title":48,"to":49},"i-lucide-inbox","Upload intake","\u002Fautomations\u002Fintake",[10,51,52,53,56],{},"Runs on an upload ",[14,54,55],{},"before"," it's saved. Steps can strip metadata, crop, resize, convert or compress the image, then a Save file step puts the result in your library. If the run fails, the upload goes to a private quarantine instead.",[26,58,60],{"id":59},"the-parts-of-a-workflow","The parts of a workflow",[62,63,64,77],"table",{},[65,66,67],"thead",{},[68,69,70,74],"tr",{},[71,72,73],"th",{},"Part",[71,75,76],{},"What it is",[78,79,80,98,106,114,128],"tbody",{},[68,81,82,86],{},[83,84,85],"td",{},"Trigger",[83,87,88,89,93,94,97],{},"The first step. It decides which events start a run, such as ",[90,91,92],"em",{},"File uploaded"," or ",[90,95,96],{},"File received",", and can filter by file type, folder, tag or token.",[68,99,100,103],{},[83,101,102],{},"Step",[83,104,105],{},"One use of a step type, with its own settings. Steps are joined by connections.",[68,107,108,111],{},[83,109,110],{},"Connection",[83,112,113],{},"A line from one step's output to the next step. A step with branches, like Condition, has one output per branch.",[68,115,116,119],{},[83,117,118],{},"Value",[83,120,121,122,127],{},"A setting can be a fixed value, a value from an earlier step, or text with values in it. See ",[123,124,126],"a",{"href":125},"\u002Fautomations\u002Fvalues","Values and templates",".",[68,129,130,133],{},[83,131,132],{},"Run",[83,134,135],{},"One execution of the workflow for one file. Each run has a step-by-step history.",[10,137,138,139,127],{},"A workflow is a graph, not just a list: a Condition step can send files down different branches, and branches can join again later. See ",[123,140,142],{"href":141},"\u002Fautomations\u002Fbranching","Conditions and branching",[26,144,146],{"id":145},"drafts-publishing-and-the-active-switch","Drafts, publishing and the Active switch",[10,148,149,150,153,154,127],{},"Each workflow has one ",[14,151,152],{},"draft",", which the editor saves as you work. A draft can be incomplete or have problems, and it never runs on its own except when you ",[123,155,157],{"href":156},"\u002Fautomations\u002Ftesting","test it",[159,160,161,168,174],"ol",{},[162,163,164,167],"li",{},[14,165,166],{},"Publish"," checks the draft and saves it as a new numbered version. Publishing is refused while the Problems list shows errors.",[162,169,170,173],{},[14,171,172],{},"Active"," (the switch at the top of the editor) turns the workflow on. An active workflow always runs its latest published version.",[162,175,176,177,180,181,184],{},"Changing the draft after publishing shows ",[90,178,179],{},"Unpublished changes",". Runs keep using the published version until you publish again. ",[14,182,183],{},"Discard changes"," in the editor's more-actions menu resets the draft to the published version.",[186,187,188],"note",{},[10,189,190],{},"A run always finishes on the version it started with. Publishing a new version doesn't change runs that are already going.",[26,192,194],{"id":193},"what-a-run-does","What a run does",[10,196,197],{},"Each step runs as its own background job. That means:",[199,200,201,204,207],"ul",{},[162,202,203],{},"A step that fails retries on its own (up to 3 attempts for most steps) without repeating the steps before it.",[162,205,206],{},"A slow or broken step never blocks uploads or the rest of the server.",[162,208,209,210,213],{},"Every run keeps a history you can open from the workflow's ",[14,211,212],{},"Runs"," tab: which steps ran, which branch each condition took, what each step produced and how long it took.",[10,215,216],{},"Steps that change your library are safe to repeat. If the server restarts in the middle of a run, the run picks up where it left off and a step that already saved a file or created a link doesn't do it twice.",[26,218,220],{"id":219},"safety-rails","Safety rails",[199,222,223,229,235,241],{},[162,224,225,228],{},[14,226,227],{},"No code."," Workflows never run scripts or expressions. Values are fixed values, references to earlier steps, or text templates with simple filters.",[162,230,231,234],{},[14,232,233],{},"No loops."," A workflow never starts itself again, directly or through other workflows, and chains of workflows starting each other stop after 3 levels.",[162,236,237,240],{},[14,238,239],{},"Your originals stay intact."," A saved file's content is never changed in place. Content steps make new working copies, and only Save file stores one in your library.",[162,242,243,246],{},[14,244,245],{},"Unprocessed uploads aren't served."," In an intake workflow, the upload's links show a processing page until the workflow saves it. If it never does, the links stay unavailable and the upload goes to quarantine.",[26,248,250],{"id":249},"where-to-go-next","Where to go next",[34,252,253,260],{},[37,254,257],{"icon":255,"title":256,"to":41},"i-lucide-rocket","Your first workflow",[10,258,259],{},"Build a library workflow that renames and tags large images.",[37,261,265],{"icon":262,"title":263,"to":264},"i-lucide-file-image","Compress and resize uploads","\u002Fautomations\u002Fguides\u002Fcompress-uploads",[10,266,267],{},"Build an intake workflow that shrinks screenshots before saving them.",{"title":269,"searchDepth":270,"depth":271,"links":272},"",2,3,[273,274,275,276,277,278],{"id":28,"depth":270,"text":29},{"id":59,"depth":270,"text":60},{"id":145,"depth":270,"text":146},{"id":193,"depth":270,"text":194},{"id":219,"depth":270,"text":220},{"id":249,"depth":270,"text":250},"Workflows, triggers and steps, the two kinds of workflow, and how a draft becomes something that runs.","md",{},{"title":283,"icon":284},"Overview","i-lucide-workflow","\u002Fautomations",{"title":5,"description":279},"2.automations\u002F01.index","kq7iyD71rAG8Z-82iF5LtrMKRSgmjVKJ5eRW7axRXqM",[290,296],{"title":291,"path":292,"stem":293,"description":294,"icon":295,"children":-1},"Introduction","\u002Fgetting-started","1.getting-started\u002F1.index","What Tessra is and where to find what you need.","i-lucide-house",{"title":256,"path":41,"stem":297,"description":298,"icon":255,"children":-1},"2.automations\u002F02.first-workflow","Build a library workflow that tags large images and files everything else away, then run it from Files.",[300,305],{"title":301,"path":292,"stem":293,"children":302,"icon":304},"Getting started",[303],{"title":291,"path":292,"stem":293,"icon":295},false,{"title":23,"path":285,"stem":287,"children":306,"icon":304},[307,308,309,314,317,320,324,326,331,336,344],{"title":283,"path":285,"stem":287,"icon":284},{"title":256,"path":41,"stem":297,"icon":255},{"title":310,"path":311,"stem":312,"icon":313},"The editor","\u002Fautomations\u002Feditor","2.automations\u002F03.editor","i-lucide-mouse-pointer-2",{"title":126,"path":125,"stem":315,"icon":316},"2.automations\u002F04.values","i-lucide-braces",{"title":142,"path":141,"stem":318,"icon":319},"2.automations\u002F05.branching","i-lucide-split",{"title":321,"path":156,"stem":322,"icon":323},"Testing","2.automations\u002F06.testing","i-lucide-flask-conical",{"title":48,"path":49,"stem":325,"icon":47},"2.automations\u002F07.intake",{"title":327,"path":328,"stem":329,"icon":330},"Quarantine and failures","\u002Fautomations\u002Fquarantine","2.automations\u002F08.quarantine","i-lucide-shield-alert",{"title":332,"path":333,"stem":334,"icon":335},"Runs and history","\u002Fautomations\u002Fruns","2.automations\u002F09.runs","i-lucide-history",{"title":337,"icon":338,"path":339,"stem":340,"children":341,"page":304},"Guides","i-lucide-book-open","\u002Fautomations\u002Fguides","2.automations\u002F10.guides",[342],{"title":263,"path":264,"stem":343,"icon":262},"2.automations\u002F10.guides\u002F1.compress-uploads",{"title":345,"icon":39,"path":346,"stem":347,"children":348,"page":304},"Reference","\u002Fautomations\u002Freference","2.automations\u002F11.reference",[349,354],{"title":350,"path":351,"stem":352,"icon":353},"Step reference","\u002Fautomations\u002Freference\u002Fsteps","2.automations\u002F11.reference\u002F1.steps","i-lucide-blocks",{"title":355,"path":356,"stem":357,"icon":358},"Limits and errors","\u002Fautomations\u002Freference\u002Flimits","2.automations\u002F11.reference\u002F2.limits","i-lucide-gauge",1796146074617,"7701d6d7-f1dc-48af-abe7-a8319dcc587e"]