[{"data":1,"prerenderedAt":652,"buildId":653},["ShallowReactive",2],{"\u002Fautomations\u002Ffirst-workflow":3,"\u002Fautomations\u002Ffirst-workflow-surround":370,"navigation":381},{"id":4,"title":5,"body":6,"description":362,"extension":363,"meta":364,"navigation":365,"path":366,"seo":367,"stem":368,"__hash__":369},"docs\u002F3.automations\u002F02.first-workflow.md","Your first workflow",{"type":7,"value":8,"toc":347},"minimark",[9,28,32,35,47,295,300,311,315,330],[10,11,12,13,17,18,22,23,27],"p",{},"This walkthrough builds a small ",[14,15,16],"strong",{},"library workflow"," that you start by hand. For each file you run it on, it checks the width: images wider than 1920 pixels get a ",[19,20,21],"code",{},"large"," tag, and everything else moves to a folder called ",[24,25,26],"em",{},"Other",".",[29,30],"workflow-diagram",{":steps":31},"[{\"name\":\"Run manually\",\"trigger\":true},{\"name\":\"Condition\",\"summary\":\"Width is greater than 1920\",\"icon\":\"i-lucide-split\",\"branches\":[{\"label\":\"True\",\"steps\":[{\"name\":\"Add tags\",\"summary\":\"large\",\"icon\":\"i-lucide-tag\"}]},{\"label\":\"False\",\"steps\":[{\"name\":\"Move to folder\",\"summary\":\"Other\",\"icon\":\"i-lucide-folder-input\"}]}]}]",[10,33,34],{},"It takes a few minutes and touches every part of the editor you'll use later: the step picker, settings, values from earlier steps, branches, testing and publishing.",[36,37,38],"tip",{},[10,39,40,41,46],{},"Want to process uploads as they arrive instead? Start with ",[42,43,45],"a",{"href":44},"\u002Fguides\u002Fcompress-uploads","Compress and resize uploads",", which builds an intake workflow.",[48,49,51,56,82,85,89,111,114,118,129,164,167,171,195,206,210,238,244,248,255,262,266,276,280],"steps",{"level":50},"3",[52,53,55],"h3",{"id":54},"create-the-workflow","Create the workflow",[10,57,58,59,62,63,66,67,70,71,74,75,78,79,27],{},"Open ",[14,60,61],{},"Automations"," and click ",[14,64,65],{},"New workflow",". Give it a name such as ",[24,68,69],{},"Sort by size",", keep the kind as ",[14,72,73],{},"Library workflow",", and choose ",[14,76,77],{},"Run manually"," as the trigger. Click ",[14,80,81],{},"Create",[10,83,84],{},"The editor opens with a single step, the trigger.",[52,86,88],{"id":87},"add-a-condition","Add a Condition",[10,90,91,92,95,96,99,100,103,104,107,108,27],{},"Select the trigger and click the ",[14,93,94],{},"+"," beside it (or ",[14,97,98],{},"Add step"," in the toolbar). In the step picker, type ",[24,101,102],{},"condition"," (or open ",[14,105,106],{},"Logic"," in the full browser) and choose ",[14,109,110],{},"Condition",[10,112,113],{},"The new step appears to the right of the trigger and its settings open in the panel on the right.",[52,115,117],{"id":116},"set-the-rule","Set the rule",[10,119,120,121,124,125,128],{},"A Condition continues on ",[14,122,123],{},"True"," when its rules match, and on ",[14,126,127],{},"False"," otherwise. Set up one rule:",[130,131,132,147,156],"ul",{},[133,134,135,138,139,142,143,146],"li",{},[14,136,137],{},"Value",": switch the field to ",[14,140,141],{},"From a step",", then pick ",[14,144,145],{},"Current file › Width",". This is the width of the file the run is about.",[133,148,149,152,153,27],{},[14,150,151],{},"Operator",": ",[24,154,155],{},"is greater than",[133,157,158,152,161,27],{},[14,159,160],{},"Compare with",[19,162,163],{},"1920",[10,165,166],{},"The step on the canvas now summarizes the rule.",[52,168,170],{"id":169},"tag-the-large-images","Tag the large images",[10,172,173,174,176,177,179,180,183,184,187,188,191,192,194],{},"Select the Condition and click the ",[14,175,94],{}," next to its ",[14,178,123],{}," output. Choose ",[14,181,182],{},"Add tags"," from the ",[14,185,186],{},"Organize"," group, and under ",[14,189,190],{},"Tag names"," enter ",[19,193,21],{},". A tag with a name that doesn't exist yet is created the first time the step runs.",[10,196,197,198,201,202,205],{},"The step's ",[14,199,200],{},"File"," setting (under ",[14,203,204],{},"Advanced",") is already the run's file, which is what you want.",[52,207,209],{"id":208},"move-everything-else","Move everything else",[10,211,212,213,215,216,218,219,222,223,226,227,230,231,233,234,237],{},"Click the ",[14,214,94],{}," next to the Condition's ",[14,217,127],{}," output and choose ",[14,220,221],{},"Move to folder",". Pick a folder, or leave ",[14,224,225],{},"Folder"," empty for ",[24,228,229],{},"All files"," and type ",[19,232,26],{}," in ",[14,235,236],{},"Subfolders"," to create the folder inside it.",[10,239,240,241,243],{},"Files that aren't images have no width, so the rule doesn't match and they take the ",[14,242,127],{}," branch too.",[52,245,247],{"id":246},"test-it","Test it",[10,249,250,251,254],{},"Click ",[14,252,253],{},"Test"," at the top of the editor and choose a file. The test runs your draft on that file and shows each step's result on the canvas: which branch the Condition took, and what the tag or move step would have done.",[10,256,257,258,27],{},"Nothing in your library changes during a test. See ",[42,259,261],{"href":260},"\u002Fautomations\u002Ftesting","Testing",[52,263,265],{"id":264},"publish-and-turn-it-on","Publish and turn it on",[10,267,250,268,271,272,275],{},[14,269,270],{},"Publish",", then turn on the ",[14,273,274],{},"Active"," switch. Manual workflows only show up in Files once they're published and active.",[52,277,279],{"id":278},"run-it-from-files","Run it from Files",[10,281,282,283,286,287,290,291,294],{},"In ",[14,284,285],{},"Files",", select one or more files, open ",[14,288,289],{},"More actions"," and choose ",[14,292,293],{},"Run automation › Sort by size",". A toast confirms how many runs started, with a link to the runs.",[296,297,299],"h2",{"id":298},"what-happened","What happened",[10,301,302,303,306,307,310],{},"Open the workflow's ",[14,304,305],{},"Runs"," tab to see one run per file. Each run shows which steps ran, which were skipped, and the values every step produced. On a wide image, the Move to folder step shows as ",[24,308,309],{},"Skipped"," because the run went down the True branch.",[296,312,314],{"id":313},"make-it-run-automatically","Make it run automatically",[10,316,317,318,321,322,325,326,329],{},"To run the same steps on every new upload instead of by hand, change the trigger: select it and click the ",[14,319,320],{},"Change trigger"," button in its settings (or right-click it on the canvas), then pick ",[14,323,324],{},"File uploaded",". You can limit it to some file types (for example ",[19,327,328],{},"image\u002F*",") or one folder. Publish again to apply the change.",[331,332,333],"note",{},[10,334,335,337,338,341,342,346],{},[24,336,324],{}," runs right after a file is saved, which can be before its thumbnail and dimensions are worked out. If a rule depends on width or height, test it on a fresh upload first. To change uploads ",[14,339,340],{},"before"," they're saved, use an ",[42,343,345],{"href":344},"\u002Fautomations\u002Fintake","intake workflow"," instead.",{"title":348,"searchDepth":349,"depth":350,"links":351},"",2,3,[352,353,354,355,356,357,358,359,360,361],{"id":54,"depth":350,"text":55},{"id":87,"depth":350,"text":88},{"id":116,"depth":350,"text":117},{"id":169,"depth":350,"text":170},{"id":208,"depth":350,"text":209},{"id":246,"depth":350,"text":247},{"id":264,"depth":350,"text":265},{"id":278,"depth":350,"text":279},{"id":298,"depth":349,"text":299},{"id":313,"depth":349,"text":314},"Build a library workflow that tags large images and files everything else away, then run it from Files.","md",{},true,"\u002Fautomations\u002Ffirst-workflow",{"title":5,"description":362},"3.automations\u002F02.first-workflow","NWskNm7AV7PHQsGonEUrTOmZP-ShKppoXBmehFjxKnA",[371,376],{"title":372,"path":373,"stem":374,"description":375,"children":-1},"Overview","\u002Fautomations","3.automations\u002F01.index","Workflows, triggers and steps, the two kinds of workflow, and how a draft becomes something that runs.",{"title":377,"path":378,"stem":379,"description":380,"children":-1},"The editor","\u002Fautomations\u002Feditor","3.automations\u002F03.editor","The canvas, the outline, the step browser and quick picker, step settings, creating connections from a step, the Problems list and workflow settings.",[382,402,441,472,483,502,513,556,590,604,620],{"title":383,"path":384,"stem":385,"children":386,"icon":401},"Getting started","\u002Fgetting-started","1.getting-started\u002F1.index",[387,389,393,397],{"title":388,"path":384,"stem":385},"Introduction",{"title":390,"path":391,"stem":392},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation",{"title":394,"path":395,"stem":396},"Configure ShareX","\u002Fgetting-started\u002Fsharex","1.getting-started\u002F3.sharex",{"title":398,"path":399,"stem":400},"Updating Tessra","\u002Fgetting-started\u002Fupdating","1.getting-started\u002F4.updating","i-lucide-rocket",{"title":403,"icon":404,"path":405,"stem":406,"children":407,"page":440},"Library","i-lucide-folder","\u002Flibrary","2.library",[408,412,416,420,424,428,432,436],{"title":409,"path":410,"stem":411},"Uploading files","\u002Flibrary\u002Fuploading","2.library\u002F1.uploading",{"title":413,"path":414,"stem":415},"Files and folders","\u002Flibrary\u002Ffiles-and-folders","2.library\u002F2.files-and-folders",{"title":417,"path":418,"stem":419},"Sharing files","\u002Flibrary\u002Fsharing","2.library\u002F3.sharing",{"title":421,"path":422,"stem":423},"Tags","\u002Flibrary\u002Ftags","2.library\u002F4.tags",{"title":425,"path":426,"stem":427},"Fields","\u002Flibrary\u002Ffields","2.library\u002F5.fields",{"title":429,"path":430,"stem":431},"Attachments","\u002Flibrary\u002Fattachments","2.library\u002F6.attachments",{"title":433,"path":434,"stem":435},"Search","\u002Flibrary\u002Fsearch","2.library\u002F7.search",{"title":437,"path":438,"stem":439},"Trash and recovery","\u002Flibrary\u002Ftrash","2.library\u002F8.trash",false,{"title":61,"path":373,"stem":374,"children":442,"icon":471},[443,444,445,446,450,454,457,459,463,467],{"title":372,"path":373,"stem":374},{"title":5,"path":366,"stem":368},{"title":377,"path":378,"stem":379},{"title":447,"path":448,"stem":449},"Values and templates","\u002Fautomations\u002Fvalues","3.automations\u002F04.values",{"title":451,"path":452,"stem":453},"Conditions and branching","\u002Fautomations\u002Fbranching","3.automations\u002F05.branching",{"title":455,"path":344,"stem":456},"Upload intake","3.automations\u002F06.intake",{"title":261,"path":260,"stem":458},"3.automations\u002F07.testing",{"title":460,"path":461,"stem":462},"Runs and history","\u002Fautomations\u002Fruns","3.automations\u002F08.runs",{"title":464,"path":465,"stem":466},"Quarantine and failures","\u002Fautomations\u002Fquarantine","3.automations\u002F09.quarantine",{"title":468,"path":469,"stem":470},"Workflow templates","\u002Fautomations\u002Ftemplates","3.automations\u002F10.templates","i-lucide-workflow",{"title":473,"path":474,"stem":475,"children":476,"icon":482},"Connections","\u002Fconnections","4.connections\u002F1.index",[477,478],{"title":372,"path":474,"stem":475},{"title":479,"path":480,"stem":481},"AI providers","\u002Fconnections\u002Fai-providers","4.connections\u002F2.ai-providers","i-lucide-plug",{"title":484,"path":485,"stem":486,"children":487,"icon":501},"AI","\u002Fai","5.ai\u002F1.index",[488,489,493,497],{"title":372,"path":485,"stem":486},{"title":490,"path":491,"stem":492},"AI classify and extract","\u002Fai\u002Fclassify-and-extract","5.ai\u002F2.classify-and-extract",{"title":494,"path":495,"stem":496},"AI describe, summarize and write","\u002Fai\u002Fdescribe-and-write","5.ai\u002F3.describe-and-write",{"title":498,"path":499,"stem":500},"AI detect and suggest tags","\u002Fai\u002Fdetect-and-tag","5.ai\u002F4.detect-and-tag","i-lucide-sparkles",{"title":503,"path":504,"stem":505,"children":506,"icon":512},"OCR","\u002Focr","5.ocr\u002F1.index",[507,508],{"title":372,"path":504,"stem":505},{"title":509,"path":510,"stem":511},"Setup","\u002Focr\u002Fsetup","5.ocr\u002F2.setup","i-lucide-scan-text",{"title":514,"path":515,"stem":516,"children":517,"icon":555},"Self-hosting","\u002Fself-hosting","6.self-hosting\u002F1.index",[518,519,523,527,531,535,539,543,547,551],{"title":372,"path":515,"stem":516},{"title":520,"path":521,"stem":522},"Troubleshooting","\u002Fself-hosting\u002Ftroubleshooting","6.self-hosting\u002F10.troubleshooting",{"title":524,"path":525,"stem":526},"Configuration","\u002Fself-hosting\u002Fconfiguration","6.self-hosting\u002F2.configuration",{"title":528,"path":529,"stem":530},"Reverse proxies and HTTPS","\u002Fself-hosting\u002Freverse-proxy","6.self-hosting\u002F3.reverse-proxy",{"title":532,"path":533,"stem":534},"DigitalOcean","\u002Fself-hosting\u002Fdigitalocean","6.self-hosting\u002F4.digitalocean",{"title":536,"path":537,"stem":538},"Backups and restoration","\u002Fself-hosting\u002Fbackups","6.self-hosting\u002F5.backups",{"title":540,"path":541,"stem":542},"Users and roles","\u002Fself-hosting\u002Fusers","6.self-hosting\u002F6.users",{"title":544,"path":545,"stem":546},"Single sign-on","\u002Fself-hosting\u002Fsingle-sign-on","6.self-hosting\u002F7.single-sign-on",{"title":548,"path":549,"stem":550},"Two-factor and passkeys","\u002Fself-hosting\u002Ftwo-factor-and-passkeys","6.self-hosting\u002F8.two-factor-and-passkeys",{"title":552,"path":553,"stem":554},"Importing","\u002Fself-hosting\u002Fimporting","6.self-hosting\u002F9.importing","i-lucide-server",{"title":557,"path":558,"stem":559,"children":560,"icon":589},"Guides","\u002Fguides","7.guides\u002F1.index",[561,562,565,569,573,577,581,585],{"title":372,"path":558,"stem":559},{"title":563,"path":44,"stem":564},"Optimize ShareX uploads","7.guides\u002F2.compress-uploads",{"title":566,"path":567,"stem":568},"Send Discord notifications","\u002Fguides\u002Fdiscord-notifications","7.guides\u002F3.discord-notifications",{"title":570,"path":571,"stem":572},"Organize screenshots with AI","\u002Fguides\u002Fcategorize-screenshots","7.guides\u002F4.categorize-screenshots",{"title":574,"path":575,"stem":576},"Extract receipts with AI","\u002Fguides\u002Fextract-receipts","7.guides\u002F5.extract-receipts",{"title":578,"path":579,"stem":580},"Name screenshots with AI","\u002Fguides\u002Fai-file-names","7.guides\u002F6.ai-file-names",{"title":582,"path":583,"stem":584},"Run AI locally with Ollama","\u002Fguides\u002Flocal-ai-ollama","7.guides\u002F7.local-ai-ollama",{"title":586,"path":587,"stem":588},"Make screenshots searchable","\u002Fguides\u002Fsearchable-screenshots","7.guides\u002F8.searchable-screenshots","i-lucide-book-open",{"title":591,"icon":592,"path":593,"stem":594,"children":595,"page":440},"Reference","i-lucide-library","\u002Freference","8.reference",[596,600],{"title":597,"path":598,"stem":599},"Step reference","\u002Freference\u002Fsteps","8.reference\u002F1.steps",{"title":601,"path":602,"stem":603},"Limits and errors","\u002Freference\u002Flimits","8.reference\u002F2.limits",{"title":605,"path":606,"stem":607,"children":608,"icon":619},"Development","\u002Fdevelopment","9.development\u002F1.index",[609,611,615],{"title":610,"path":606,"stem":607},"Local development",{"title":612,"path":613,"stem":614},"Plugin development","\u002Fdevelopment\u002Fplugins","9.development\u002F2.plugins",{"title":616,"path":617,"stem":618},"Writing documentation","\u002Fdevelopment\u002Fdocumentation","9.development\u002F3.documentation","i-lucide-code",{"title":621,"path":622,"stem":623,"children":624,"icon":651},"Comparisons","\u002Fcomparisons","99.comparisons\u002F1.index",[625,627,631,635,639,643,647],{"title":626,"path":622,"stem":623},"Comparing Tessra",{"title":628,"path":629,"stem":630},"Tessra and Zipline","\u002Fcomparisons\u002Fzipline","99.comparisons\u002F2.zipline",{"title":632,"path":633,"stem":634},"Tessra and XBackBone","\u002Fcomparisons\u002Fxbackbone","99.comparisons\u002F3.xbackbone",{"title":636,"path":637,"stem":638},"Tessra and chibisafe","\u002Fcomparisons\u002Fchibisafe","99.comparisons\u002F4.chibisafe",{"title":640,"path":641,"stem":642},"Tessra and Slink","\u002Fcomparisons\u002Fslink","99.comparisons\u002F5.slink",{"title":644,"path":645,"stem":646},"Tessra and Pingvin Share","\u002Fcomparisons\u002Fpingvin-share","99.comparisons\u002F6.pingvin-share",{"title":648,"path":649,"stem":650},"Tessra and PicoShare","\u002Fcomparisons\u002Fpicoshare","99.comparisons\u002F7.picoshare","i-lucide-scale",1796301179353,"7456fe0d-763d-4d83-b714-ffd4ca3197d2"]