CINXE.COM

Data Addition Trigger - LatchBio

<!DOCTYPE html><html lang="en" class="dark"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="https://mintlify.s3-us-west-1.amazonaws.com/latchbio/_generated/favicon/apple-touch-icon.png?v=3"/><link rel="icon" type="image/png" sizes="32x32" href="https://mintlify.s3-us-west-1.amazonaws.com/latchbio/_generated/favicon/favicon-32x32.png?v=3"/><link rel="icon" type="image/png" sizes="16x16" href="https://mintlify.s3-us-west-1.amazonaws.com/latchbio/_generated/favicon/favicon-16x16.png?v=3"/><link rel="shortcut icon" type="image/x-icon" href="https://mintlify.s3-us-west-1.amazonaws.com/latchbio/_generated/favicon/favicon.ico?v=3"/><meta name="msapplication-config" content="https://mintlify.s3-us-west-1.amazonaws.com/latchbio/_generated/favicon/browserconfig.xml?v=3"/><meta name="apple-mobile-web-app-title" content="LatchBio"/><meta name="application-name" content="LatchBio"/><meta name="msapplication-TileColor" content="#001AAE"/><meta name="theme-color" content="#ffffff"/><link rel="sitemap" type="application/xml" href="/sitemap.xml"/><meta name="charset" content="utf-8"/><meta name="og:type" content="website"/><meta name="og:site_name" content="LatchBio"/><meta name="twitter:card" content="summary_large_image"/><meta name="og:title" content="Data Addition Trigger - LatchBio"/><meta name="twitter:title" content="Data Addition Trigger - LatchBio"/><meta name="og:image" content="https://mintlify.com/docs/api/og?division=Documentation&amp;title=Data+Addition+Trigger&amp;logoLight=https%3A%2F%2Fmintlify.s3-us-west-1.amazonaws.com%2Flatchbio%2Flogo%2Flight.svg&amp;logoDark=https%3A%2F%2Fmintlify.s3-us-west-1.amazonaws.com%2Flatchbio%2Flogo%2Fdark.svg&amp;primaryColor=%23001AAE&amp;lightColor=%2392A2FF&amp;darkColor=%2392A2FF"/><meta name="twitter:image" content="https://mintlify.com/docs/api/og?division=Documentation&amp;title=Data+Addition+Trigger&amp;logoLight=https%3A%2F%2Fmintlify.s3-us-west-1.amazonaws.com%2Flatchbio%2Flogo%2Flight.svg&amp;logoDark=https%3A%2F%2Fmintlify.s3-us-west-1.amazonaws.com%2Flatchbio%2Flogo%2Fdark.svg&amp;primaryColor=%23001AAE&amp;lightColor=%2392A2FF&amp;darkColor=%2392A2FF"/><title>Data Addition Trigger - LatchBio</title><meta name="og:url" content="/workflows/sdk/automation/example-data-addition"/><link rel="canonical" href="/workflows/sdk/automation/example-data-addition"/><meta name="next-head-count" content="23"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.css" integrity="sha384-Xi8rHCmBmhbuyyhbI88391ZKP2dmfnOl4rT9ZfRI7mLTdk1wblIUnrIq35nqwEvC" crossorigin="anonymous"/><link rel="preload" href="/_next/static/media/a34f9d1faa5f3315-s.p.woff2" as="font" type="font/woff2" crossorigin="anonymous" data-next-font="size-adjust"/><link rel="preload" href="/_next/static/media/bb3ef058b751a6ad-s.p.woff2" as="font" type="font/woff2" crossorigin="anonymous" data-next-font="size-adjust"/><script id="mode-toggle" data-nscript="beforeInteractive"> try { if (localStorage.isDarkMode === 'true') { document.documentElement.classList.add('dark'); } else if (localStorage.isDarkMode === 'false') { document.documentElement.classList.remove('dark'); } else if ((true && !('isDarkMode' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches) || false) { document.documentElement.classList.add('dark'); } else { document.documentElement.classList.remove('dark'); } } catch (_) {} </script><link rel="preload" href="/_next/static/css/1b0bee2a213c6d45.css" as="style"/><link rel="stylesheet" href="/_next/static/css/1b0bee2a213c6d45.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-bf3c4f880e1dcd79.js" defer=""></script><script src="/_next/static/chunks/framework-d17a13b7014ce556.js" defer=""></script><script src="/_next/static/chunks/main-6f86f9a153903fae.js" defer=""></script><script src="/_next/static/chunks/pages/_app-d7664e96f6979e7c.js" defer=""></script><script src="/_next/static/chunks/2edb282b-7fa355f49eaeb230.js" defer=""></script><script src="/_next/static/chunks/e893f787-54a006ae51267903.js" defer=""></script><script src="/_next/static/chunks/086d643d-3aa1cf46914548d9.js" defer=""></script><script src="/_next/static/chunks/9097-75a5bfb192203d09.js" defer=""></script><script src="/_next/static/chunks/6430-16e004706658d885.js" defer=""></script><script src="/_next/static/chunks/2073-a80af447b2775d64.js" defer=""></script><script src="/_next/static/chunks/pages/_sites/%5Bsubdomain%5D/%5B%5B...slug%5D%5D-7d0e3c1d0f130c24.js" defer=""></script><script src="/_next/static/Een-WiNRwYtikoUb8u0AO/_buildManifest.js" defer=""></script><script src="/_next/static/Een-WiNRwYtikoUb8u0AO/_ssgManifest.js" defer=""></script><style id="__jsx-4145347147">:root{--font-inter:'__Inter_e5ab12', '__Inter_Fallback_e5ab12';--font-jetbrains-mono:'__JetBrains_Mono_3c557b', '__JetBrains_Mono_Fallback_3c557b'}</style></head><div id="__next"><main class="jsx-4145347147"><style>:root { --primary: 0 26 174; --primary-light: 146 162 255; --primary-dark: 146 162 255; --background-light: 255 255 255; --background-dark: 12 12 16; --gray-50: 241 243 249; --gray-100: 236 237 244; --gray-200: 222 225 233; --gray-300: 203 207 218; --gray-400: 151 159 175; --gray-500: 104 111 129; --gray-600: 73 83 101; --gray-700: 53 64 84; --gray-800: 30 41 59; --gray-900: 16 24 43; --gray-950: 3 8 23; }</style><div class="relative antialiased text-gray-500 dark:text-gray-400"><span class="fixed inset-0 bg-background-light dark:bg-background-dark -z-10"></span><div id="navbar" class="z-30 fixed lg:sticky top-0 w-full"><div id="navbar-transition" class="absolute w-full h-full backdrop-blur flex-none transition-colors duration-500 border-b border-gray-500/5 dark:border-gray-300/[0.06] supports-backdrop-blur:bg-background-light/60 dark:bg-transparent"></div><div class="max-w-8xl mx-auto relative"><div class=""><div class="relative"><div class="flex items-center lg:px-12 h-16 min-w-0 mx-4 lg:mx-0"><div class="h-full relative flex-1 flex items-center gap-x-4 min-w-0 border-b border-gray-500/5 dark:border-gray-300/[0.06]"><div class="flex-1 flex items-center gap-x-4"><a href="/"><span class="sr-only">LatchBio<!-- --> home page</span><img class="w-auto h-7 relative object-contain block dark:hidden" src="https://mintlify.s3-us-west-1.amazonaws.com/latchbio/logo/light.svg" alt="light logo"/><img class="w-auto h-7 relative object-contain hidden dark:block" src="https://mintlify.s3-us-west-1.amazonaws.com/latchbio/logo/dark.svg" alt="dark logo"/></a><div class="flex items-center gap-x-2"></div></div><div class="hidden lg:block mx-px relative flex-1 bg-white dark:bg-gray-900 pointer-events-auto rounded-lg min-w-0"><button type="button" class="w-full flex items-center text-sm leading-6 rounded-lg py-1.5 pl-3.5 pr-3 shadow-sm text-gray-400 dark:text-white/50 bg-background-light dark:bg-background-dark dark:brightness-[1.1] dark:ring-1 dark:hover:brightness-[1.25] ring-1 ring-gray-400/20 hover:ring-gray-600/25 dark:ring-gray-600/30 dark:hover:ring-gray-500/30 focus:outline-primary justify-between truncate gap-2 min-w-[43px]" id="search-bar-entry"><div class="flex items-center gap-3 min-w-[42px]"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-search min-w-4 flex-none text-gray-700 hover:text-gray-800 dark:text-gray-300 hover:dark:text-gray-200"><circle cx="11" cy="11" r="8"></circle><path d="m21 21-4.3-4.3"></path></svg><div class="truncate min-w-0">Search or ask...</div></div></button></div><div class="flex-1 relative hidden lg:flex items-center ml-auto justify-end space-x-4"><nav class="text-sm"><ul class="flex space-x-6 items-center"><li class="block lg:hidden"><a class="whitespace-nowrap font-medium text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" href="https://console.latch.bio/signup">Sign Up</a></li><li><a href="mailto:support@latch.bio" class="whitespace-nowrap font-medium text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" target="_blank">Contact Us</a></li><li><a href="https://console.latch.bio/" class="whitespace-nowrap font-medium text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" target="_blank">Log In</a></li><li class="whitespace-nowrap hidden lg:flex" id="topbar-cta-button"><a target="_blank" class="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium" href="https://console.latch.bio/signup"><span class="absolute inset-0 bg-primary-dark dark:bg-primary-light/10 border-primary-light/30 rounded-full dark:border group-hover:opacity-[0.9] dark:group-hover:border-primary-light/60"></span><div class="mr-0.5 space-x-2.5 flex items-center"><span class="z-10 text-white dark:text-primary-light">Sign Up</span><svg width="3" height="24" viewBox="0 -9 3 24" class="h-5 rotate-0 overflow-visible text-white/90 dark:text-primary-light"><path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg></div></a></li></ul></nav><div class="flex items-center"><button class="group p-2 flex items-center justify-center" aria-label="Toggle dark mode"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 block text-gray-400 dark:hidden group-hover:text-gray-600"><g clip-path="url(#clip0_2880_7340)"><path d="M8 1.11133V2.00022" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12.8711 3.12891L12.2427 3.75735" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M14.8889 8H14" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12.8711 12.8711L12.2427 12.2427" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M8 14.8889V14" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3.12891 12.8711L3.75735 12.2427" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M1.11133 8H2.00022" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3.12891 3.12891L3.75735 3.75735" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M8.00043 11.7782C10.0868 11.7782 11.7782 10.0868 11.7782 8.00043C11.7782 5.91402 10.0868 4.22266 8.00043 4.22266C5.91402 4.22266 4.22266 5.91402 4.22266 8.00043C4.22266 10.0868 5.91402 11.7782 8.00043 11.7782Z" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></g><defs><clipPath id="clip0_2880_7340"><rect width="16" height="16" fill="white"></rect></clipPath></defs></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-moon h-4 w-4 hidden dark:block text-gray-500 dark:group-hover:text-gray-300"><path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"></path></svg></button></div></div><div class="flex lg:hidden items-center gap-2"><button type="button" class="text-gray-500 w-8 h-8 flex items-center justify-center hover:text-gray-600 dark:text-gray-400 dark:hover:text-gray-300" id="search-bar-entry-mobile"><span class="sr-only">Search...</span><svg class="h-4 w-4 bg-gray-500 dark:bg-gray-400 hover:bg-gray-600 dark:hover:bg-gray-300" style="-webkit-mask-image:url(https://mintlify.b-cdn.net/v6.6.0/solid/magnifying-glass.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center"></svg></button><button aria-label="More actions" class="h-7 w-5 flex items-center justify-end"><svg class="h-4 w-4 bg-gray-500 dark:bg-gray-400 hover:bg-gray-600 dark:hover:bg-gray-300" style="-webkit-mask-image:url(https://mintlify.b-cdn.net/v6.6.0/solid/ellipsis-vertical.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center"></svg></button></div></div></div><div class="flex items-center h-14 py-4 px-5 lg:hidden"><button type="button" class="text-gray-500 hover:text-gray-600 dark:text-gray-400 dark:hover:text-gray-300"><span class="sr-only">Navigation</span><svg class="h-4" fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"></path></svg></button><div class="ml-4 flex text-sm leading-6 whitespace-nowrap min-w-0 space-x-3"><div class="flex items-center space-x-3"><span>Automation</span><svg width="3" height="24" viewBox="0 -9 3 24" class="h-5 rotate-0 overflow-visible fill-gray-400"><path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg></div><div class="font-semibold text-gray-900 truncate dark:text-gray-200">Data Addition Trigger</div></div></div></div><div class="hidden lg:flex px-12 h-12"><div class="h-full flex text-sm space-x-6"><a class="group relative h-full flex items-center text-gray-800 dark:text-gray-200 font-semibold" href="/start/introduction">Documentation<div class="absolute bottom-0 h-[1.5px] w-full bg-primary dark:bg-primary-light"></div></a><a href="https://docs.latch.bio/api/modules.html" target="_blank" rel="noreferrer" class="group relative h-full flex items-center font-medium text-gray-600 dark:text-gray-400 group-hover:text-gray-800 dark:group-hover:text-gray-300">API References<div class="absolute bottom-0 h-[1.5px] w-full group-hover:bg-gray-200 dark:group-hover:bg-gray-700"></div></a><a href="https://latchbio.substack.com/" target="_blank" rel="noreferrer" class="group relative h-full flex items-center font-medium text-gray-600 dark:text-gray-400 group-hover:text-gray-800 dark:group-hover:text-gray-300">Blog<div class="absolute bottom-0 h-[1.5px] w-full group-hover:bg-gray-200 dark:group-hover:bg-gray-700"></div></a><a href="https://latch.bio/" target="_blank" rel="noreferrer" class="group relative h-full flex items-center font-medium text-gray-600 dark:text-gray-400 group-hover:text-gray-800 dark:group-hover:text-gray-300">Website<div class="absolute bottom-0 h-[1.5px] w-full group-hover:bg-gray-200 dark:group-hover:bg-gray-700"></div></a><a href="https://latchbio.notion.site/LatchBio-Product-Change-Logs-ca76a6ae05a74a4daf78cb4006ad80ac" target="_blank" rel="noreferrer" class="group relative h-full flex items-center font-medium text-gray-600 dark:text-gray-400 group-hover:text-gray-800 dark:group-hover:text-gray-300">Change Log<div class="absolute bottom-0 h-[1.5px] w-full group-hover:bg-gray-200 dark:group-hover:bg-gray-700"></div></a></div></div></div></div></div><div class="px-4 mx-auto max-w-8xl lg:px-8 min-h-screen"><div class="z-20 hidden lg:block fixed bottom-0 right-auto w-[18rem] top-[7.1rem]" id="sidebar"><div class="absolute inset-0 z-10 stable-scrollbar-gutter overflow-auto pr-8 pb-10" id="sidebar-content"><div class="relative lg:text-sm lg:leading-6"><div class="sticky top-0 h-8 bg-gradient-to-b from-background-light dark:from-background-dark"></div><div id="navigation-items"><li class="list-none"><a class="pl-4 group flex items-center lg:text-sm lg:leading-6 mb-5 sm:mb-4 font-medium text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" href="/start/introduction"><div class="mr-4 rounded-md p-1 group-hover:bg-primary zinc-box group-hover:brightness-100 group-hover:ring-0 ring-1 ring-gray-950/5 dark:ring-gray-700/40"><svg class="h-4 w-4 secondary-opacity group-hover:fill-primary-dark group-hover:bg-white bg-gray-400 dark:bg-gray-500" style="-webkit-mask-image:url(https://mintlify.b-cdn.net/v6.6.0/duotone/house.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center"></svg></div>Introduction</a></li><li class="list-none"><a class="pl-4 group flex items-center lg:text-sm lg:leading-6 mb-5 sm:mb-4 font-medium text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" href="/data/overview"><div class="mr-4 rounded-md p-1 group-hover:bg-primary zinc-box group-hover:brightness-100 group-hover:ring-0 ring-1 ring-gray-950/5 dark:ring-gray-700/40"><svg class="h-4 w-4 secondary-opacity group-hover:fill-primary-dark group-hover:bg-white bg-gray-400 dark:bg-gray-500" style="-webkit-mask-image:url(https://mintlify.b-cdn.net/v6.6.0/duotone/file-chart-column.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center"></svg></div>Data</a></li><li class="list-none"><a class="pl-4 group flex items-center lg:text-sm lg:leading-6 mb-5 sm:mb-4 font-medium text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" href="/registry/what-is-a-registry"><div class="mr-4 rounded-md p-1 group-hover:bg-primary zinc-box group-hover:brightness-100 group-hover:ring-0 ring-1 ring-gray-950/5 dark:ring-gray-700/40"><svg class="h-4 w-4 secondary-opacity group-hover:fill-primary-dark group-hover:bg-white bg-gray-400 dark:bg-gray-500" style="-webkit-mask-image:url(https://mintlify.b-cdn.net/v6.6.0/duotone/table.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center"></svg></div>Registry</a></li><li class="list-none"><a class="pl-4 group flex items-center lg:text-sm lg:leading-6 mb-5 sm:mb-4 font-semibold text-primary dark:text-primary-light" href="/workflows/overview"><div class="mr-4 rounded-md p-1 group-hover:bg-primary bg-primary"><svg class="h-4 w-4 secondary-opacity group-hover:fill-primary-dark group-hover:bg-white bg-white" style="-webkit-mask-image:url(https://mintlify.b-cdn.net/v6.6.0/duotone/screwdriver-wrench.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center"></svg></div>Workflows &amp; SDK</a></li><li class="list-none"><a class="pl-4 group flex items-center lg:text-sm lg:leading-6 mb-5 sm:mb-4 font-medium text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" href="/pods/overview"><div class="mr-4 rounded-md p-1 group-hover:bg-primary zinc-box group-hover:brightness-100 group-hover:ring-0 ring-1 ring-gray-950/5 dark:ring-gray-700/40"><svg class="h-4 w-4 secondary-opacity group-hover:fill-primary-dark group-hover:bg-white bg-gray-400 dark:bg-gray-500" style="-webkit-mask-image:url(https://mintlify.b-cdn.net/v6.6.0/duotone/hexagon.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center"></svg></div>Pods</a></li><li class="list-none"><a class="pl-4 group flex items-center lg:text-sm lg:leading-6 mb-5 sm:mb-4 font-medium text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" href="/plots/overview"><div class="mr-4 rounded-md p-1 group-hover:bg-primary zinc-box group-hover:brightness-100 group-hover:ring-0 ring-1 ring-gray-950/5 dark:ring-gray-700/40"><svg class="h-4 w-4 secondary-opacity group-hover:fill-primary-dark group-hover:bg-white bg-gray-400 dark:bg-gray-500" style="-webkit-mask-image:url(https://mintlify.b-cdn.net/v6.6.0/duotone/chart-scatter-bubble.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center"></svg></div>Plots</a></li><li class="list-none"><a class="pl-4 group flex items-center lg:text-sm lg:leading-6 mb-5 sm:mb-4 font-medium text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" href="/admin/overview"><div class="mr-4 rounded-md p-1 group-hover:bg-primary zinc-box group-hover:brightness-100 group-hover:ring-0 ring-1 ring-gray-950/5 dark:ring-gray-700/40"><svg class="h-4 w-4 secondary-opacity group-hover:fill-primary-dark group-hover:bg-white bg-gray-400 dark:bg-gray-500" style="-webkit-mask-image:url(https://mintlify.b-cdn.net/v6.6.0/duotone/screen-users.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center"></svg></div>Administration</a></li><li class="list-none"><a class="pl-4 group flex items-center lg:text-sm lg:leading-6 mb-5 sm:mb-4 font-medium text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" href="/resources/faq"><div class="mr-4 rounded-md p-1 group-hover:bg-primary zinc-box group-hover:brightness-100 group-hover:ring-0 ring-1 ring-gray-950/5 dark:ring-gray-700/40"><svg class="h-4 w-4 secondary-opacity group-hover:fill-primary-dark group-hover:bg-white bg-gray-400 dark:bg-gray-500" style="-webkit-mask-image:url(https://mintlify.b-cdn.net/v6.6.0/duotone/clipboard-question.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center"></svg></div>Resources</a></li><div class="mt-12 lg:mt-8"><h5 class="pl-4 mb-3.5 lg:mb-2.5 font-semibold text-gray-900 dark:text-gray-200">Overview</h5><ul><li id="/workflows/overview" class="scroll-m-4 first:scroll-m-20"><a class="group mt-2 lg:mt-0 flex items-center pr-3 py-1.5 cursor-pointer focus:outline-primary dark:focus:outline-primary-light space-x-3 rounded-lg hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/workflows/overview"><svg class="h-4 w-4 bg-gray-400 dark:bg-gray-500" style="-webkit-mask-image:url(https://mintlify.b-cdn.net/v6.6.0/solid/magnifying-glass.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center"></svg><div class="flex-1 flex items-center space-x-2.5"><div>Workflows &amp; SDK</div></div></a></li></ul></div><div class="mt-12 lg:mt-8"><h5 class="pl-4 mb-3.5 lg:mb-2.5 font-semibold text-gray-900 dark:text-gray-200">Workflows</h5><ul><li><div class="group mt-2 lg:mt-0 flex items-center pr-3 py-1.5 cursor-pointer focus:outline-primary dark:focus:outline-primary-light space-x-3 rounded-lg hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem"><div>Verified Workflows</div><svg width="3" height="24" viewBox="0 -9 3 24" class="transition-transform text-gray-400 overflow-visible group-hover:text-gray-600 dark:text-gray-600 dark:group-hover:text-gray-400"><path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg></div></li><li id="/workflows/csv-import" class="scroll-m-4 first:scroll-m-20"><a class="group mt-2 lg:mt-0 flex items-center pr-3 py-1.5 cursor-pointer focus:outline-primary dark:focus:outline-primary-light space-x-3 rounded-lg hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/workflows/csv-import"><svg class="h-4 w-4 bg-gray-400 dark:bg-gray-500" style="-webkit-mask-image:url(https://mintlify.b-cdn.net/v6.6.0/solid/file-import.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center"></svg><div class="flex-1 flex items-center space-x-2.5"><div>CSV Parameter Import</div></div></a></li><li id="/workflows/resource-monitoring" class="scroll-m-4 first:scroll-m-20"><a class="group mt-2 lg:mt-0 flex items-center pr-3 py-1.5 cursor-pointer focus:outline-primary dark:focus:outline-primary-light space-x-3 rounded-lg hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/workflows/resource-monitoring"><svg class="h-4 w-4 bg-gray-400 dark:bg-gray-500" style="-webkit-mask-image:url(https://mintlify.b-cdn.net/v6.6.0/solid/memory.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center"></svg><div class="flex-1 flex items-center space-x-2.5"><div>Resource Monitoring</div></div></a></li></ul></div><div class="mt-12 lg:mt-8"><h5 class="pl-4 mb-3.5 lg:mb-2.5 font-semibold text-gray-900 dark:text-gray-200">Python SDK</h5><ul><li id="/workflows/sdk/getting-started/quick-start" class="scroll-m-4 first:scroll-m-20"><a class="group mt-2 lg:mt-0 flex items-center pr-3 py-1.5 cursor-pointer focus:outline-primary dark:focus:outline-primary-light space-x-3 rounded-lg hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/workflows/sdk/getting-started/quick-start"><svg class="h-4 w-4 bg-gray-400 dark:bg-gray-500" style="-webkit-mask-image:url(https://mintlify.b-cdn.net/v6.6.0/solid/play.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center"></svg><div class="flex-1 flex items-center space-x-2.5"><div>Quick Start</div></div></a></li><li id="/workflows/sdk/getting-started/authorizing-your-own-workflow" class="scroll-m-4 first:scroll-m-20"><a class="group mt-2 lg:mt-0 flex items-center pr-3 py-1.5 cursor-pointer focus:outline-primary dark:focus:outline-primary-light space-x-3 rounded-lg hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/workflows/sdk/getting-started/authorizing-your-own-workflow"><svg class="h-4 w-4 bg-gray-400 dark:bg-gray-500" style="-webkit-mask-image:url(https://mintlify.b-cdn.net/v6.6.0/duotone/arrow-progress.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center"></svg><div class="flex-1 flex items-center space-x-2.5"><div>Authoring your Own Workflow</div></div></a></li><li><div class="group mt-2 lg:mt-0 flex items-center pr-3 py-1.5 cursor-pointer focus:outline-primary dark:focus:outline-primary-light space-x-3 rounded-lg hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem"><div>Workflow Concepts</div><svg width="3" height="24" viewBox="0 -9 3 24" class="transition-transform text-gray-400 overflow-visible group-hover:text-gray-600 dark:text-gray-600 dark:group-hover:text-gray-400"><path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg></div></li><li><div class="group mt-2 lg:mt-0 flex items-center pr-3 py-1.5 cursor-pointer focus:outline-primary dark:focus:outline-primary-light space-x-3 rounded-lg hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem"><div>Testing and Debugging a Workflow</div><svg width="3" height="24" viewBox="0 -9 3 24" class="transition-transform text-gray-400 overflow-visible group-hover:text-gray-600 dark:text-gray-600 dark:group-hover:text-gray-400"><path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg></div></li></ul></div><div class="mt-12 lg:mt-8"><h5 class="pl-4 mb-3.5 lg:mb-2.5 font-semibold text-gray-900 dark:text-gray-200">Nextflow</h5><ul><li id="/workflows/sdk/nextflow/overview" class="scroll-m-4 first:scroll-m-20"><a class="group mt-2 lg:mt-0 flex items-center pr-3 py-1.5 cursor-pointer focus:outline-primary dark:focus:outline-primary-light space-x-3 rounded-lg hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/workflows/sdk/nextflow/overview"><svg class="h-4 w-4 bg-gray-400 dark:bg-gray-500" style="-webkit-mask-image:url(https://mintlify.b-cdn.net/v6.6.0/solid/magnifying-glass.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center"></svg><div class="flex-1 flex items-center space-x-2.5"><div>Overview</div></div></a></li><li id="/workflows/sdk/nextflow/tutorial" class="scroll-m-4 first:scroll-m-20"><a class="group mt-2 lg:mt-0 flex items-center pr-3 py-1.5 cursor-pointer focus:outline-primary dark:focus:outline-primary-light space-x-3 rounded-lg hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/workflows/sdk/nextflow/tutorial"><svg class="h-4 w-4 bg-gray-400 dark:bg-gray-500" style="-webkit-mask-image:url(https://mintlify.b-cdn.net/v6.6.0/solid/book.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center"></svg><div class="flex-1 flex items-center space-x-2.5"><div>Tutorial</div></div></a></li><li id="/workflows/sdk/nextflow/profiles" class="scroll-m-4 first:scroll-m-20"><a class="group mt-2 lg:mt-0 flex items-center pr-3 py-1.5 cursor-pointer focus:outline-primary dark:focus:outline-primary-light space-x-3 rounded-lg hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/workflows/sdk/nextflow/profiles"><svg class="h-4 w-4 bg-gray-400 dark:bg-gray-500" style="-webkit-mask-image:url(https://mintlify.b-cdn.net/v6.6.0/solid/user.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center"></svg><div class="flex-1 flex items-center space-x-2.5"><div>Execution Profiles</div></div></a></li><li id="/workflows/sdk/nextflow/caching" class="scroll-m-4 first:scroll-m-20"><a class="group mt-2 lg:mt-0 flex items-center pr-3 py-1.5 cursor-pointer focus:outline-primary dark:focus:outline-primary-light space-x-3 rounded-lg hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/workflows/sdk/nextflow/caching"><svg class="h-4 w-4 bg-gray-400 dark:bg-gray-500" style="-webkit-mask-image:url(https://mintlify.b-cdn.net/v6.6.0/solid/window-restore.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center"></svg><div class="flex-1 flex items-center space-x-2.5"><div>Caching and Resuming</div></div></a></li><li id="/workflows/sdk/nextflow/registries" class="scroll-m-4 first:scroll-m-20"><a class="group mt-2 lg:mt-0 flex items-center pr-3 py-1.5 cursor-pointer focus:outline-primary dark:focus:outline-primary-light space-x-3 rounded-lg hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/workflows/sdk/nextflow/registries"><svg class="h-4 w-4 bg-gray-400 dark:bg-gray-500" style="-webkit-mask-image:url(https://mintlify.b-cdn.net/v6.6.0/solid/lock.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center"></svg><div class="flex-1 flex items-center space-x-2.5"><div>Private Registries</div></div></a></li><li><div class="group mt-2 lg:mt-0 flex items-center pr-3 py-1.5 cursor-pointer focus:outline-primary dark:focus:outline-primary-light space-x-3 rounded-lg hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem"><div>Customizing Your Interface</div><svg width="3" height="24" viewBox="0 -9 3 24" class="transition-transform text-gray-400 overflow-visible group-hover:text-gray-600 dark:text-gray-600 dark:group-hover:text-gray-400"><path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg></div></li><li id="/workflows/sdk/nextflow/dependencies" class="scroll-m-4 first:scroll-m-20"><a class="group mt-2 lg:mt-0 flex items-center pr-3 py-1.5 cursor-pointer focus:outline-primary dark:focus:outline-primary-light space-x-3 rounded-lg hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/workflows/sdk/nextflow/dependencies"><svg class="h-4 w-4 bg-gray-400 dark:bg-gray-500" style="-webkit-mask-image:url(https://mintlify.b-cdn.net/v6.6.0/solid/arrow-progress.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center"></svg><div class="flex-1 flex items-center space-x-2.5"><div>Dependencies</div></div></a></li><li id="/workflows/sdk/nextflow/gpus" class="scroll-m-4 first:scroll-m-20"><a class="group mt-2 lg:mt-0 flex items-center pr-3 py-1.5 cursor-pointer focus:outline-primary dark:focus:outline-primary-light space-x-3 rounded-lg hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/workflows/sdk/nextflow/gpus"><svg class="h-4 w-4 bg-gray-400 dark:bg-gray-500" style="-webkit-mask-image:url(https://mintlify.b-cdn.net/v6.6.0/solid/microchip.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center"></svg><div class="flex-1 flex items-center space-x-2.5"><div>Using GPU Accelerators</div></div></a></li></ul></div><div class="mt-12 lg:mt-8"><h5 class="pl-4 mb-3.5 lg:mb-2.5 font-semibold text-gray-900 dark:text-gray-200">Snakemake</h5><ul><li id="/workflows/sdk/snakemake/quickstart" class="scroll-m-4 first:scroll-m-20"><a class="group mt-2 lg:mt-0 flex items-center pr-3 py-1.5 cursor-pointer focus:outline-primary dark:focus:outline-primary-light space-x-3 rounded-lg hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/workflows/sdk/snakemake/quickstart"><svg class="h-4 w-4 bg-gray-400 dark:bg-gray-500" style="-webkit-mask-image:url(https://mintlify.b-cdn.net/v6.6.0/solid/play.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center"></svg><div class="flex-1 flex items-center space-x-2.5"><div>Quick Start</div></div></a></li><li id="/workflows/sdk/snakemake/cloud" class="scroll-m-4 first:scroll-m-20"><a class="group mt-2 lg:mt-0 flex items-center pr-3 py-1.5 cursor-pointer focus:outline-primary dark:focus:outline-primary-light space-x-3 rounded-lg hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/workflows/sdk/snakemake/cloud"><svg class="h-4 w-4 bg-gray-400 dark:bg-gray-500" style="-webkit-mask-image:url(https://mintlify.b-cdn.net/v6.6.0/solid/cloud.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center"></svg><div class="flex-1 flex items-center space-x-2.5"><div>Snakemake Workflow Cloud Compatibility</div></div></a></li><li><div class="group mt-2 lg:mt-0 flex items-center pr-3 py-1.5 cursor-pointer focus:outline-primary dark:focus:outline-primary-light space-x-3 rounded-lg hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem"><div>Advanced Configuration</div><svg width="3" height="24" viewBox="0 -9 3 24" class="transition-transform text-gray-400 overflow-visible group-hover:text-gray-600 dark:text-gray-600 dark:group-hover:text-gray-400"><path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg></div></li><li id="/workflows/sdk/snakemake/tutorial" class="scroll-m-4 first:scroll-m-20"><a class="group mt-2 lg:mt-0 flex items-center pr-3 py-1.5 cursor-pointer focus:outline-primary dark:focus:outline-primary-light space-x-3 rounded-lg hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/workflows/sdk/snakemake/tutorial"><svg class="h-4 w-4 bg-gray-400 dark:bg-gray-500" style="-webkit-mask-image:url(https://mintlify.b-cdn.net/v6.6.0/solid/book.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center"></svg><div class="flex-1 flex items-center space-x-2.5"><div>Tutorial</div></div></a></li><li id="/workflows/sdk/snakemake/debugging" class="scroll-m-4 first:scroll-m-20"><a class="group mt-2 lg:mt-0 flex items-center pr-3 py-1.5 cursor-pointer focus:outline-primary dark:focus:outline-primary-light space-x-3 rounded-lg hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/workflows/sdk/snakemake/debugging"><svg class="h-4 w-4 bg-gray-400 dark:bg-gray-500" style="-webkit-mask-image:url(https://mintlify.b-cdn.net/v6.6.0/solid/bug-slash.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center"></svg><div class="flex-1 flex items-center space-x-2.5"><div>Debugging Snakemake</div></div></a></li><li id="/workflows/sdk/snakemake/troubleshooting" class="scroll-m-4 first:scroll-m-20"><a class="group mt-2 lg:mt-0 flex items-center pr-3 py-1.5 cursor-pointer focus:outline-primary dark:focus:outline-primary-light space-x-3 rounded-lg hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/workflows/sdk/snakemake/troubleshooting"><svg class="h-4 w-4 bg-gray-400 dark:bg-gray-500" style="-webkit-mask-image:url(https://mintlify.b-cdn.net/v6.6.0/solid/bugs.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center"></svg><div class="flex-1 flex items-center space-x-2.5"><div>Troubleshooting</div></div></a></li><li id="/workflows/sdk/snakemake/backend" class="scroll-m-4 first:scroll-m-20"><a class="group mt-2 lg:mt-0 flex items-center pr-3 py-1.5 cursor-pointer focus:outline-primary dark:focus:outline-primary-light space-x-3 rounded-lg hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/workflows/sdk/snakemake/backend"><svg class="h-4 w-4 bg-gray-400 dark:bg-gray-500" style="-webkit-mask-image:url(https://mintlify.b-cdn.net/v6.6.0/solid/archway.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center"></svg><div class="flex-1 flex items-center space-x-2.5"><div>Architecture Overview</div></div></a></li></ul></div><div class="mt-12 lg:mt-8"><h5 class="pl-4 mb-3.5 lg:mb-2.5 font-semibold text-gray-900 dark:text-gray-200">Automation</h5><ul><li id="/workflows/sdk/automation/overview" class="scroll-m-4 first:scroll-m-20"><a class="group mt-2 lg:mt-0 flex items-center pr-3 py-1.5 cursor-pointer focus:outline-primary dark:focus:outline-primary-light space-x-3 rounded-lg hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/workflows/sdk/automation/overview"><svg class="h-4 w-4 bg-gray-400 dark:bg-gray-500" style="-webkit-mask-image:url(https://mintlify.b-cdn.net/v6.6.0/solid/robot.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center"></svg><div class="flex-1 flex items-center space-x-2.5"><div>Workflows Automations</div></div></a></li><li id="/workflows/sdk/automation/example-data-addition" class="scroll-m-4 first:scroll-m-20"><a class="group mt-2 lg:mt-0 flex items-center pr-3 py-1.5 cursor-pointer focus:outline-primary dark:focus:outline-primary-light space-x-3 rounded-lg bg-primary/10 text-primary font-semibold dark:text-primary-light dark:bg-primary-light/10" style="padding-left:1rem" href="/workflows/sdk/automation/example-data-addition"><svg class="h-4 w-4 bg-primary dark:bg-primary-light" style="-webkit-mask-image:url(https://mintlify.b-cdn.net/v6.6.0/solid/table.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center"></svg><div class="flex-1 flex items-center space-x-2.5"><div>Example Data Addition Trigger</div></div></a></li><li id="/workflows/sdk/automation/example-interval" class="scroll-m-4 first:scroll-m-20"><a class="group mt-2 lg:mt-0 flex items-center pr-3 py-1.5 cursor-pointer focus:outline-primary dark:focus:outline-primary-light space-x-3 rounded-lg hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/workflows/sdk/automation/example-interval"><svg class="h-4 w-4 bg-gray-400 dark:bg-gray-500" style="-webkit-mask-image:url(https://mintlify.b-cdn.net/v6.6.0/solid/alarm-snooze.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center"></svg><div class="flex-1 flex items-center space-x-2.5"><div>Example Interval Trigger</div></div></a></li></ul></div></div></div></div></div><div class="" id="content-container"><div class="flex flex-row gap-12 box-border w-full pt-40 lg:pt-10"><div class="relative grow box-border flex-col w-full mx-auto px-1 lg:pl-[23.7rem] lg:-ml-12 xl:w-[calc(100%-28rem)]" id="content-area"><header id="header" class="relative"><div class="mt-0.5 space-y-2.5"><div class="eyebrow h-5 text-primary dark:text-primary-light text-sm font-semibold">Automation</div><div class="flex items-center"><h1 class="inline-block text-2xl sm:text-3xl font-extrabold text-gray-900 tracking-tight dark:text-gray-200">Data Addition Trigger</h1></div></div></header><div class="flex flex-col gap-8"><div class="flex flex-col gap-6 xl:hidden [&amp;:not(:empty)]:mt-8"></div></div><div class="relative mt-8 prose prose-gray dark:prose-invert"><div class="my-4 px-5 py-4 overflow-hidden rounded-xl flex gap-3 border border-sky-500/20 bg-sky-50/50 dark:border-sky-500/30 dark:bg-sky-500/10"><div class="mt-0.5 w-4"><svg width="14" height="14" viewBox="0 0 14 14" fill="currentColor" xmlns="http://www.w3.org/2000/svg" class="w-4 h-4 text-sky-500" aria-label="Note"><path fill-rule="evenodd" clip-rule="evenodd" d="M7 1.3C10.14 1.3 12.7 3.86 12.7 7C12.7 10.14 10.14 12.7 7 12.7C5.48908 12.6974 4.0408 12.096 2.97241 11.0276C1.90403 9.9592 1.30264 8.51092 1.3 7C1.3 3.86 3.86 1.3 7 1.3ZM7 0C3.14 0 0 3.14 0 7C0 10.86 3.14 14 7 14C10.86 14 14 10.86 14 7C14 3.14 10.86 0 7 0ZM8 3H6V8H8V3ZM8 9H6V11H8V9Z"></path></svg></div><div class="text-sm prose min-w-0 text-sky-900 dark:text-sky-200"> This document is a work in progress and is subject to change. </div></div> <p>We will walk through the process of creating an <a href="/workflows/sdk/automation/overview">automation</a> using the <code>Data Addition</code> trigger type on Latch which will run a <em>target workflow</em> on all children of the target directory. We assume that you understand how to write and register <a href="/workflows/sdk/defining-a-workflow/what-is-a-workflow">Workflows</a> on Latch.</p> <p><strong>Prerequisites:</strong></p> <ul> <li><em>Target directory</em> in <a href="https://console.latch.bio/data" target="_blank" rel="noreferrer">Latch Data</a>: this is the folder which is watched by the automation. The automation workflow will be triggered if a child is added to this folder.</li> </ul> <p><strong>Terms:</strong></p> <ul> <li><em>Automation Workflow</em>: workflow which will be called by automation. This is the workflow we create in <a href="/_sites/wiki.latch.bio/workflows/sdk/automation/example-data-addition#3-create-the-automation-workflow">steps 3-5</a> of this tutorial.</li> <li><em>Target Workflow</em>: workflow which will be ran by automation workflow on child of the <em>target directory</em>. This workflow should contain the logic on how to process the files in child directories. This is the workflow we create in <a href="/_sites/wiki.latch.bio/workflows/sdk/automation/example-data-addition#1-create-the-target-workflow">step 1</a> of this tutorial.</li> <li><em>Registry Table</em>: we use a Registry Table in this tutorial to record child directories which are processed by the target workflow to avoid reprocessing same directories in consequent runs of automation. We create this table in <a href="/_sites/wiki.latch.bio/workflows/sdk/automation/example-data-addition#2-create-a-new-registry-table">step 2</a> of this tutorial.</li> </ul> <h2 class="flex whitespace-pre-wrap group" id="1-create-the-target-workflow"><div class="absolute"><a href="#1-create-the-target-workflow" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100" aria-label="Navigate to header">​<div class="w-6 h-6 text-gray-400 rounded-md flex items-center justify-center zinc-box bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20"><svg xmlns="http://www.w3.org/2000/svg" fill="gray" height="12px" viewBox="0 0 576 512"><path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z"></path></svg></div></a></div><span class="cursor-pointer">1: Create the Target Workflow</span></h2> <p>This example requires another <em>target workflow</em> which will get executes on every child folder when <em>automation workflow</em> gets triggered. Below is a simple workflow example which reads every file in a child directory and prints out its Latch Path.</p> <ol> <li>Initialize a new workflow using <code>latch init test-workflow</code>.</li> <li>Replace <code>__init__.py</code> and <code>task.py</code> with the following sample code.<!-- --> <div class="mt-5 mb-8 not-prose rounded-xl relative text-gray-50 bg-[#0F1117] dark:bg-codeblock dark:ring-1 dark:ring-gray-800/50 codeblock-dark"><div class="min-w-full relative text-sm leading-6 children:!my-0 children:!shadow-none children:!bg-transparent transition-[height] duration-300 ease-in-out" style="font-variant-ligatures:none;height:auto"><div class="overflow-x-auto h-full p-5 overflow-y-hidden scrollbar-thin scrollbar-thumb-rounded scrollbar-thumb-white/20 dark:scrollbar-thumb-white/20 hover:scrollbar-thumb-white/25 dark:hover:scrollbar-thumb-white/25 active:scrollbar-thumb-white/25 dark:active:scrollbar-thumb-white/25"><pre class="language-python"><code class="language-python"><span class=""><span class="token comment"># __init__.py</span></span> <!-- --> <span class=""><span class="token keyword">from</span> wf<span class="token punctuation">.</span>task <span class="token keyword">import</span> task</span> <!-- --> <span class=""><span class="token keyword">from</span> latch<span class="token punctuation">.</span>resources<span class="token punctuation">.</span>workflow <span class="token keyword">import</span> workflow</span> <span class=""><span class="token keyword">from</span> latch<span class="token punctuation">.</span>types<span class="token punctuation">.</span>directory <span class="token keyword">import</span> LatchDir<span class="token punctuation">,</span> LatchOutputDir</span> <span class=""><span class="token keyword">from</span> latch<span class="token punctuation">.</span>types<span class="token punctuation">.</span><span class="token builtin">file</span> <span class="token keyword">import</span> LatchFile</span> <span class=""><span class="token keyword">from</span> latch<span class="token punctuation">.</span>types<span class="token punctuation">.</span>metadata <span class="token keyword">import</span> LatchAuthor<span class="token punctuation">,</span> LatchMetadata<span class="token punctuation">,</span> LatchParameter</span> <!-- --> <span class="">metadata <span class="token operator">=</span> LatchMetadata<span class="token punctuation">(</span></span> <span class=""> display_name<span class="token operator">=</span><span class="token string">&quot;Target Workflow&quot;</span><span class="token punctuation">,</span></span> <span class=""> author<span class="token operator">=</span>LatchAuthor<span class="token punctuation">(</span></span> <span class=""> name<span class="token operator">=</span><span class="token string">&quot;Your Name&quot;</span><span class="token punctuation">,</span></span> <span class=""> <span class="token punctuation">)</span><span class="token punctuation">,</span></span> <span class=""> parameters<span class="token operator">=</span><span class="token punctuation">{</span></span> <span class=""> <span class="token string">&quot;input_directory&quot;</span><span class="token punctuation">:</span> LatchParameter<span class="token punctuation">(</span></span> <span class=""> display_name<span class="token operator">=</span><span class="token string">&quot;Input Directory&quot;</span><span class="token punctuation">,</span></span> <span class=""> batch_table_column<span class="token operator">=</span><span class="token boolean">True</span><span class="token punctuation">,</span> <span class="token comment"># Show this parameter in batched mode.</span></span> <span class=""> <span class="token punctuation">)</span><span class="token punctuation">,</span></span> <span class=""> <span class="token string">&quot;output_directory&quot;</span><span class="token punctuation">:</span> LatchParameter<span class="token punctuation">(</span></span> <span class=""> display_name<span class="token operator">=</span><span class="token string">&quot;Output Directory&quot;</span><span class="token punctuation">,</span></span> <span class=""> batch_table_column<span class="token operator">=</span><span class="token boolean">True</span><span class="token punctuation">,</span> <span class="token comment"># Show this parameter in batched mode.</span></span> <span class=""> <span class="token punctuation">)</span><span class="token punctuation">,</span></span> <span class=""> <span class="token punctuation">}</span><span class="token punctuation">,</span></span> <span class=""><span class="token punctuation">)</span></span> <!-- --> <!-- --> <span class=""><span class="token decorator annotation punctuation">@workflow</span><span class="token punctuation">(</span>metadata<span class="token punctuation">)</span></span> <span class=""><span class="token keyword">def</span> <span class="token function">template_workflow</span><span class="token punctuation">(</span></span> <span class=""> input_directory<span class="token punctuation">:</span> LatchDir<span class="token punctuation">,</span> output_directory<span class="token punctuation">:</span> LatchOutputDir</span> <span class=""><span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">&gt;</span> LatchOutputDir<span class="token punctuation">:</span></span> <span class=""> <span class="token keyword">return</span> task<span class="token punctuation">(</span>input_directory<span class="token operator">=</span>input_directory<span class="token punctuation">,</span> output_directory<span class="token operator">=</span>output_directory<span class="token punctuation">)</span></span> </code></pre></div></div></div> <div class="mt-5 mb-8 not-prose rounded-xl relative text-gray-50 bg-[#0F1117] dark:bg-codeblock dark:ring-1 dark:ring-gray-800/50 codeblock-dark"><div class="min-w-full relative text-sm leading-6 children:!my-0 children:!shadow-none children:!bg-transparent transition-[height] duration-300 ease-in-out" style="font-variant-ligatures:none;height:auto"><div class="overflow-x-auto h-full p-5 overflow-y-hidden scrollbar-thin scrollbar-thumb-rounded scrollbar-thumb-white/20 dark:scrollbar-thumb-white/20 hover:scrollbar-thumb-white/25 dark:hover:scrollbar-thumb-white/25 active:scrollbar-thumb-white/25 dark:active:scrollbar-thumb-white/25"><pre class="language-python"><code class="language-python"><span class=""><span class="token comment"># task.py</span></span> <!-- --> <span class=""><span class="token keyword">import</span> os</span> <span class=""><span class="token keyword">from</span> logging <span class="token keyword">import</span> Logger</span> <span class=""><span class="token keyword">from</span> urllib<span class="token punctuation">.</span>parse <span class="token keyword">import</span> urljoin</span> <!-- --> <span class=""><span class="token keyword">from</span> latch <span class="token keyword">import</span> message</span> <span class=""><span class="token keyword">from</span> latch<span class="token punctuation">.</span>resources<span class="token punctuation">.</span>tasks <span class="token keyword">import</span> small_task</span> <span class=""><span class="token keyword">from</span> latch<span class="token punctuation">.</span>types<span class="token punctuation">.</span>directory <span class="token keyword">import</span> LatchDir<span class="token punctuation">,</span> LatchFile<span class="token punctuation">,</span> LatchOutputDir</span> <span class=""><span class="token keyword">from</span> latch<span class="token punctuation">.</span>account <span class="token keyword">import</span> Account</span> <!-- --> <!-- --> <span class="">log <span class="token operator">=</span> Logger<span class="token punctuation">(</span><span class="token string">&quot;wf.task&quot;</span><span class="token punctuation">)</span></span> <!-- --> <!-- --> <span class=""><span class="token decorator annotation punctuation">@small_task</span></span> <span class=""><span class="token keyword">def</span> <span class="token function">task</span><span class="token punctuation">(</span>input_directory<span class="token punctuation">:</span> LatchDir<span class="token punctuation">,</span> output_directory<span class="token punctuation">:</span> LatchOutputDir<span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">&gt;</span> LatchOutputDir<span class="token punctuation">:</span></span> <!-- --> <span class=""> <span class="token comment"># iterate through all directories of the child input directories using iterdir()</span></span> <span class=""> <span class="token keyword">for</span> <span class="token builtin">file</span> <span class="token keyword">in</span> input_directory<span class="token punctuation">.</span>iterdir<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">:</span></span> <span class=""> log<span class="token punctuation">.</span>error<span class="token punctuation">(</span><span class="token string-interpolation"><span class="token string">f&quot;</span><span class="token interpolation"><span class="token punctuation">{</span><span class="token builtin">file</span><span class="token punctuation">}</span></span><span class="token string"> </span><span class="token interpolation"><span class="token punctuation">{</span><span class="token builtin">file</span><span class="token punctuation">.</span>remote_path<span class="token punctuation">}</span></span><span class="token string">&quot;</span></span><span class="token punctuation">)</span> <span class="token comment"># note: `error` is used here since its the highest logging level</span></span> <!-- --> <span class=""> <span class="token keyword">return</span> output_directory</span> <!-- --> </code></pre></div></div></div> </li> <li>Register the sample target workflow with Latch using <code>latch register --remote --yes test-workflow</code>.</li> <li>Record the ID of your workflow on the sidebar which we will use later in the example. </li> <li>Test the workflow by running it on Latch</li> <li>You will need to pass the parameters into your target workflow from your automation. To obtain the JSON representation of the workflow inputs, navigate to a previous execution of your workflow. Select <strong>Graph and Logs</strong>, click on square box around the first task, and select <strong>Inputs</strong>. Copy the workflow parameters inside the <code>literal</code> object, and pass it to <code>params</code>. <br/> <br/> <!-- -->i.e.<!-- --> <div class="mt-5 mb-8 not-prose rounded-xl relative text-gray-50 bg-[#0F1117] dark:bg-codeblock dark:ring-1 dark:ring-gray-800/50 codeblock-dark"><div class="min-w-full relative text-sm leading-6 children:!my-0 children:!shadow-none children:!bg-transparent transition-[height] duration-300 ease-in-out" style="font-variant-ligatures:none;height:auto"><div class="overflow-x-auto h-full p-5 overflow-y-hidden scrollbar-thin scrollbar-thumb-rounded scrollbar-thumb-white/20 dark:scrollbar-thumb-white/20 hover:scrollbar-thumb-white/25 dark:hover:scrollbar-thumb-white/25 active:scrollbar-thumb-white/25 dark:active:scrollbar-thumb-white/25"><pre class="language-json"><code class="language-json"><span class=""><span class="token punctuation">{</span></span> <span class=""> <span class="token property">&quot;literals&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span></span> <span class=""> # copy everything inside the brackets</span> <span class=""> <span class="token punctuation">}</span></span> <span class=""><span class="token punctuation">}</span></span> </code></pre></div></div></div> </li> </ol> <h2 class="flex whitespace-pre-wrap group" id="2-create-a-new-registry-table"><div class="absolute"><a href="#2-create-a-new-registry-table" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100" aria-label="Navigate to header">​<div class="w-6 h-6 text-gray-400 rounded-md flex items-center justify-center zinc-box bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20"><svg xmlns="http://www.w3.org/2000/svg" fill="gray" height="12px" viewBox="0 0 576 512"><path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z"></path></svg></div></a></div><span class="cursor-pointer">2: Create a New Registry Table</span></h2> <p>In this example, we record all processed child directories in the Registry Table to not reprocess directories when automation workflow is runs again. This example requires you to create a new table with no existing columns. The automation workflow will add a column <code>Processed Directory</code> with the directory name of processed children.</p> <p>For many common use cases, Registry serves as the location to track workflow inputs and outputs, and hence we include an example of it here. However, having a registry table is not required, if you don’t want to use Registry as a mean to track your inputs and outputs.</p> <p>To create a new table to be used with the automation:</p> <ol> <li>Go to <a href="https://console.latch.bio/registry" target="_blank" rel="noreferrer">Latch Registry</a>.</li> <li>Select an existing project, and click <code>New Table</code>.</li> <li>Record the Table ID on the sidebar which we will use later in the example.</li> </ol> <p></p> <h2 class="flex whitespace-pre-wrap group" id="3-create-the-automation-workflow"><div class="absolute"><a href="#3-create-the-automation-workflow" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100" aria-label="Navigate to header">​<div class="w-6 h-6 text-gray-400 rounded-md flex items-center justify-center zinc-box bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20"><svg xmlns="http://www.w3.org/2000/svg" fill="gray" height="12px" viewBox="0 0 576 512"><path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z"></path></svg></div></a></div><span class="cursor-pointer">3: Create the Automation Workflow</span></h2> <p>This is the workflow which will be run when automation gets triggered. To create the automation workflow, clone the <a href="https://github.com/latchbio/automation-wf" target="_blank" rel="noreferrer">Automation Workflow Template</a> and navigate to the <code>automation-wf/wf</code> directory.</p> <div class="mt-5 mb-8 not-prose rounded-xl relative text-gray-50 bg-[#0F1117] dark:bg-codeblock dark:ring-1 dark:ring-gray-800/50 codeblock-dark"><div class="min-w-full relative text-sm leading-6 children:!my-0 children:!shadow-none children:!bg-transparent transition-[height] duration-300 ease-in-out" style="font-variant-ligatures:none;height:auto"><div class="overflow-x-auto h-full p-5 overflow-y-hidden scrollbar-thin scrollbar-thumb-rounded scrollbar-thumb-white/20 dark:scrollbar-thumb-white/20 hover:scrollbar-thumb-white/25 dark:hover:scrollbar-thumb-white/25 active:scrollbar-thumb-white/25 dark:active:scrollbar-thumb-white/25"><pre class="language-shell-session"><code class="language-shell-session"><span class=""><span class="token command"><span class="token shell-symbol important">$</span> <span class="token bash language-bash"><span class="token function">git</span> clone git@github.com:latchbio/automation-wf.git</span></span></span> <span class=""><span class="token output">Cloning into &#x27;automation-wf&#x27;...</span></span> <span class=""><span class="token output">remote: Enumerating objects: 33, done.</span></span> <span class=""><span class="token output">remote: Counting objects: 100% (33/33), done.</span></span> <span class=""><span class="token output">remote: Compressing objects: 100% (24/24), done.</span></span> <span class=""><span class="token output">remote: Total 33 (delta 9), reused 28 (delta 6), pack-reused 0</span></span> <span class=""><span class="token output">Receiving objects: 100% (33/33), 8.52 KiB | 1.42 MiB/s, done.</span></span> <span class=""><span class="token output">Resolving deltas: 100% (9/9), done.</span></span> <!-- --> <span class=""><span class="token command"><span class="token shell-symbol important">$</span> <span class="token bash language-bash"><span class="token builtin class-name">cd</span> automation-wf/wf</span></span></span> </code></pre></div></div></div> <p>File Tree:</p> <div class="mt-5 mb-8 not-prose rounded-xl relative text-gray-50 bg-[#0F1117] dark:bg-codeblock dark:ring-1 dark:ring-gray-800/50 codeblock-dark"><div class="min-w-full relative text-sm leading-6 children:!my-0 children:!shadow-none children:!bg-transparent transition-[height] duration-300 ease-in-out" style="font-variant-ligatures:none;height:auto"><div class="overflow-x-auto h-full p-5 overflow-y-hidden scrollbar-thin scrollbar-thumb-rounded scrollbar-thumb-white/20 dark:scrollbar-thumb-white/20 hover:scrollbar-thumb-white/25 dark:hover:scrollbar-thumb-white/25 active:scrollbar-thumb-white/25 dark:active:scrollbar-thumb-white/25"><pre class="language-shell-session"><code class="language-shell-session"><span class=""><span class="token output">├── Dockerfile</span></span> <span class=""><span class="token output">├── README.md</span></span> <span class=""><span class="token output">├── version</span></span> <span class=""><span class="token output">└── wf</span></span> <span class=""><span class="token output"> ├── __init__.py</span></span> <span class=""><span class="token output"> ├── automation.py</span></span> <span class=""><span class="token output"> └── util.py</span></span> </code></pre></div></div></div> <ul> <li><code>__init__.py</code> calls the automation task defined in <code>automation.py</code>.</li> <li><code>automation.py</code> contains the Python logic to determine how a workflow should be launched.</li> <li><code>util.py</code> contains the utility function which launches target workflow.</li> </ul> <h2 class="flex whitespace-pre-wrap group" id="4-configure-the-target-workflow"><div class="absolute"><a href="#4-configure-the-target-workflow" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100" aria-label="Navigate to header">​<div class="w-6 h-6 text-gray-400 rounded-md flex items-center justify-center zinc-box bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20"><svg xmlns="http://www.w3.org/2000/svg" fill="gray" height="12px" viewBox="0 0 576 512"><path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z"></path></svg></div></a></div><span class="cursor-pointer">4. Configure the Target Workflow</span></h2> <p>To specify the target workflow and the registry table which you have just created, configure the following parameters in <code>wf/__init__.py</code> and specify your name in workflow metadata:</p> <ul> <li><code>output_directory</code>: The Latch Path to the output folder which this automation workflow will populate. i.e. <code>latch://...</code></li> <li><code>target_wf_id</code>: The ID of the target workflow that you have just created.</li> <li><code>params</code>: The parameters for your workflow. Refer to <a href="/_sites/wiki.latch.bio/workflows/sdk/automation/example-data-addition#1-create-the-target-workflow">Create The Target Workflow</a> to get the parameters.</li> <li><code>table_id</code>: The ID of the table which you created that stores metadata for this automation. Refer to <a href="/_sites/wiki.latch.bio/workflows/sdk/automation/example-data-addition#2-create-a-new-registry-table">Create A New Registry Table</a> to create a table and get the ID.</li> </ul> <blockquote> <p><strong>Important</strong>: Currently, automations are only passing <code>input_directory</code> as the parameter to the automation workflow. If your workflow has different parameters automation will fail to start it. <br/> <!-- -->In case you need more parameters to pass to your automation workflow, we suggest to hard-code them into the workflow while we are working on adding parameter support for automations.</p> </blockquote> <div class="mt-5 mb-8 not-prose rounded-xl relative text-gray-50 bg-[#0F1117] dark:bg-codeblock dark:ring-1 dark:ring-gray-800/50 codeblock-dark"><div class="min-w-full relative text-sm leading-6 children:!my-0 children:!shadow-none children:!bg-transparent transition-[height] duration-300 ease-in-out" style="font-variant-ligatures:none;height:auto"><div class="overflow-x-auto h-full p-5 overflow-y-hidden scrollbar-thin scrollbar-thumb-rounded scrollbar-thumb-white/20 dark:scrollbar-thumb-white/20 hover:scrollbar-thumb-white/25 dark:hover:scrollbar-thumb-white/25 active:scrollbar-thumb-white/25 dark:active:scrollbar-thumb-white/25"><pre class="language-python"><code class="language-python"><span class=""><span class="token comment"># __init__.py​</span></span> <!-- --> <span class=""><span class="token keyword">from</span> latch<span class="token punctuation">.</span>resources<span class="token punctuation">.</span>workflow <span class="token keyword">import</span> workflow</span> <span class=""><span class="token keyword">from</span> latch<span class="token punctuation">.</span>types<span class="token punctuation">.</span>directory <span class="token keyword">import</span> LatchDir<span class="token punctuation">,</span> LatchOutputDir</span> <span class=""><span class="token keyword">from</span> latch<span class="token punctuation">.</span>types<span class="token punctuation">.</span>metadata <span class="token keyword">import</span> LatchAuthor<span class="token punctuation">,</span> LatchMetadata<span class="token punctuation">,</span> LatchParameter</span> <span class=""><span class="token keyword">from</span> wf<span class="token punctuation">.</span>automation <span class="token keyword">import</span> automation_task</span> <!-- --> <span class="">metadata <span class="token operator">=</span> LatchMetadata<span class="token punctuation">(</span></span> <span class=""> <span class="token comment"># MODIFY NAMING METADATA BELOW</span></span> <span class=""> display_name<span class="token operator">=</span><span class="token string">&quot;Automation Template&quot;</span><span class="token punctuation">,</span></span> <span class=""> author<span class="token operator">=</span>LatchAuthor<span class="token punctuation">(</span></span> <span class=""> name<span class="token operator">=</span><span class="token string">&quot;Your Name Here&quot;</span><span class="token punctuation">,</span></span> <span class=""> <span class="token punctuation">)</span><span class="token punctuation">,</span></span> <span class=""> <span class="token comment"># MODIFY NAMING METADATA ABOVE</span></span> <span class=""> <span class="token comment"># IMPORTANT: these exact parameters are required for the workflow to work with automations</span></span> <span class=""> parameters<span class="token operator">=</span><span class="token punctuation">{</span></span> <span class=""> <span class="token string">&quot;input_directory&quot;</span><span class="token punctuation">:</span> LatchParameter<span class="token punctuation">(</span></span> <span class=""> display_name<span class="token operator">=</span><span class="token string">&quot;Input Directory&quot;</span><span class="token punctuation">,</span></span> <span class=""> <span class="token punctuation">)</span></span> <span class=""> <span class="token punctuation">}</span><span class="token punctuation">,</span></span> <span class=""><span class="token punctuation">)</span></span> <!-- --> <!-- --> <span class=""><span class="token decorator annotation punctuation">@workflow</span><span class="token punctuation">(</span>metadata<span class="token punctuation">)</span></span> <span class=""><span class="token keyword">def</span> <span class="token function">automation_workflow</span><span class="token punctuation">(</span>input_directory<span class="token punctuation">:</span> LatchDir<span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">&gt;</span> <span class="token boolean">None</span><span class="token punctuation">:</span></span> <span class=""> output_directory <span class="token operator">=</span> LatchOutputDir<span class="token punctuation">(</span></span> <span class=""> path<span class="token operator">=</span><span class="token string">&quot;latch://FIXME&quot;</span> <span class="token comment"># fixme: change to remote path of desired output directory</span></span> <span class=""> <span class="token punctuation">)</span></span> <!-- --> <span class=""> automation_task<span class="token punctuation">(</span></span> <span class=""> input_directory<span class="token operator">=</span>input_directory<span class="token punctuation">,</span></span> <span class=""> output_directory<span class="token operator">=</span>output_directory<span class="token punctuation">,</span></span> <span class=""> target_wf_id<span class="token operator">=</span><span class="token string">&quot;FIXME&quot;</span><span class="token punctuation">,</span> <span class="token comment"># fixme: change wf_id to the desired workflow id</span></span> <span class=""> table_id<span class="token operator">=</span><span class="token string">&quot;FIXME&quot;</span><span class="token punctuation">,</span> <span class="token comment"># fixme: change table_id to the desired registry table</span></span> <span class=""> <span class="token punctuation">)</span></span> <!-- --> </code></pre></div></div></div> <p>(Optional) Change the parameters object in <code>automation.py</code> from <a href="/_sites/wiki.latch.bio/workflows/sdk/automation/example-data-addition#1-create-the-target-workflow">step 1.6</a> if your target workflow takes different parameters than <code>input_directory</code> and <code>output_directory</code>:</p> <div class="mt-5 mb-8 not-prose rounded-xl relative text-gray-50 bg-[#0F1117] dark:bg-codeblock dark:ring-1 dark:ring-gray-800/50 codeblock-dark"><div class="min-w-full relative text-sm leading-6 children:!my-0 children:!shadow-none children:!bg-transparent transition-[height] duration-300 ease-in-out" style="font-variant-ligatures:none;height:auto"><div class="overflow-x-auto h-full p-5 overflow-y-hidden scrollbar-thin scrollbar-thumb-rounded scrollbar-thumb-white/20 dark:scrollbar-thumb-white/20 hover:scrollbar-thumb-white/25 dark:hover:scrollbar-thumb-white/25 active:scrollbar-thumb-white/25 dark:active:scrollbar-thumb-white/25"><pre class="language-python"><code class="language-python"><span class=""><span class="token comment"># automation.py</span></span> <!-- --> <span class=""><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span></span> <!-- --> <span class="">params <span class="token operator">=</span> <span class="token punctuation">{</span></span> <span class=""> <span class="token string">&quot;input_directory&quot;</span><span class="token punctuation">:</span> <span class="token punctuation">{</span></span> <span class=""> <span class="token string">&quot;scalar&quot;</span><span class="token punctuation">:</span> <span class="token punctuation">{</span></span> <span class=""> <span class="token string">&quot;blob&quot;</span><span class="token punctuation">:</span> <span class="token punctuation">{</span></span> <span class=""> <span class="token string">&quot;metadata&quot;</span><span class="token punctuation">:</span> <span class="token punctuation">{</span><span class="token string">&quot;type&quot;</span><span class="token punctuation">:</span> <span class="token punctuation">{</span><span class="token string">&quot;dimensionality&quot;</span><span class="token punctuation">:</span> <span class="token string">&quot;MULTIPART&quot;</span><span class="token punctuation">}</span><span class="token punctuation">}</span><span class="token punctuation">,</span></span> <span class=""> <span class="token string">&quot;uri&quot;</span><span class="token punctuation">:</span> input_directory<span class="token punctuation">.</span>remote_path<span class="token punctuation">,</span></span> <span class=""> <span class="token punctuation">}</span></span> <span class=""> <span class="token punctuation">}</span></span> <span class=""> <span class="token punctuation">}</span><span class="token punctuation">,</span></span> <span class=""> <span class="token string">&quot;output_directory&quot;</span><span class="token punctuation">:</span> <span class="token punctuation">{</span></span> <span class=""> <span class="token string">&quot;scalar&quot;</span><span class="token punctuation">:</span> <span class="token punctuation">{</span></span> <span class=""> <span class="token string">&quot;blob&quot;</span><span class="token punctuation">:</span> <span class="token punctuation">{</span></span> <span class=""> <span class="token string">&quot;metadata&quot;</span><span class="token punctuation">:</span> <span class="token punctuation">{</span><span class="token string">&quot;type&quot;</span><span class="token punctuation">:</span> <span class="token punctuation">{</span><span class="token string">&quot;dimensionality&quot;</span><span class="token punctuation">:</span> <span class="token string">&quot;MULTIPART&quot;</span><span class="token punctuation">}</span><span class="token punctuation">}</span><span class="token punctuation">,</span></span> <span class=""> <span class="token string">&quot;uri&quot;</span><span class="token punctuation">:</span> output_directory<span class="token punctuation">.</span>remote_path<span class="token punctuation">,</span></span> <span class=""> <span class="token punctuation">}</span></span> <span class=""> <span class="token punctuation">}</span></span> <span class=""> <span class="token punctuation">}</span><span class="token punctuation">,</span></span> <span class=""><span class="token punctuation">}</span></span> <span class=""><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span></span> </code></pre></div></div></div> <p><strong>Usage Notes</strong>:</p> <ul> <li>The <code>input_directory</code> refers to the child directory (i.e. the trigger directory) to be passed to the target workflow.</li> <li>The <code>output_directory</code> refers to directory where the output of the target workflow will be stored.</li> </ul> <h2 class="flex whitespace-pre-wrap group" id="5-optional-modify-automation-logic"><div class="absolute"><a href="#5-optional-modify-automation-logic" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100" aria-label="Navigate to header">​<div class="w-6 h-6 text-gray-400 rounded-md flex items-center justify-center zinc-box bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20"><svg xmlns="http://www.w3.org/2000/svg" fill="gray" height="12px" viewBox="0 0 576 512"><path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z"></path></svg></div></a></div><span class="cursor-pointer">5. (Optional) Modify Automation Logic</span></h2> <p>The file <code>wf/automation.py</code> contains the logic that determines how an execution for the target workflow should be launched.</p> <p>The <code>automation_task</code> defines the logic that is used to launch the workflow. The code below checks a registry table to see whether an output directory exists, and launches an execution for the target workflow if that is not the case.</p> <p>Modify the function below to change the logic for launching target workflows.</p> <div class="mt-5 mb-8 not-prose rounded-xl relative text-gray-50 bg-[#0F1117] dark:bg-codeblock dark:ring-1 dark:ring-gray-800/50 codeblock-dark"><div class="min-w-full relative text-sm leading-6 children:!my-0 children:!shadow-none children:!bg-transparent transition-[height] duration-300 ease-in-out" style="font-variant-ligatures:none;height:auto"><div class="overflow-x-auto h-full p-5 overflow-y-hidden scrollbar-thin scrollbar-thumb-rounded scrollbar-thumb-white/20 dark:scrollbar-thumb-white/20 hover:scrollbar-thumb-white/25 dark:hover:scrollbar-thumb-white/25 active:scrollbar-thumb-white/25 dark:active:scrollbar-thumb-white/25"><pre class="language-python"><code class="language-python"><span class=""><span class="token comment"># automation.py</span></span> <span class=""><span class="token keyword">import</span> uuid</span> <span class=""><span class="token keyword">from</span> typing <span class="token keyword">import</span> Set</span> <!-- --> <span class=""><span class="token keyword">from</span> latch<span class="token punctuation">.</span>registry<span class="token punctuation">.</span>table <span class="token keyword">import</span> Table</span> <span class=""><span class="token keyword">from</span> latch<span class="token punctuation">.</span>resources<span class="token punctuation">.</span>tasks <span class="token keyword">import</span> small_task</span> <span class=""><span class="token keyword">from</span> latch<span class="token punctuation">.</span>types<span class="token punctuation">.</span>directory <span class="token keyword">import</span> LatchDir<span class="token punctuation">,</span> LatchOutputDir</span> <span class=""><span class="token keyword">from</span> latch<span class="token punctuation">.</span>types<span class="token punctuation">.</span><span class="token builtin">file</span> <span class="token keyword">import</span> LatchFile</span> <!-- --> <span class=""><span class="token keyword">from</span> <span class="token punctuation">.</span>utils <span class="token keyword">import</span> launch_workflow</span> <!-- --> <!-- --> <span class=""><span class="token decorator annotation punctuation">@small_task</span></span> <span class=""><span class="token keyword">def</span> <span class="token function">automation_task</span><span class="token punctuation">(</span></span> <span class=""> input_directory<span class="token punctuation">:</span> LatchDir<span class="token punctuation">,</span></span> <span class=""> output_directory<span class="token punctuation">:</span> LatchOutputDir<span class="token punctuation">,</span></span> <span class=""> target_wf_id<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">,</span></span> <span class=""> table_id<span class="token punctuation">:</span> <span class="token builtin">str</span><span class="token punctuation">,</span></span> <span class=""><span class="token punctuation">)</span> <span class="token operator">-</span><span class="token operator">&gt;</span> <span class="token boolean">None</span><span class="token punctuation">:</span></span> <span class=""> <span class="token string">&quot;&quot;</span>&quot;</span> <span class=""> Logic on how to process the <span class="token builtin">input</span> directory <span class="token keyword">and</span> launch the target workflows<span class="token punctuation">.</span></span> <span class=""> <span class="token string">&quot;&quot;</span>&quot;</span> <!-- --> <span class=""> <span class="token comment"># fetch the table using Latch SDK</span></span> <span class=""> automation_table <span class="token operator">=</span> Table<span class="token punctuation">(</span>table_id<span class="token punctuation">)</span></span> <span class=""> processed_directory_column <span class="token operator">=</span> <span class="token string">&quot;Processed Directory&quot;</span></span> <!-- --> <span class=""> <span class="token comment"># [PARAMS OMITTED]</span></span> <!-- --> <span class=""> <span class="token comment"># check if the provided table contains column `Processed Directory` and creates one if it isn&#x27;t present</span></span> <span class=""> <span class="token comment"># we use Latch SDK to get the columns of the table and try to get the column by name</span></span> <span class=""> <span class="token keyword">if</span> automation_table<span class="token punctuation">.</span>get_columns<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span>get<span class="token punctuation">(</span>processed_directory_column<span class="token punctuation">,</span> <span class="token boolean">None</span><span class="token punctuation">)</span> <span class="token keyword">is</span> <span class="token boolean">None</span><span class="token punctuation">:</span></span> <span class=""> <span class="token keyword">with</span> automation_table<span class="token punctuation">.</span>update<span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token keyword">as</span> automation_table_updater<span class="token punctuation">:</span> <span class="token comment"># create an update context for the table</span></span> <span class=""> automation_table_updater<span class="token punctuation">.</span>upsert_column<span class="token punctuation">(</span>processed_directory_column<span class="token punctuation">,</span> LatchDir<span class="token punctuation">)</span></span> <!-- --> <span class=""> <span class="token comment"># fetch all the directories that have been processed and recorded in the Registry table previously</span></span> <span class=""> resolved_directories<span class="token punctuation">:</span> Set<span class="token punctuation">[</span><span class="token builtin">str</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token builtin">set</span><span class="token punctuation">(</span><span class="token punctuation">)</span></span> <span class=""> <span class="token comment"># list_records() returns a generator of records(rows) of the Registry Table</span></span> <span class=""> <span class="token keyword">for</span> page <span class="token keyword">in</span> automation_table<span class="token punctuation">.</span>list_records<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">:</span></span> <span class=""> <span class="token keyword">for</span> _<span class="token punctuation">,</span> record <span class="token keyword">in</span> page<span class="token punctuation">.</span>items<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">:</span></span> <span class=""> value <span class="token operator">=</span> record<span class="token punctuation">.</span>get_values<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">[</span>processed_directory_column<span class="token punctuation">]</span></span> <span class=""> <span class="token keyword">assert</span> <span class="token builtin">isinstance</span><span class="token punctuation">(</span></span> <span class=""> value<span class="token punctuation">,</span> LatchDir</span> <span class=""> <span class="token punctuation">)</span> <span class="token comment"># we only allow processing of child directories</span></span> <span class=""> resolved_directories<span class="token punctuation">.</span>add<span class="token punctuation">(</span><span class="token builtin">str</span><span class="token punctuation">(</span>value<span class="token punctuation">)</span><span class="token punctuation">)</span></span> <!-- --> <span class=""> <span class="token keyword">assert</span> <span class="token builtin">isinstance</span><span class="token punctuation">(</span>input_directory<span class="token punctuation">.</span>remote_path<span class="token punctuation">,</span> <span class="token builtin">str</span><span class="token punctuation">)</span></span> <span class=""> <span class="token keyword">assert</span> <span class="token builtin">isinstance</span><span class="token punctuation">(</span>output_directory<span class="token punctuation">.</span>remote_path<span class="token punctuation">,</span> <span class="token builtin">str</span><span class="token punctuation">)</span></span> <!-- --> <span class=""> <span class="token comment"># Launch the target workflow for each child directory which hasn&#x27;t been processed yet.</span></span> <span class=""> <span class="token comment"># Record the processed directory in the Registry table.</span></span> <!-- --> <span class=""> <span class="token comment"># iterdir() returns an iterator of the child files and directories of the input directory</span></span> <span class=""> <span class="token keyword">for</span> child <span class="token keyword">in</span> input_directory<span class="token punctuation">.</span>iterdir<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">:</span></span> <span class=""> <span class="token comment"># skip files, output directory and directories that have been processed</span></span> <span class=""> <span class="token keyword">if</span> <span class="token punctuation">(</span></span> <span class=""> <span class="token builtin">isinstance</span><span class="token punctuation">(</span>child<span class="token punctuation">,</span> LatchFile<span class="token punctuation">)</span></span> <span class=""> <span class="token keyword">or</span> <span class="token builtin">str</span><span class="token punctuation">(</span>child<span class="token punctuation">)</span> <span class="token operator">==</span> <span class="token builtin">str</span><span class="token punctuation">(</span>output_directory<span class="token punctuation">)</span></span> <span class=""> <span class="token keyword">or</span> <span class="token builtin">str</span><span class="token punctuation">(</span>child<span class="token punctuation">)</span> <span class="token keyword">in</span> resolved_directories</span> <span class=""> <span class="token punctuation">)</span><span class="token punctuation">:</span></span> <span class=""> <span class="token keyword">continue</span></span> <!-- --> <span class=""> <span class="token keyword">with</span> automation_table<span class="token punctuation">.</span>update<span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token keyword">as</span> automation_table_updater<span class="token punctuation">:</span></span> <span class=""> <span class="token comment"># use a util function to launch the target workflow with the right parameters</span></span> <span class=""> launch_workflow<span class="token punctuation">(</span></span> <span class=""> target_wf_id<span class="token operator">=</span>target_wf_id<span class="token punctuation">,</span></span> <span class=""> params<span class="token operator">=</span>params<span class="token punctuation">,</span></span> <span class=""> <span class="token punctuation">)</span></span> <span class=""> <span class="token comment"># update registry table with the processed directory</span></span> <span class=""> automation_table_updater<span class="token punctuation">.</span>upsert_record<span class="token punctuation">(</span></span> <span class=""> <span class="token builtin">str</span><span class="token punctuation">(</span>uuid<span class="token punctuation">.</span>uuid4<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span></span> <span class=""> <span class="token operator">**</span><span class="token punctuation">{</span></span> <span class=""> processed_directory_column<span class="token punctuation">:</span> child<span class="token punctuation">,</span></span> <span class=""> <span class="token punctuation">}</span><span class="token punctuation">,</span></span> <span class=""> <span class="token punctuation">)</span></span> </code></pre></div></div></div> <h2 class="flex whitespace-pre-wrap group" id="5-register-automation-workflow"><div class="absolute"><a href="#5-register-automation-workflow" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100" aria-label="Navigate to header">​<div class="w-6 h-6 text-gray-400 rounded-md flex items-center justify-center zinc-box bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20"><svg xmlns="http://www.w3.org/2000/svg" fill="gray" height="12px" viewBox="0 0 576 512"><path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z"></path></svg></div></a></div><span class="cursor-pointer">5. Register Automation Workflow</span></h2> <p>Register the automation workflow to your Latch workspace.</p> <div class="mt-5 mb-8 not-prose rounded-xl relative text-gray-50 bg-[#0F1117] dark:bg-codeblock dark:ring-1 dark:ring-gray-800/50 codeblock-dark"><div class="min-w-full relative text-sm leading-6 children:!my-0 children:!shadow-none children:!bg-transparent transition-[height] duration-300 ease-in-out" style="font-variant-ligatures:none;height:auto"><div class="overflow-x-auto h-full p-5 overflow-y-hidden scrollbar-thin scrollbar-thumb-rounded scrollbar-thumb-white/20 dark:scrollbar-thumb-white/20 hover:scrollbar-thumb-white/25 dark:hover:scrollbar-thumb-white/25 active:scrollbar-thumb-white/25 dark:active:scrollbar-thumb-white/25"><pre class="language-shell-session"><code class="language-shell-session"><span class=""><span class="token command"><span class="token shell-symbol important">$</span> <span class="token bash language-bash">latch register <span class="token parameter variable">--remote</span> <span class="token parameter variable">--yes</span> automation-wf</span></span></span> </code></pre></div></div></div> <h2 class="flex whitespace-pre-wrap group" id="6-create-automation"><div class="absolute"><a href="#6-create-automation" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100" aria-label="Navigate to header">​<div class="w-6 h-6 text-gray-400 rounded-md flex items-center justify-center zinc-box bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20"><svg xmlns="http://www.w3.org/2000/svg" fill="gray" height="12px" viewBox="0 0 576 512"><path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z"></path></svg></div></a></div><span class="cursor-pointer">6. Create Automation</span></h2> <p>Navigate to <a href="https://console.latch.bio/automations" target="_blank" rel="noreferrer">Automations</a> tab via <strong>Worfklows</strong> &gt; <strong>Automations</strong> and click on the <strong>Create Automation</strong> button.</p> <ol> <li> <p>Input an <strong>Automation Name</strong> and <strong>Description</strong>.</p> </li> <li> <p>Select the <code>Event Type</code> as <code>Data Added</code>.</p> </li> <li> <p>Specify <code>Follow-up Update Period</code> to something short like 30 seconds to make your automation easy to test.</p> </li> <li> <p>Select a folder where files/folders will be uploaded using the <code>Select Target</code> button. Any items uploaded to this folder will trigger the automation workflow.</p> </li> <li> <p>Select the automation workflow that you have just registered with Latch.</p> </li> </ol> <p></p> <h2 class="flex whitespace-pre-wrap group" id="7-test-your-automation"><div class="absolute"><a href="#7-test-your-automation" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100" aria-label="Navigate to header">​<div class="w-6 h-6 text-gray-400 rounded-md flex items-center justify-center zinc-box bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20"><svg xmlns="http://www.w3.org/2000/svg" fill="gray" height="12px" viewBox="0 0 576 512"><path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z"></path></svg></div></a></div><span class="cursor-pointer">7. Test Your Automation</span></h2> <p>To test your automation, go to the target directory that you have specified when creating automation, and create a couple of folders. Upload any files to the folders, and wait for the trigger timer to expire.</p> <p>Go to <strong>Worfklows</strong> &gt; <strong>All Executions</strong>. There should be 1 automation workflow execution, and a target workflow execution for each child in your target directory. Each target workflow should print out</p></div><div class="leading-6 mt-14"><div class="pb-16 w-full"><div class="flex flex-col gap-y-4 xl:flex-col xl:gap-6 min-[1400px]:flex-row md:flex-row md:justify-end"><div class="flex flex-row gap-5 items-center grow justify-between md:justify-start xl:justify-between min-[1400px]:justify-start"><p class="text-sm text-gray-600 dark:text-gray-400">Was this page helpful?</p><div class="flex flex-row gap-3 items-center"><button class="px-[14px] py-2 flex flex-row gap-[10px] items-center border rounded-lg text-gray-600 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 bg-white/50 border-gray-200 dark:border-gray-800 dark:bg-codeblock/50 hover:border-gray-400 hover:dark:border-gray-500"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" class="fill-current"><path d="M10.1187 1.08741C8.925 0.746789 7.67813 1.43741 7.3375 2.63116L7.15938 3.25616C7.04375 3.66241 6.83438 4.03741 6.55 4.34991L4.94688 6.11241C4.66875 6.41866 4.69062 6.89366 4.99687 7.17179C5.30312 7.44991 5.77813 7.42804 6.05625 7.12179L7.65938 5.35929C8.1 4.87491 8.42188 4.29679 8.6 3.66866L8.77812 3.04366C8.89062 2.64679 9.30625 2.41554 9.70625 2.52804C10.1063 2.64054 10.3344 3.05616 10.2219 3.45616L10.0437 4.08116C9.86562 4.70304 9.58437 5.29054 9.2125 5.81554C9.05 6.04366 9.03125 6.34366 9.15938 6.59366C9.2875 6.84366 9.54375 6.99991 9.825 6.99991H14C14.275 6.99991 14.5 7.22491 14.5 7.49991C14.5 7.71241 14.3656 7.89679 14.175 7.96866C13.9438 8.05616 13.7688 8.24992 13.7094 8.49054C13.65 8.73117 13.7125 8.98429 13.875 9.16866C13.9531 9.25616 14 9.37179 14 9.49991C14 9.74366 13.825 9.94679 13.5938 9.99054C13.3375 10.0405 13.1219 10.2187 13.0312 10.4624C12.9406 10.7062 12.9813 10.9843 13.1438 11.1905C13.2094 11.2749 13.25 11.3812 13.25 11.4999C13.25 11.7093 13.1187 11.8937 12.9312 11.9655C12.5719 12.1062 12.3781 12.4937 12.4812 12.8655C12.4937 12.9062 12.5 12.953 12.5 12.9999C12.5 13.2749 12.275 13.4999 12 13.4999H8.95312C8.55937 13.4999 8.17188 13.3843 7.84375 13.1655L5.91563 11.8812C5.57188 11.6499 5.10625 11.7437 4.875 12.0905C4.64375 12.4374 4.7375 12.8999 5.08437 13.1312L7.0125 14.4155C7.5875 14.7999 8.2625 15.003 8.95312 15.003H12C13.0844 15.003 13.9656 14.1405 14 13.0655C14.4563 12.6999 14.75 12.1374 14.75 11.503C14.75 11.3624 14.7344 11.228 14.7094 11.0968C15.1906 10.7312 15.5 10.153 15.5 9.50304C15.5 9.29991 15.4688 9.10304 15.4125 8.91866C15.775 8.55304 16 8.05304 16 7.49991C16 6.39679 15.1063 5.49991 14 5.49991H11.1156C11.2625 5.17491 11.3875 4.83741 11.4844 4.49366L11.6625 3.86866C12.0031 2.67491 11.3125 1.42804 10.1187 1.08741ZM1 5.99991C0.446875 5.99991 0 6.44679 0 6.99991V13.9999C0 14.553 0.446875 14.9999 1 14.9999H3C3.55313 14.9999 4 14.553 4 13.9999V6.99991C4 6.44679 3.55313 5.99991 3 5.99991H1Z"></path></svg><small class="text-sm font-normal leading-4 ">Yes</small></button><button class="px-[14px] py-2 flex flex-row gap-[10px] items-center border rounded-lg text-gray-600 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 bg-white/50 border-gray-200 dark:border-gray-800 dark:bg-codeblock/50 hover:border-gray-400 hover:dark:border-gray-500"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" class="fill-current"><path d="M10.1187 14.9124C8.925 15.253 7.67813 14.5624 7.3375 13.3687L7.15938 12.7437C7.04375 12.3374 6.83438 11.9624 6.55 11.6499L4.94688 9.8874C4.66875 9.58115 4.69062 9.10615 4.99687 8.82803C5.30312 8.5499 5.77813 8.57178 6.05625 8.87803L7.65938 10.6405C8.1 11.1249 8.42188 11.703 8.6 12.3312L8.77812 12.9562C8.89062 13.353 9.30625 13.5843 9.70625 13.4718C10.1063 13.3593 10.3344 12.9437 10.2219 12.5437L10.0437 11.9187C9.86562 11.2968 9.58437 10.7093 9.2125 10.1843C9.05 9.95615 9.03125 9.65615 9.15938 9.40615C9.2875 9.15615 9.54375 8.9999 9.825 8.9999H14C14.275 8.9999 14.5 8.7749 14.5 8.4999C14.5 8.2874 14.3656 8.10303 14.175 8.03115C13.9438 7.94365 13.7688 7.7499 13.7094 7.50928C13.65 7.26865 13.7125 7.01553 13.875 6.83115C13.9531 6.74365 14 6.62803 14 6.4999C14 6.25615 13.825 6.05303 13.5938 6.00928C13.3375 5.95928 13.1219 5.78115 13.0312 5.53428C12.9406 5.2874 12.9813 5.0124 13.1438 4.80615C13.2094 4.72178 13.25 4.61553 13.25 4.49678C13.25 4.2874 13.1187 4.10303 12.9312 4.03115C12.5719 3.89053 12.3781 3.50303 12.4812 3.13115C12.4937 3.09053 12.5 3.04365 12.5 2.99678C12.5 2.72178 12.275 2.49678 12 2.49678H8.95312C8.55937 2.49678 8.17188 2.6124 7.84375 2.83115L5.91563 4.11553C5.57188 4.34678 5.10625 4.25303 4.875 3.90615C4.64375 3.55928 4.7375 3.09678 5.08437 2.86553L7.0125 1.58115C7.5875 1.19678 8.2625 0.993652 8.95312 0.993652H12C13.0844 0.993652 13.9656 1.85615 14 2.93115C14.4563 3.29678 14.75 3.85928 14.75 4.49365C14.75 4.63428 14.7344 4.76865 14.7094 4.8999C15.1906 5.26553 15.5 5.84365 15.5 6.49365C15.5 6.69678 15.4688 6.89365 15.4125 7.07803C15.775 7.44678 16 7.94678 16 8.4999C16 9.60303 15.1063 10.4999 14 10.4999H11.1156C11.2625 10.8249 11.3875 11.1624 11.4844 11.5062L11.6625 12.1312C12.0031 13.3249 11.3125 14.5718 10.1187 14.9124ZM1 11.9999C0.446875 11.9999 0 11.553 0 10.9999V3.9999C0 3.44678 0.446875 2.9999 1 2.9999H3C3.55313 2.9999 4 3.44678 4 3.9999V10.9999C4 11.553 3.55313 11.9999 3 11.9999H1Z"></path></svg><small class="text-sm font-normal leading-4 ">No</small></button></div></div><div class="flex flex-row gap-3 justify-end"></div></div></div><div class="mb-12 px-0.5 flex items-center text-sm font-semibold text-gray-700 dark:text-gray-200"><a class="flex items-center space-x-3 group" href="/workflows/sdk/automation/overview"><svg viewBox="0 0 3 6" class="h-1.5 stroke-gray-400 overflow-visible group-hover:stroke-gray-600 dark:group-hover:stroke-gray-300"><path d="M3 0L0 3L3 6" fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="group-hover:text-gray-900 dark:group-hover:text-white">Workflows Automations</span></a><a class="flex items-center ml-auto space-x-3 group" href="/workflows/sdk/automation/example-interval"><span class="group-hover:text-gray-900 dark:group-hover:text-white">Example Interval Trigger</span><svg viewBox="0 0 3 6" class="rotate-180 h-1.5 stroke-gray-400 overflow-visible group-hover:stroke-gray-600 dark:group-hover:stroke-gray-300"><path d="M3 0L0 3L3 6" fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg></a></div><footer id="footer" class="flex gap-12 justify-between pt-10 border-t border-gray-100 sm:flex dark:border-gray-800/50 pb-28"><div class="flex gap-6"><a href="https://twitter.com/latchbio" target="_blank"><span class="sr-only">twitter</span><svg class="w-5 h-5 bg-gray-400 dark:bg-gray-500 hover:bg-gray-500 dark:hover:bg-gray-400" style="-webkit-mask-image:url(https://mintlify.b-cdn.net/v6.6.0/brands/twitter.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center"></svg></a><a href="https://www.linkedin.com/company/latchbio/" target="_blank"><span class="sr-only">linkedin</span><svg class="w-5 h-5 bg-gray-400 dark:bg-gray-500 hover:bg-gray-500 dark:hover:bg-gray-400" style="-webkit-mask-image:url(https://mintlify.b-cdn.net/v6.6.0/brands/linkedin.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center"></svg></a></div><div class="flex items-center justify-between"><div class="sm:flex"><a href="https://mintlify.com/preview-request?utm_campaign=poweredBy&amp;utm_medium=docs&amp;utm_source=wiki.latch.bio" target="_blank" rel="noreferrer" class="text-sm text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300">Powered by Mintlify</a></div></div></footer></div></div><div class="z-10 hidden xl:flex pl-10 box-border w-[19rem]" id="table-of-contents"><div id="table-of-contents-content" class="fixed text-gray-600 text-sm leading-6 w-[16.5rem] overflow-y-auto space-y-2 h-[calc(100%-10rem)]"><div class="text-gray-700 dark:text-gray-300 font-medium flex items-center space-x-2"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" xmlns="http://www.w3.org/2000/svg" class="h-3 w-3"><path d="M2.44434 12.6665H13.5554" stroke-linecap="round" stroke-linejoin="round"></path><path d="M2.44434 3.3335H13.5554" stroke-linecap="round" stroke-linejoin="round"></path><path d="M2.44434 8H7.33323" stroke-linecap="round" stroke-linejoin="round"></path></svg><span>On this page</span></div><ul><li><a href="#1-create-the-target-workflow" class="py-1 block hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300">1: Create the Target Workflow</a></li><li><a href="#2-create-a-new-registry-table" class="py-1 block hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300">2: Create a New Registry Table</a></li><li><a href="#3-create-the-automation-workflow" class="py-1 block hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300">3: Create the Automation Workflow</a></li><li><a href="#4-configure-the-target-workflow" class="py-1 block hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300">4. Configure the Target Workflow</a></li><li><a href="#5-optional-modify-automation-logic" class="py-1 block hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300">5. (Optional) Modify Automation Logic</a></li><li><a href="#5-register-automation-workflow" class="py-1 block hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300">5. Register Automation Workflow</a></li><li><a href="#6-create-automation" class="py-1 block hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300">6. Create Automation</a></li><li><a href="#7-test-your-automation" class="py-1 block hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300">7. Test Your Automation</a></li></ul></div></div></div></div></div></div></main></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"mdxSource":{"compiledSource":"/*@jsxRuntime automatic @jsxImportSource react*/\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = Object.assign({\n p: \"p\",\n a: \"a\",\n code: \"code\",\n em: \"em\",\n strong: \"strong\",\n ul: \"ul\",\n li: \"li\",\n ol: \"ol\",\n pre: \"pre\",\n span: \"span\",\n img: \"img\",\n br: \"br\",\n blockquote: \"blockquote\"\n }, _provideComponents(), props.components), {Note, Heading, CodeBlock} = _components;\n if (!CodeBlock) _missingMdxReference(\"CodeBlock\", true);\n if (!Heading) _missingMdxReference(\"Heading\", true);\n if (!Note) _missingMdxReference(\"Note\", true);\n return _jsxs(_Fragment, {\n children: [_jsx(Note, {\n children: \" This document is a work in progress and is subject to change. \"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"We will walk through the process of creating an \", _jsx(_components.a, {\n href: \"/workflows/sdk/automation/overview\",\n children: \"automation\"\n }), \" using the \", _jsx(_components.code, {\n children: \"Data Addition\"\n }), \" trigger type on Latch which will run a \", _jsx(_components.em, {\n children: \"target workflow\"\n }), \" on all children of the target directory. We assume that you understand how to write and register \", _jsx(_components.a, {\n href: \"/workflows/sdk/defining-a-workflow/what-is-a-workflow\",\n children: \"Workflows\"\n }), \" on Latch.\"]\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"Prerequisites:\"\n })\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.em, {\n children: \"Target directory\"\n }), \" in \", _jsx(_components.a, {\n href: \"https://console.latch.bio/data\",\n children: \"Latch Data\"\n }), \": this is the folder which is watched by the automation. The automation workflow will be triggered if a child is added to this folder.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"Terms:\"\n })\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.em, {\n children: \"Automation Workflow\"\n }), \": workflow which will be called by automation. This is the workflow we create in \", _jsx(_components.a, {\n href: \"#3-create-the-automation-workflow\",\n children: \"steps 3-5\"\n }), \" of this tutorial.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.em, {\n children: \"Target Workflow\"\n }), \": workflow which will be ran by automation workflow on child of the \", _jsx(_components.em, {\n children: \"target directory\"\n }), \". This workflow should contain the logic on how to process the files in child directories. This is the workflow we create in \", _jsx(_components.a, {\n href: \"#1-create-the-target-workflow\",\n children: \"step 1\"\n }), \" of this tutorial.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.em, {\n children: \"Registry Table\"\n }), \": we use a Registry Table in this tutorial to record child directories which are processed by the target workflow to avoid reprocessing same directories in consequent runs of automation. We create this table in \", _jsx(_components.a, {\n href: \"#2-create-a-new-registry-table\",\n children: \"step 2\"\n }), \" of this tutorial.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(Heading, {\n level: \"2\",\n id: \"1-create-the-target-workflow\",\n children: \"1: Create the Target Workflow\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"This example requires another \", _jsx(_components.em, {\n children: \"target workflow\"\n }), \" which will get executes on every child folder when \", _jsx(_components.em, {\n children: \"automation workflow\"\n }), \" gets triggered. Below is a simple workflow example which reads every file in a child directory and prints out its Latch Path.\"]\n }), \"\\n\", _jsxs(_components.ol, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [\"Initialize a new workflow using \", _jsx(_components.code, {\n children: \"latch init test-workflow\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Replace \", _jsx(_components.code, {\n children: \"__init__.py\"\n }), \" and \", _jsx(_components.code, {\n children: \"task.py\"\n }), \" with the following sample code.\", \"\\n\", _jsx(CodeBlock, {\n filename: \"\",\n expandable: \"false\",\n children: _jsx(_components.pre, {\n className: \"language-python\",\n children: _jsxs(_components.code, {\n className: \"language-python\",\n children: [_jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token comment\",\n children: \"# __init__.py\"\n })\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" wf\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"task \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" task\"]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" latch\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"resources\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"workflow \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" workflow\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" latch\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"types\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"directory \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" LatchDir\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" LatchOutputDir\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" latch\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"types\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), _jsx(_components.span, {\n className: \"token builtin\",\n children: \"file\"\n }), \" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" LatchFile\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" latch\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"types\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"metadata \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" LatchAuthor\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" LatchMetadata\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" LatchParameter\"]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\"metadata \", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \" LatchMetadata\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" display_name\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"Target Workflow\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" author\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \"LatchAuthor\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" name\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"Your Name\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" parameters\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"input_directory\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" LatchParameter\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" display_name\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"Input Directory\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" batch_table_column\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), _jsx(_components.span, {\n className: \"token boolean\",\n children: \"True\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# Show this parameter in batched mode.\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"output_directory\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" LatchParameter\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" display_name\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"Output Directory\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" batch_table_column\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), _jsx(_components.span, {\n className: \"token boolean\",\n children: \"True\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# Show this parameter in batched mode.\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })\n }), \"\\n\", \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token decorator annotation punctuation\",\n children: \"@workflow\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), \"metadata\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"def\"\n }), \" \", _jsx(_components.span, {\n className: \"token function\",\n children: \"template_workflow\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" input_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" LatchDir\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" output_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" LatchOutputDir\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), \" \", _jsx(_components.span, {\n className: \"token operator\",\n children: \"-\"\n }), _jsx(_components.span, {\n className: \"token operator\",\n children: \"\u003e\"\n }), \" LatchOutputDir\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"return\"\n }), \" task\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), \"input_directory\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \"input_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" output_directory\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \"output_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsx(CodeBlock, {\n filename: \"\",\n expandable: \"false\",\n children: _jsx(_components.pre, {\n className: \"language-python\",\n children: _jsxs(_components.code, {\n className: \"language-python\",\n children: [_jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token comment\",\n children: \"# task.py\"\n })\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" os\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" logging \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" Logger\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" urllib\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"parse \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" urljoin\"]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" latch \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" message\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" latch\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"resources\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"tasks \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" small_task\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" latch\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"types\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"directory \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" LatchDir\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" LatchFile\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" LatchOutputDir\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" latch\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"account \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" Account\"]\n }), \"\\n\", \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\"log \", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \" Logger\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"wf.task\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\", \"\\n\", \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token decorator annotation punctuation\",\n children: \"@small_task\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"def\"\n }), \" \", _jsx(_components.span, {\n className: \"token function\",\n children: \"task\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), \"input_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" LatchDir\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" output_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" LatchOutputDir\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), \" \", _jsx(_components.span, {\n className: \"token operator\",\n children: \"-\"\n }), _jsx(_components.span, {\n className: \"token operator\",\n children: \"\u003e\"\n }), \" LatchOutputDir\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n })]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# iterate through all directories of the child input directories using iterdir()\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"for\"\n }), \" \", _jsx(_components.span, {\n className: \"token builtin\",\n children: \"file\"\n }), \" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"in\"\n }), \" input_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"iterdir\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" log\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"error\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), _jsxs(_components.span, {\n className: \"token string-interpolation\",\n children: [_jsx(_components.span, {\n className: \"token string\",\n children: \"f\\\"\"\n }), _jsxs(_components.span, {\n className: \"token interpolation\",\n children: [_jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n }), _jsx(_components.span, {\n className: \"token builtin\",\n children: \"file\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n })]\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \" \"\n }), _jsxs(_components.span, {\n className: \"token interpolation\",\n children: [_jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n }), _jsx(_components.span, {\n className: \"token builtin\",\n children: \"file\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"remote_path\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n })]\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"\"\n })]\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), \" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# note: `error` is used here since its the highest logging level\"\n })]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"return\"\n }), \" output_directory\"]\n }), \"\\n\", \"\\n\"]\n })\n })\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Register the sample target workflow with Latch using \", _jsx(_components.code, {\n children: \"latch register --remote --yes test-workflow\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Record the ID of your workflow on the sidebar which we will use later in the example.\\n\", _jsx(_components.img, {\n src: \"https://mintlify.s3-us-west-1.amazonaws.com/latchbio/workflows/sdk/assets/automation/get-workflow-id.png\",\n alt: \"Workflow ID\"\n })]\n }), \"\\n\", _jsx(_components.li, {\n children: \"Test the workflow by running it on Latch\"\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"You will need to pass the parameters into your target workflow from your automation. To obtain the JSON representation of the workflow inputs, navigate to a previous execution of your workflow. Select \", _jsx(_components.strong, {\n children: \"Graph and Logs\"\n }), \", click on square box around the first task, and select \", _jsx(_components.strong, {\n children: \"Inputs\"\n }), \". Copy the workflow parameters inside the \", _jsx(_components.code, {\n children: \"literal\"\n }), \" object, and pass it to \", _jsx(_components.code, {\n children: \"params\"\n }), \".\\n\", _jsx(_components.br, {}), \"\\n\", _jsx(_components.br, {}), \"\\n\", \"i.e.\", \"\\n\", _jsx(CodeBlock, {\n filename: \"\",\n expandable: \"false\",\n children: _jsx(_components.pre, {\n className: \"language-json\",\n children: _jsxs(_components.code, {\n className: \"language-json\",\n children: [_jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token property\",\n children: \"\\\"literals\\\"\"\n }), _jsx(_components.span, {\n className: \"token operator\",\n children: \":\"\n }), \" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: \" # copy everything inside the brackets\"\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n })\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsx(_components.img, {\n src: \"https://mintlify.s3-us-west-1.amazonaws.com/latchbio/workflows/sdk/assets/automation/get-workflow-parameters.png\",\n alt: \"Workflow Parameters\"\n })]\n }), \"\\n\"]\n }), \"\\n\", _jsx(Heading, {\n level: \"2\",\n id: \"2-create-a-new-registry-table\",\n children: \"2: Create a New Registry Table\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"In this example, we record all processed child directories in the Registry Table to not reprocess directories when automation workflow is runs again. This example requires you to create a new table with no existing columns. The automation workflow will add a column \", _jsx(_components.code, {\n children: \"Processed Directory\"\n }), \" with the directory name of processed children.\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"For many common use cases, Registry serves as the location to track workflow inputs and outputs, and hence we include an example of it here. However, having a registry table is not required, if you don’t want to use Registry as a mean to track your inputs and outputs.\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"To create a new table to be used with the automation:\"\n }), \"\\n\", _jsxs(_components.ol, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [\"Go to \", _jsx(_components.a, {\n href: \"https://console.latch.bio/registry\",\n children: \"Latch Registry\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Select an existing project, and click \", _jsx(_components.code, {\n children: \"New Table\"\n }), \".\"]\n }), \"\\n\", _jsx(_components.li, {\n children: \"Record the Table ID on the sidebar which we will use later in the example.\"\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.img, {\n src: \"https://mintlify.s3-us-west-1.amazonaws.com/latchbio/workflows/sdk/assets/automation/get-table-id.png\",\n alt: \"Table ID\"\n })\n }), \"\\n\", _jsx(Heading, {\n level: \"2\",\n id: \"3-create-the-automation-workflow\",\n children: \"3: Create the Automation Workflow\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"This is the workflow which will be run when automation gets triggered. To create the automation workflow, clone the \", _jsx(_components.a, {\n href: \"https://github.com/latchbio/automation-wf\",\n children: \"Automation Workflow Template\"\n }), \" and navigate to the \", _jsx(_components.code, {\n children: \"automation-wf/wf\"\n }), \" directory.\"]\n }), \"\\n\", _jsx(CodeBlock, {\n filename: \"\",\n expandable: \"false\",\n children: _jsx(_components.pre, {\n className: \"language-shell-session\",\n children: _jsxs(_components.code, {\n className: \"language-shell-session\",\n children: [_jsx(_components.span, {\n className: \"\",\n children: _jsxs(_components.span, {\n className: \"token command\",\n children: [_jsx(_components.span, {\n className: \"token shell-symbol important\",\n children: \"$\"\n }), \" \", _jsxs(_components.span, {\n className: \"token bash language-bash\",\n children: [_jsx(_components.span, {\n className: \"token function\",\n children: \"git\"\n }), \" clone git@github.com:latchbio/automation-wf.git\"]\n })]\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token output\",\n children: \"Cloning into 'automation-wf'...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token output\",\n children: \"remote: Enumerating objects: 33, done.\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token output\",\n children: \"remote: Counting objects: 100% (33/33), done.\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token output\",\n children: \"remote: Compressing objects: 100% (24/24), done.\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token output\",\n children: \"remote: Total 33 (delta 9), reused 28 (delta 6), pack-reused 0\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token output\",\n children: \"Receiving objects: 100% (33/33), 8.52 KiB | 1.42 MiB/s, done.\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token output\",\n children: \"Resolving deltas: 100% (9/9), done.\"\n })\n }), \"\\n\", \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsxs(_components.span, {\n className: \"token command\",\n children: [_jsx(_components.span, {\n className: \"token shell-symbol important\",\n children: \"$\"\n }), \" \", _jsxs(_components.span, {\n className: \"token bash language-bash\",\n children: [_jsx(_components.span, {\n className: \"token builtin class-name\",\n children: \"cd\"\n }), \" automation-wf/wf\"]\n })]\n })\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsx(_components.p, {\n children: \"File Tree:\"\n }), \"\\n\", _jsx(CodeBlock, {\n filename: \"\",\n expandable: \"false\",\n children: _jsx(_components.pre, {\n className: \"language-shell-session\",\n children: _jsxs(_components.code, {\n className: \"language-shell-session\",\n children: [_jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token output\",\n children: \"├── Dockerfile\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token output\",\n children: \"├── README.md\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token output\",\n children: \"├── version\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token output\",\n children: \"└── wf\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token output\",\n children: \" ├── __init__.py\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token output\",\n children: \" ├── automation.py\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token output\",\n children: \" └── util.py\"\n })\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"__init__.py\"\n }), \" calls the automation task defined in \", _jsx(_components.code, {\n children: \"automation.py\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"automation.py\"\n }), \" contains the Python logic to determine how a workflow should be launched.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"util.py\"\n }), \" contains the utility function which launches target workflow.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(Heading, {\n level: \"2\",\n id: \"4-configure-the-target-workflow\",\n children: \"4. Configure the Target Workflow\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"To specify the target workflow and the registry table which you have just created, configure the following parameters in \", _jsx(_components.code, {\n children: \"wf/__init__.py\"\n }), \" and specify your name in workflow metadata:\"]\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"output_directory\"\n }), \": The Latch Path to the output folder which this automation workflow will populate. i.e. \", _jsx(_components.code, {\n children: \"latch://...\"\n })]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"target_wf_id\"\n }), \": The ID of the target workflow that you have just created.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"params\"\n }), \": The parameters for your workflow. Refer to \", _jsx(_components.a, {\n href: \"#1-create-the-target-workflow\",\n children: \"Create The Target Workflow\"\n }), \" to get the parameters.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"table_id\"\n }), \": The ID of the table which you created that stores metadata for this automation. Refer to \", _jsx(_components.a, {\n href: \"#2-create-a-new-registry-table\",\n children: \"Create A New Registry Table\"\n }), \" to create a table and get the ID.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.blockquote, {\n children: [\"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Important\"\n }), \":\\nCurrently, automations are only passing \", _jsx(_components.code, {\n children: \"input_directory\"\n }), \" as the parameter to the automation workflow. If your workflow has different parameters automation will fail to start it.\\n\", _jsx(_components.br, {}), \"\\n\", \"In case you need more parameters to pass to your automation workflow, we suggest to hard-code them into the workflow while we are working on adding parameter support for automations.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(CodeBlock, {\n filename: \"\",\n expandable: \"false\",\n children: _jsx(_components.pre, {\n className: \"language-python\",\n children: _jsxs(_components.code, {\n className: \"language-python\",\n children: [_jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token comment\",\n children: \"# __init__.py​\"\n })\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" latch\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"resources\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"workflow \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" workflow\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" latch\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"types\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"directory \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" LatchDir\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" LatchOutputDir\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" latch\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"types\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"metadata \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" LatchAuthor\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" LatchMetadata\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" LatchParameter\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" wf\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"automation \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" automation_task\"]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\"metadata \", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \" LatchMetadata\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# MODIFY NAMING METADATA BELOW\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" display_name\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"Automation Template\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" author\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \"LatchAuthor\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" name\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"Your Name Here\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# MODIFY NAMING METADATA ABOVE\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# IMPORTANT: these exact parameters are required for the workflow to work with automations\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" parameters\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"input_directory\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" LatchParameter\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" display_name\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"Input Directory\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })\n }), \"\\n\", \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token decorator annotation punctuation\",\n children: \"@workflow\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), \"metadata\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"def\"\n }), \" \", _jsx(_components.span, {\n className: \"token function\",\n children: \"automation_workflow\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), \"input_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" LatchDir\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), \" \", _jsx(_components.span, {\n className: \"token operator\",\n children: \"-\"\n }), _jsx(_components.span, {\n className: \"token operator\",\n children: \"\u003e\"\n }), \" \", _jsx(_components.span, {\n className: \"token boolean\",\n children: \"None\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" output_directory \", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \" LatchOutputDir\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" path\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"latch://FIXME\\\"\"\n }), \" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# fixme: change to remote path of desired output directory\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" automation_task\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" input_directory\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \"input_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" output_directory\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \"output_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" target_wf_id\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"FIXME\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# fixme: change wf_id to the desired workflow id\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" table_id\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"FIXME\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# fixme: change table_id to the desired registry table\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\", \"\\n\"]\n })\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"(Optional) Change the parameters object in \", _jsx(_components.code, {\n children: \"automation.py\"\n }), \" from \", _jsx(_components.a, {\n href: \"#1-create-the-target-workflow\",\n children: \"step 1.6\"\n }), \" if your target workflow takes different parameters than \", _jsx(_components.code, {\n children: \"input_directory\"\n }), \" and \", _jsx(_components.code, {\n children: \"output_directory\"\n }), \":\"]\n }), \"\\n\", _jsx(CodeBlock, {\n filename: \"\",\n expandable: \"false\",\n children: _jsx(_components.pre, {\n className: \"language-python\",\n children: _jsxs(_components.code, {\n className: \"language-python\",\n children: [_jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token comment\",\n children: \"# automation.py\"\n })\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n })]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\"params \", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"input_directory\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"scalar\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"blob\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"metadata\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"type\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"dimensionality\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"MULTIPART\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"uri\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" input_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"remote_path\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"output_directory\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"scalar\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"blob\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"metadata\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"type\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"dimensionality\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"MULTIPART\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"uri\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" output_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"remote_path\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n })]\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Usage Notes\"\n }), \":\"]\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [\"The \", _jsx(_components.code, {\n children: \"input_directory\"\n }), \" refers to the child directory (i.e. the trigger directory) to be passed to the target workflow.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"The \", _jsx(_components.code, {\n children: \"output_directory\"\n }), \" refers to directory where the output of the target workflow will be stored.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(Heading, {\n level: \"2\",\n id: \"5-optional-modify-automation-logic\",\n children: \"5. (Optional) Modify Automation Logic\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The file \", _jsx(_components.code, {\n children: \"wf/automation.py\"\n }), \" contains the logic that determines how an execution for the target workflow should be launched.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The \", _jsx(_components.code, {\n children: \"automation_task\"\n }), \" defines the logic that is used to launch the workflow. The code below checks a registry table to see whether an output directory exists, and launches an execution for the target workflow if that is not the case.\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Modify the function below to change the logic for launching target workflows.\"\n }), \"\\n\", _jsx(CodeBlock, {\n filename: \"\",\n expandable: \"false\",\n children: _jsx(_components.pre, {\n className: \"language-python\",\n children: _jsxs(_components.code, {\n className: \"language-python\",\n children: [_jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token comment\",\n children: \"# automation.py\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" uuid\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" typing \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" Set\"]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" latch\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"registry\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"table \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" Table\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" latch\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"resources\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"tasks \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" small_task\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" latch\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"types\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"directory \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" LatchDir\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" LatchOutputDir\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" latch\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"types\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), _jsx(_components.span, {\n className: \"token builtin\",\n children: \"file\"\n }), \" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" LatchFile\"]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"utils \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" launch_workflow\"]\n }), \"\\n\", \"\\n\", \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token decorator annotation punctuation\",\n children: \"@small_task\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"def\"\n }), \" \", _jsx(_components.span, {\n className: \"token function\",\n children: \"automation_task\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" input_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" LatchDir\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" output_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" LatchOutputDir\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" target_wf_id\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" \", _jsx(_components.span, {\n className: \"token builtin\",\n children: \"str\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" table_id\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" \", _jsx(_components.span, {\n className: \"token builtin\",\n children: \"str\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), \" \", _jsx(_components.span, {\n className: \"token operator\",\n children: \"-\"\n }), _jsx(_components.span, {\n className: \"token operator\",\n children: \"\u003e\"\n }), \" \", _jsx(_components.span, {\n className: \"token boolean\",\n children: \"None\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"\\\"\"\n }), \"\\\"\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" Logic on how to process the \", _jsx(_components.span, {\n className: \"token builtin\",\n children: \"input\"\n }), \" directory \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"and\"\n }), \" launch the target workflows\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"\\\"\"\n }), \"\\\"\"]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# fetch the table using Latch SDK\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" automation_table \", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \" Table\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), \"table_id\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" processed_directory_column \", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"Processed Directory\\\"\"\n })]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# [PARAMS OMITTED]\"\n })]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# check if the provided table contains column `Processed Directory` and creates one if it isn't present\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# we use Latch SDK to get the columns of the table and try to get the column by name\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"if\"\n }), \" automation_table\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"get_columns\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"get\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), \"processed_directory_column\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" \", _jsx(_components.span, {\n className: \"token boolean\",\n children: \"None\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), \" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"is\"\n }), \" \", _jsx(_components.span, {\n className: \"token boolean\",\n children: \"None\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"with\"\n }), \" automation_table\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"update\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), \" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"as\"\n }), \" automation_table_updater\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# create an update context for the table\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" automation_table_updater\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"upsert_column\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), \"processed_directory_column\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" LatchDir\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# fetch all the directories that have been processed and recorded in the Registry table previously\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" resolved_directories\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" Set\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"[\"\n }), _jsx(_components.span, {\n className: \"token builtin\",\n children: \"str\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"]\"\n }), \" \", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \" \", _jsx(_components.span, {\n className: \"token builtin\",\n children: \"set\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# list_records() returns a generator of records(rows) of the Registry Table\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"for\"\n }), \" page \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"in\"\n }), \" automation_table\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"list_records\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"for\"\n }), \" _\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" record \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"in\"\n }), \" page\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"items\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" value \", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \" record\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"get_values\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"[\"\n }), \"processed_directory_column\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"]\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"assert\"\n }), \" \", _jsx(_components.span, {\n className: \"token builtin\",\n children: \"isinstance\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" value\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" LatchDir\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), \" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# we only allow processing of child directories\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" resolved_directories\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"add\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), _jsx(_components.span, {\n className: \"token builtin\",\n children: \"str\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), \"value\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"assert\"\n }), \" \", _jsx(_components.span, {\n className: \"token builtin\",\n children: \"isinstance\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), \"input_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"remote_path\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" \", _jsx(_components.span, {\n className: \"token builtin\",\n children: \"str\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"assert\"\n }), \" \", _jsx(_components.span, {\n className: \"token builtin\",\n children: \"isinstance\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), \"output_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"remote_path\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" \", _jsx(_components.span, {\n className: \"token builtin\",\n children: \"str\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# Launch the target workflow for each child directory which hasn't been processed yet.\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# Record the processed directory in the Registry table.\"\n })]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# iterdir() returns an iterator of the child files and directories of the input directory\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"for\"\n }), \" child \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"in\"\n }), \" input_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"iterdir\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# skip files, output directory and directories that have been processed\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"if\"\n }), \" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token builtin\",\n children: \"isinstance\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), \"child\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" LatchFile\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"or\"\n }), \" \", _jsx(_components.span, {\n className: \"token builtin\",\n children: \"str\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), \"child\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), \" \", _jsx(_components.span, {\n className: \"token operator\",\n children: \"==\"\n }), \" \", _jsx(_components.span, {\n className: \"token builtin\",\n children: \"str\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), \"output_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"or\"\n }), \" \", _jsx(_components.span, {\n className: \"token builtin\",\n children: \"str\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), \"child\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), \" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"in\"\n }), \" resolved_directories\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"continue\"\n })]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"with\"\n }), \" automation_table\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"update\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), \" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"as\"\n }), \" automation_table_updater\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# use a util function to launch the target workflow with the right parameters\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" launch_workflow\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" target_wf_id\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \"target_wf_id\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" params\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \"params\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# update registry table with the processed directory\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" automation_table_updater\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"upsert_record\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token builtin\",\n children: \"str\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), \"uuid\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"uuid4\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token operator\",\n children: \"**\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" processed_directory_column\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" child\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsx(Heading, {\n level: \"2\",\n id: \"5-register-automation-workflow\",\n children: \"5. Register Automation Workflow\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"Register the automation workflow to your Latch workspace.\"\n }), \"\\n\", _jsx(CodeBlock, {\n filename: \"\",\n expandable: \"false\",\n children: _jsx(_components.pre, {\n className: \"language-shell-session\",\n children: _jsxs(_components.code, {\n className: \"language-shell-session\",\n children: [_jsx(_components.span, {\n className: \"\",\n children: _jsxs(_components.span, {\n className: \"token command\",\n children: [_jsx(_components.span, {\n className: \"token shell-symbol important\",\n children: \"$\"\n }), \" \", _jsxs(_components.span, {\n className: \"token bash language-bash\",\n children: [\"latch register \", _jsx(_components.span, {\n className: \"token parameter variable\",\n children: \"--remote\"\n }), \" \", _jsx(_components.span, {\n className: \"token parameter variable\",\n children: \"--yes\"\n }), \" automation-wf\"]\n })]\n })\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsx(Heading, {\n level: \"2\",\n id: \"6-create-automation\",\n children: \"6. Create Automation\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Navigate to \", _jsx(_components.a, {\n href: \"https://console.latch.bio/automations\",\n children: \"Automations\"\n }), \" tab via \", _jsx(_components.strong, {\n children: \"Worfklows\"\n }), \" \u003e \", _jsx(_components.strong, {\n children: \"Automations\"\n }), \" and click on the \", _jsx(_components.strong, {\n children: \"Create Automation\"\n }), \" button.\"]\n }), \"\\n\", _jsxs(_components.ol, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [\"\\n\", _jsxs(_components.p, {\n children: [\"Input an \", _jsx(_components.strong, {\n children: \"Automation Name\"\n }), \" and \", _jsx(_components.strong, {\n children: \"Description\"\n }), \".\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"\\n\", _jsxs(_components.p, {\n children: [\"Select the \", _jsx(_components.code, {\n children: \"Event Type\"\n }), \" as \", _jsx(_components.code, {\n children: \"Data Added\"\n }), \".\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"\\n\", _jsxs(_components.p, {\n children: [\"Specify \", _jsx(_components.code, {\n children: \"Follow-up Update Period\"\n }), \" to something short like 30 seconds to make your automation easy to test.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"\\n\", _jsxs(_components.p, {\n children: [\"Select a folder where files/folders will be uploaded using the \", _jsx(_components.code, {\n children: \"Select Target\"\n }), \" button. Any items uploaded to this folder will trigger the automation workflow.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"\\n\", _jsx(_components.p, {\n children: \"Select the automation workflow that you have just registered with Latch.\"\n }), \"\\n\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.img, {\n src: \"https://mintlify.s3-us-west-1.amazonaws.com/latchbio/workflows/sdk/assets/automation/create-ldata-automation-example.png\",\n alt: \"Create Ldata Automation Example\"\n })\n }), \"\\n\", _jsx(Heading, {\n level: \"2\",\n id: \"7-test-your-automation\",\n children: \"7. Test Your Automation\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"To test your automation, go to the target directory that you have specified when creating automation, and create a couple of folders. Upload any files to the folders, and wait for the trigger timer to expire.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Go to \", _jsx(_components.strong, {\n children: \"Worfklows\"\n }), \" \u003e \", _jsx(_components.strong, {\n children: \"All Executions\"\n }), \". There should be 1 automation workflow execution, and a target workflow execution for each child in your target directory. Each target workflow should print out\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = Object.assign({}, _provideComponents(), props.components);\n return MDXLayout ? _jsx(MDXLayout, Object.assign({}, props, {\n children: _jsx(_createMdxContent, props)\n })) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\nfunction _missingMdxReference(id, component) {\n throw new Error(\"Expected \" + (component ? \"component\" : \"object\") + \" `\" + id + \"` to be defined: you likely forgot to import, pass, or provide it.\");\n}\n","frontmatter":{},"scope":{"mintConfig":{"$schema":"https://mintlify.com/schema.json","name":"LatchBio","logo":{"light":"https://mintlify.s3-us-west-1.amazonaws.com/latchbio/logo/light.svg","dark":"https://mintlify.s3-us-west-1.amazonaws.com/latchbio/logo/dark.svg"},"favicon":"/favicon.png","colors":{"primary":"#001AAE","light":"#92A2FF","dark":"#92A2FF"},"topbarCtaButton":{"name":"Sign Up","url":"https://console.latch.bio/signup"},"topbarLinks":[{"url":"mailto:support@latch.bio","name":"Contact Us","_id":"672464fb85507cebe4ae6679"},{"url":"https://console.latch.bio/","name":"Log In","_id":"672464fb85507cebe4ae667a"}],"navigation":[{"group":"Introduction","pages":["start/introduction","start/quickstart"]},{"group":"Data","pages":["data/overview","data/basic-uploading-and-downloading","data/mount-s3-bucket","data/mount-gcp-bucket","data/basespace-downloader","data/data-command-line","data/sharing"]},{"group":"Visualizations","pages":["data/visualizations/fastqc","data/visualizations/cellxgene",{"group":"Interactive Genome Viewer (IGV)","pages":["data/visualizations/igv","data/visualizations/igv-setting-defaults","data/visualizations/igv-reference-genomes"]}]},{"group":"Registry","pages":["registry/what-is-a-registry","registry/create-a-project",{"group":"Bring Data into Registry","pages":["registry/add-records-to-a-table/single-records","registry/add-records-to-a-table/bulk-link","registry/add-records-to-a-table/import-data","registry/benchling-sync"]},"registry/connect-records-across-tables"]},{"group":"SDK","pages":["registry/sdk/import-registry-records","registry/sdk/latch-sdk-registry-integration","registry/sdk/account-objects","registry/sdk/registry-projects","registry/sdk/table-objects","registry/sdk/record-objects"]},{"group":"Overview","pages":["workflows/overview"]},{"group":"Workflows","pages":[{"group":"Verified Workflows","pages":[{"group":"Bulk RNA-seq","pages":["workflows/bulk-rna-seq-deep-dive","workflows/bulk-rna-seq"]},{"group":"ATAC-seq","pages":["workflows/ATAC-Seq-Deep-Dive","workflows/ATAC-Seq"]},"workflows/crispresso2","workflows/cas-offinder","workflows/crispor","workflows/alphafold",{"group":"MAGeCK","pages":["workflows/mageck-overview","workflows/mageck-count","workflows/mageck-test","workflows/mageck-mle","workflows/mageck-pathway","workflows/mageck-plot"]}]},"workflows/csv-import","workflows/resource-monitoring"]},{"group":"Python SDK","pages":["workflows/sdk/getting-started/quick-start","workflows/sdk/getting-started/authorizing-your-own-workflow",{"group":"Workflow Concepts","pages":["workflows/sdk/defining-a-workflow/what-is-a-workflow","workflows/sdk/defining-a-workflow/split-tasks",{"group":"Workflow Environment","pages":["workflows/sdk/defining-a-workflow/workflow-environment/overview","workflows/sdk/defining-a-workflow/workflow-environment/environments-for-individual-tasks","workflows/sdk/defining-a-workflow/workflow-environment/common-dockfile-patterns"]},"workflows/sdk/defining-a-workflow/latch-urls","workflows/sdk/defining-a-workflow/working-with-files","workflows/sdk/defining-a-workflow/legacy-file-support",{"group":"Customizing Your Interface","pages":["workflows/sdk/defining-a-workflow/customizing-your-interface/overview","workflows/sdk/defining-a-workflow/customizing-your-interface/parameter-types","workflows/sdk/defining-a-workflow/customizing-your-interface/workflow-documentation","workflows/sdk/defining-a-workflow/customizing-your-interface/previewing-workflow","workflows/sdk/defining-a-workflow/customizing-your-interface/forks-flows","workflows/sdk/defining-a-workflow/customizing-your-interface/results"]},"workflows/sdk/defining-a-workflow/messages","workflows/sdk/defining-a-workflow/defining-cloud-resources","workflows/sdk/defining-a-workflow/caching","workflows/sdk/defining-a-workflow/conditional-sections","workflows/sdk/defining-a-workflow/map-task","workflows/sdk/defining-a-workflow/storing-and-using-secrets","workflows/sdk/defining-a-workflow/versioning"]},{"group":"Testing and Debugging a Workflow","pages":["workflows/sdk/testing-and-debugging-a-workflow/development-and-debugging","workflows/sdk/testing-and-debugging-a-workflow/learning-through-an-example","workflows/sdk/testing-and-debugging-a-workflow/remote-execution"]}]},{"group":"Nextflow","pages":["workflows/sdk/nextflow/overview","workflows/sdk/nextflow/tutorial","workflows/sdk/nextflow/profiles","workflows/sdk/nextflow/caching","workflows/sdk/nextflow/registries",{"group":"Customizing Your Interface","pages":["workflows/sdk/nextflow/interface/about","workflows/sdk/nextflow/interface/results","workflows/sdk/nextflow/interface/param-validation","workflows/sdk/nextflow/interface/updating-entrypoint"]},"workflows/sdk/nextflow/dependencies","workflows/sdk/nextflow/gpus"]},{"group":"Snakemake","pages":["workflows/sdk/snakemake/quickstart","workflows/sdk/snakemake/cloud",{"group":"Advanced Configuration","pages":["workflows/sdk/snakemake/configuration/registries","workflows/sdk/snakemake/configuration/resources","workflows/sdk/snakemake/configuration/caching"]},"workflows/sdk/snakemake/tutorial","workflows/sdk/snakemake/debugging","workflows/sdk/snakemake/troubleshooting","workflows/sdk/snakemake/backend"]},{"group":"Automation","pages":["workflows/sdk/automation/overview","workflows/sdk/automation/example-data-addition","workflows/sdk/automation/example-interval"]},{"group":"Pods","pages":["pods/overview","pods/getting-started","pods/mount-data",{"group":"Shutdown Configuration","pages":["pods/auto-shutdown","pods/hard-shutdown"]},"pods/custom-app","pods/templates","pods/file-viewer",{"group":"Access \u0026 Integrations","pages":["pods/ssh","pods/integration-with-vscode","pods/integration-with-github"]}]},{"group":"Plots","pages":["plots/overview",{"group":"Basics","pages":["plots/basics","plots/developer/getting-started","plots/layouts","plots/developer/reactivity"]},{"group":"Data Plotting","pages":["plots/plotting/overview","plots/plotting/plot-types","plots/developer/custom-plots","plots/plotting/faceting","plots/plotting/styling","plots/plotting/error-bars","plots/plotting/selecting-points","plots/plotting/filtering"]},{"group":"Data Transformations","pages":["plots/transformations/overview","plots/transformations/widget-types","plots/transformations/outputs","plots/transformations/description-text"]},"plots/table-display-cell","plots/text-cell",{"group":"Developers","pages":["plots/developer/reactivity","plots/developer/ssh","plots/developer/dependencies"]},{"group":"Use Cases","pages":["plots/templates/overview","plots/templates/qpcr"]}]},{"group":"Overview","pages":["admin/overview"]},{"group":"Workspaces","pages":["admin/workspaces/overview","admin/workspaces/creating-new-workspace","admin/workspaces/inviting-members","admin/workspaces/roles","admin/workspaces/billing","admin/workspaces/move-copy-data","admin/workspaces/workspace-pod-templates"]},{"group":"Organizations: Manage Workspaces","pages":["admin/orgs/overview","admin/orgs/about","admin/orgs/adding-workspaces","admin/orgs/managing-members","admin/orgs/roles","admin/orgs/transfer-credits","admin/orgs/security","admin/orgs/analysis-packages"]},{"group":"Resources","pages":["resources/faq","resources/privacy-policy","resources/terms-of-service"]}],"primaryTab":{"name":"Documentation"},"anchors":[{"name":"Introduction","url":"start","icon":"house","_id":"672464fb85507cebe4ae6671"},{"name":"Data","url":"data","icon":"file-chart-column","_id":"672464fb85507cebe4ae6672"},{"name":"Registry","url":"registry","icon":"table","_id":"672464fb85507cebe4ae6673"},{"name":"Workflows \u0026 SDK","url":"workflows","icon":"screwdriver-wrench","_id":"672464fb85507cebe4ae6674"},{"name":"Pods","url":"pods","icon":"hexagon","_id":"672464fb85507cebe4ae6675"},{"name":"Plots","url":"plots","icon":"chart-scatter-bubble","_id":"672464fb85507cebe4ae6676"},{"name":"Administration","url":"admin","icon":"screen-users","_id":"672464fb85507cebe4ae6677"},{"name":"Resources","url":"resources","icon":"clipboard-question","_id":"672464fb85507cebe4ae6678"}],"tabs":[{"name":"API References","url":"https://docs.latch.bio/api/modules.html","_id":"672464fb85507cebe4ae666d"},{"name":"Blog","url":"https://latchbio.substack.com/","_id":"672464fb85507cebe4ae666e"},{"name":"Website","url":"https://latch.bio/","_id":"672464fb85507cebe4ae666f"},{"name":"Change Log","url":"https://latchbio.notion.site/LatchBio-Product-Change-Logs-ca76a6ae05a74a4daf78cb4006ad80ac","_id":"672464fb85507cebe4ae6670"}],"feedback":{"thumbsRating":true,"raiseIssue":true},"redirects":[{"destination":"/start/introduction","source":"/wiki/introduction","_id":"672464fb85507cebe4ae6650"},{"destination":"/start/quickstart","source":"/wiki/getting-started","_id":"672464fb85507cebe4ae6651"},{"destination":"/start/introduction","source":"/wiki","_id":"672464fb85507cebe4ae6652"},{"destination":"/data/:slug*","source":"/wiki/data/:slug*","_id":"672464fb85507cebe4ae6653"},{"destination":"/data/overview","source":"/wiki/data","_id":"672464fb85507cebe4ae6654"},{"destination":"/data/visualizations/:slug*","source":"/wiki/visualizations/:slug*","_id":"672464fb85507cebe4ae6655"},{"destination":"/data/visualizations/fastqc","source":"/wiki/visualizations","_id":"672464fb85507cebe4ae6656"},{"destination":"/registry/:slug*","source":"/wiki/registry/:slug*","_id":"672464fb85507cebe4ae6657"},{"destination":"/registry/what-is-a-registry","source":"/wiki/registry","_id":"672464fb85507cebe4ae6658"},{"destination":"/workflows/:slug*","source":"/wiki/workflows/:slug*","_id":"672464fb85507cebe4ae6659"},{"destination":"/workflows/csv-import","source":"/wiki/workflow-helpers/csv-import","_id":"672464fb85507cebe4ae665a"},{"destination":"/workflows/overview","source":"/wiki/workflows","_id":"672464fb85507cebe4ae665b"},{"destination":"/workflows/overview","source":"/docs/getting-started/index","_id":"672464fb85507cebe4ae665c"},{"destination":"/pods/:slug*","source":"/wiki/pods/:slug*","_id":"672464fb85507cebe4ae665d"},{"destination":"/pods/overview","source":"/wiki/pods","_id":"672464fb85507cebe4ae665e"},{"destination":"/plots/:slug*","source":"/wiki/plots/:slug*","_id":"672464fb85507cebe4ae665f"},{"destination":"/plots/plotting/:slug*","source":"/wiki/plots/plotting/:slug*","_id":"672464fb85507cebe4ae6660"},{"destination":"/plots/developer/:slug*","source":"/wiki/plots/developer/:slug*","_id":"672464fb85507cebe4ae6661"},{"destination":"/plots/overview","source":"/wiki/plots/overview","_id":"672464fb85507cebe4ae6662"},{"destination":"/plots/overview","source":"/wiki/plots","_id":"672464fb85507cebe4ae6663"},{"destination":"/admin/workspaces/:slug*","source":"/wiki/workspaces/:slug*","_id":"672464fb85507cebe4ae6664"},{"destination":"/admin/workspaces/overview","source":"/wiki/workspaces","_id":"672464fb85507cebe4ae6665"},{"destination":"/admin/orgs/:slug*","source":"/wiki/organizations/:slug*","_id":"672464fb85507cebe4ae6666"},{"destination":"/admin/orgs/overview","source":"/wiki/organizations","_id":"672464fb85507cebe4ae6667"},{"destination":"/resources/:slug*","source":"/wiki/resources/:slug*","_id":"672464fb85507cebe4ae6668"},{"destination":"/resources/faq","source":"/wiki/resources","_id":"672464fb85507cebe4ae6669"},{"destination":"/workflows/sdk/:slug*","source":"/docs/:slug*","_id":"672464fb85507cebe4ae666a"},{"destination":"/workflows/overview#bring-your-own-workflow","source":"/docs","_id":"672464fb85507cebe4ae666b"},{"destination":"/workflows/overview","source":"/docs/quickstart/index","_id":"672464fb85507cebe4ae666c"}],"footerSocials":{"twitter":"https://twitter.com/latchbio","linkedin":"https://www.linkedin.com/company/latchbio/"},"analytics":{"koala":{"publicApiKey":"pk_0469d6299947a84c711662e1ed49f0fea8d7"}},"repo":{"github":{"owner":"latchbio","repo":"wiki","contentDirectory":"","deployBranch":"main","isPrivate":false}}},"pageMetadata":{"title":"Data Addition Trigger","description":null,"sidebarTitle":"Example Data Addition Trigger","icon":"table","iconType":"solid","href":"/workflows/sdk/automation/example-data-addition"}}},"mdxExtracts":{"tableOfContents":[{"title":"1: Create the Target Workflow","slug":"1-create-the-target-workflow","depth":2,"children":[]},{"title":"2: Create a New Registry Table","slug":"2-create-a-new-registry-table","depth":2,"children":[]},{"title":"3: Create the Automation Workflow","slug":"3-create-the-automation-workflow","depth":2,"children":[]},{"title":"4. Configure the Target Workflow","slug":"4-configure-the-target-workflow","depth":2,"children":[]},{"title":"5. (Optional) Modify Automation Logic","slug":"5-optional-modify-automation-logic","depth":2,"children":[]},{"title":"5. Register Automation Workflow","slug":"5-register-automation-workflow","depth":2,"children":[]},{"title":"6. Create Automation","slug":"6-create-automation","depth":2,"children":[]},{"title":"7. Test Your Automation","slug":"7-test-your-automation","depth":2,"children":[]}],"codeExamples":{}},"description":null,"pageData":{"navWithMetadata":[{"group":"Introduction","pages":[{"title":"What is LatchBio?","description":"Latch is a platform for you to store, analyze, and visualize multiomics data.","sidebarTitle":"What is LatchBio?","icon":"house","iconType":"solid","href":"/start/introduction"},{"title":"Quickstart","description":null,"icon":"play","iconType":"solid","href":"/start/quickstart"}]},{"group":"Data","pages":[{"title":"What is Latch Data?","description":"Latch Data is a cloud based file storage system built for storing biological data.","sidebarTitle":"Overview","icon":"magnifying-glass","iconType":"solid","href":"/data/overview"},{"title":"Basic Uploading and Downloading","description":null,"sidebarTitle":"Basic Uploading and Downloading","icon":"arrow-up-arrow-down","iconType":"solid","color":"#5D8EE9","href":"/data/basic-uploading-and-downloading"},{"title":"Mounting S3 Buckets","description":"Latch allows you to mount your own AWS S3 Buckets and use them the same as you would any data on Latch. All you need is to connect AWS account with Latch which will allow you to mount any buckets in that account onto Latch.","sidebarTitle":"Mounting S3 Buckets","icon":"aws","iconType":"solid","href":"/data/mount-s3-bucket"},{"title":"Mounting GCP Buckets","description":"Latch allows you to mount your own GCP Buckets and use them the same as you would any data on Latch.","sidebarTitle":"Mounting GCP Buckets","icon":"bucket","iconType":"solid","href":"/data/mount-gcp-bucket"},{"title":"BaseSpace Downloader","description":"This tutorial explains how to get an API key from BaseSpace that you can use to automatically import your sequencing runs into Latch.","sidebarTitle":"BaseSpace Downloader","icon":"cloud-arrow-up","iconType":"solid","href":"/data/basespace-downloader"},{"title":"Command Line Interface Data Upload/Download","description":null,"sidebarTitle":"Command Line Interface","icon":"square-terminal","iconType":"solid","href":"/data/data-command-line"},{"title":"Data Sharing","description":"Learn how to share your data on Latch","sidebarTitle":"Data Sharing","icon":"arrow-up-from-square","iconType":"regular","href":"/data/sharing"}]},{"group":"Visualizations","pages":[{"title":"FastQC","description":"FastQC aims to provide a simple way to do some quality control checks on raw sequence data coming from high throughput sequencing pipelines. It provides a modular set of analyses which you can use to give a quick impression of whether your data has any problems of which you should be aware before doing any further analysis.","icon":"magnifying-glass-chart","iconType":"solid","href":"/data/visualizations/fastqc"},{"title":"CELLxGENE","description":"CELLxGENE Explorer allows scientists to execute interactive analyses on a dataset to explore how patterns of gene expression are determined by environmental and genetic factors using an interactive speed no-code UI.","icon":"magnifying-glass-chart","iconType":"solid","href":"/data/visualizations/cellxgene"},{"group":"Interactive Genome Viewer (IGV)","pages":[{"title":"Using IGV on Latch","description":"The Integrative Genomics Viewer (IGV) is a high-performance, easy-to-use, interactive tool for the visual exploration of genomic data. BAM, Fasta, etc. files can be opened in an IGV Browser natively within the Latch Platform. ","icon":"magnifying-glass-chart","iconType":"solid","href":"/data/visualizations/igv"},{"title":"Setting Viewer Defaults for IGV on Latch","description":"Learn how to set default viewer settings when opening files in IGV on Latch","icon":"gear","iconType":"solid","href":"/data/visualizations/igv-setting-defaults"},{"title":"IGV Hosted Reference Genomes","description":"The IGV browser comes with many hosted options for common Reference Genomes to view Alignment Files to.","icon":"dna","iconType":"solid","href":"/data/visualizations/igv-reference-genomes"}]}]},{"group":"Registry","pages":[{"title":"What is Latch Registry?","description":"Connect your sample sheets, metadata, and analysis — all in one place.","sidebarTitle":"Overview","icon":"magnifying-glass","iconType":"solid","href":"/registry/what-is-a-registry"},{"title":"Registry Basics","description":"Learn how to set up your registry to manage your data.","sidebarTitle":"Registry Basics","icon":"table","iconType":"solid","href":"/registry/create-a-project"},{"group":"Bring Data into Registry","pages":[{"title":"Manually Create Single Records","description":null,"icon":"i-cursor","iconType":"solid","href":"/registry/add-records-to-a-table/single-records"},{"title":"Bulk Import Data Using a CSV","description":null,"icon":"file-import","iconType":"solid","href":"/registry/add-records-to-a-table/bulk-link"},{"title":"Bulk Link Sequencing Files to Existing Records","description":null,"icon":"link","iconType":"solid","href":"/registry/add-records-to-a-table/import-data"},{"title":"Benchling Integration","description":null,"icon":"rotate","iconType":"solid","href":"/registry/benchling-sync"}]},{"title":"Connect Records Across Tables","description":"As you centralize your biological data in Latch Registry, you will often find that some records are related or even dependent on one another. Linked records offer a powerful way for you to define relationships between records from different tables, enhancing your data analysis and enabling new insights that may have been difficult to discover without linked records.","icon":"merge","iconType":"solid","href":"/registry/connect-records-across-tables"}]},{"group":"SDK","pages":[{"title":"Import Registry Records in Latch SDK Workflows","description":null,"icon":"square-code","iconType":"solid","href":"/registry/sdk/import-registry-records"},{"title":"Using Registry in a Workflow","description":null,"icon":"table-tree","iconType":"solid","href":"/registry/sdk/latch-sdk-registry-integration"},{"title":"Account Objects","description":null,"icon":"user","iconType":"solid","href":"/registry/sdk/account-objects"},{"title":"Registry Projects","description":null,"icon":"diagram-project","iconType":"solid","href":"/registry/sdk/registry-projects"},{"title":"Table Objects","description":null,"icon":"table","iconType":"solid","href":"/registry/sdk/table-objects"},{"title":"Record Objects","description":null,"icon":"table-rows","iconType":"solid","href":"/registry/sdk/record-objects"}]},{"group":"Overview","pages":[{"title":"What are Latch Workflows?","description":"Latch's Workflow Manager comes with out-of-the-box community workflows and a Python SDK that allows uploading of custom workflows.","sidebarTitle":"Workflows \u0026 SDK","icon":"magnifying-glass","iconType":"solid","href":"/workflows/overview"}]},{"group":"Workflows","pages":[{"group":"Verified Workflows","pages":[{"group":"Bulk RNA-seq","pages":[{"title":"What is Bulk RNAseq?","description":null,"icon":"flask-gear","iconType":"solid","sidebarTitle":"Bulk RNA Seq Overview","href":"/workflows/bulk-rna-seq-deep-dive"},{"title":"Bulk RNAseq Quantification Walkthrough","description":null,"icon":"screwdriver-wrench","iconType":"solid","sidebarTitle":"Bulk RNA Seq","href":"/workflows/bulk-rna-seq"}]},{"group":"ATAC-seq","pages":[{"title":"What is ATAC seq?","description":null,"icon":"flask-gear","iconType":"solid","sidebarTitle":"ATAC Seq Overview","href":"/workflows/ATAC-Seq-Deep-Dive"},{"title":"","description":null,"icon":"screwdriver-wrench","iconType":"solid","sidebarTitle":"ATAC Seq","href":"/workflows/ATAC-Seq"}]},{"title":"CRISPResso2","description":"CRISPResso2 is a software pipeline for the analysis of genome editing experiments. It is designed to enable rapid and intuitive interpretation of results produced by amplicon sequencing.","href":"/workflows/crispresso2"},{"title":"CAS-OFFinder","description":"CAS-OFFinder is an algorithm that searches for potential off-target sites of Cas9 RNA-guided endonucleases. It is one of the most highly cited \u0026 consistent tools for this purpose.","href":"/workflows/cas-offinder"},{"title":"CRISPOR","description":"[CRISPOR](http://crispor.org/) is a website that helps select and express CRISPR guide sequences, described in two papers ([Gen Biol 2016](https://genomebiology.biomedcentral.com/articles/10.1186/s13059-016-1012-2) and [NAR 2018](https://academic.oup.com/nar/article/46/W1/W242/4995687)). In its default mode, the user pastes an input DNA sequence and chooses the genome.","href":"/workflows/crispor"},{"title":"AlphaFold","description":"AlphaFold produces highly accurate protein structure predictions from amino acid sequences.","href":"/workflows/alphafold"},{"group":"MAGeCK","pages":[{"title":"Overview - MAGeCK","description":"Model-based Analysis of Genome-wide CRISPR-Cas9 Knockout ","href":"/workflows/mageck-overview"},{"title":"MAGeCK - Count","description":"This is the count sub command from MAGeCK. This subcommand collects sgRNA read count information from fastq files or raw count files. The output count table can be used directly in the [MAGeCK Test](https://latch.wiki/mageck-test) or the [MAGeCK MLE](https://latch.wiki/mageck-mle) workflow.","href":"/workflows/mageck-count"},{"title":"MAGeCK - Test","description":"This is the test sub command from MAGeCK. This subcommand tests and ranks sgRNAs and genes based on the read count tables provided using [Robust Rank Aggregation](https://pubmed.ncbi.nlm.nih.gov/22247279/) (RRA). This subcommand takes the count summary file (*.count.txt) output from [MAGeCk Count](https://latch.wiki/mageck-count) and its outputs can be passed into [MAGeCk Pathway](https://latch.wiki/mageck-pathway) for gene pathway analysis and to [MAGeCK Plot](https://latch.wiki/mageck-plot) to generate graphics for selected genes.","href":"/workflows/mageck-test"},{"title":"MAGeCK - MLE","description":"This is the mle sub command from MAGeCK. Similar to [MAGeCk Test](https://latch.wiki/mageck-test), this subcommand outputs a gene ranking, but uses maximum-likelihood estimation for gene essentiality scores instead of RRA. This subcommand takes the count summary file (*.count.txt) output from [MAGeCk Count](https://latch.wiki/mageck-count).","href":"/workflows/mageck-mle"},{"title":"MAGeCK - Pathway","description":"This is the pathway sub command from MAGeCK. This subcommand takes the Gene Ranking output (*.gene_summary.txt) from [MAGeCK Test](https://latch.wiki/mageck-test) and invokes Gene Set Enrichment Analysis (GSEA) or RRA (Robust Rank Aggregation) to test if a pathway is enriched in one particular gene ranking.","href":"/workflows/mageck-pathway"},{"title":"MAGeCK - Plot","description":"This is the pathway sub command from MAGeCK. This subcommand takes the Gene Ranking output (*.gene_summary.txt) from [MAGeCK Test](https://latch.wiki/mageck-test) and invokes Gene Set Enrichment Analysis (GSEA) or RRA (Robust Rank Aggregation) to test if a pathway is enriched in one particular gene ranking.","href":"/workflows/mageck-plot"}]}]},{"title":"CSV Parameter Import","description":"Every workflow in Latch allows you to import a CSV containing values for its parameters. This is another way to import data when doing bulk runs of a workflow.","icon":"file-import","iconType":"solid","href":"/workflows/csv-import"},{"title":"Resource Monitoring","description":"Workflows on Latch provide visibility into the resource usage of each task execution, enabling developers to easily debug and optimize their workflow.","icon":"memory","iconType":"solid","href":"/workflows/resource-monitoring"}]},{"group":"Python SDK","pages":[{"title":"Quick Start","description":"","icon":"play","iconType":"solid","href":"/workflows/sdk/getting-started/quick-start"},{"title":"Authoring your Own Workflow","description":"In this demonstration, we will examine a workflow which sorts and assembles COVID sequencing data.","icon":"arrow-progress","iconType":"duotone","href":"/workflows/sdk/getting-started/authorizing-your-own-workflow"},{"group":"Workflow Concepts","pages":[{"title":"What is a Workflow?","description":"A workflow is an analysis that takes in some input, processes it in one or more steps and produces some output.","href":"/workflows/sdk/defining-a-workflow/what-is-a-workflow"},{"title":"When to split up a task into multiple tasks","description":"When building a workflow with multiple tasks, it can be difficult to decide when to split larger tasks into smaller tasks. Some of the tradeoffs are listed below to guide this decision:","sidebarTitle":"When to Split Up Tasks","href":"/workflows/sdk/defining-a-workflow/split-tasks"},{"group":"Workflow Environment","pages":[{"title":"Workflow Environment","description":"Workflow code is rarely free of dependencies. It may require python or system packages or make use of environment variables. For example, a task that downloads compressed reference data from AWS S3 will need the `aws-cli` and `unzip` [APT](https://en.wikipedia.org/wiki/APT_(software)) packages, then use the `pyyaml` python package to read the included metadata.","sidebarTitle":"Overview","href":"/workflows/sdk/defining-a-workflow/workflow-environment/overview"},{"title":"Environments for Individual Tasks","description":"Different tasks in a workflow may need different sets of dependencies. Creating a single shared environment can be problematic as the some part of the workflow image will be unused in each task and slow down that task's startup proportionally to the size of the extraneous chunk. Different dependencies might also need different system package versions in which case installing them together might be impractical. Instead, consider defining an individual environment for each task using the optional `dockerfile` parameter in the task definition. Include only the dependencies that each specific task needs.","href":"/workflows/sdk/defining-a-workflow/workflow-environment/environments-for-individual-tasks"},{"title":"Common Dockerfile patterns","description":null,"href":"/workflows/sdk/defining-a-workflow/workflow-environment/common-dockfile-patterns"}]},{"title":"Latch URLs","description":"Files and directories on Latch can be referred to in code or through the CLI using **Latch URLs**.","href":"/workflows/sdk/defining-a-workflow/latch-urls"},{"title":"Working with Remote Files","description":null,"href":"/workflows/sdk/defining-a-workflow/working-with-files"},{"title":"LatchFile / LatchDir","description":"When working with bioinformatics workflows, we are often passing around large files or directories between our tasks. These files are usually located in cloud object stores and are copied to the file systems of the machines on which the task is scheduled.","href":"/workflows/sdk/defining-a-workflow/legacy-file-support"},{"group":"Customizing Your Interface","pages":[{"title":"Customizing Your Interface","description":"Latch dynamically constructs the workflow interface based on the workflow function code and the `LatchMetadata` object.","sidebarTitle":"Overview","href":"/workflows/sdk/defining-a-workflow/customizing-your-interface/overview"},{"title":"Parameter Types","description":"The Latch SDK supports first-class static typing. All input parameters and output values must be annotated with types in the function signature. These type annotations validate task values and guide the construction of parameter-specific frontend components when your interface is generated at registration.","href":"/workflows/sdk/defining-a-workflow/customizing-your-interface/parameter-types"},{"title":"Workflow Documentation","description":"While most of the metadata of a workflow will be encapsulated in a LatchMetadata object, we still require a docstring in the body of the workflow function which specifies both a short and long-form description.","href":"/workflows/sdk/defining-a-workflow/customizing-your-interface/workflow-documentation"},{"title":"Previewing the Workflow Interface","description":"When iterating on the design of the workflow, it is helpful to preview the user interface locally using `latch preview`.","href":"/workflows/sdk/defining-a-workflow/customizing-your-interface/previewing-workflow"},{"title":"Flows","description":"Use these composable primitives to further customize your workflow interface.","href":"/workflows/sdk/defining-a-workflow/customizing-your-interface/forks-flows"},{"title":"Publishing Results","description":null,"href":"/workflows/sdk/defining-a-workflow/customizing-your-interface/results"}]},{"title":"Messages","description":"Task executions produce logs, displayed on the Latch console to provide users visibility into their workflows. However, these logs tend to be terribly verbose. It's tedious to sift through piles of logs looking for useful signals; instead, important information, warnings, and errors should be prominently displayed. This is accomplished through the Latch SDK's new messaging feature.","href":"/workflows/sdk/defining-a-workflow/messages"},{"title":"Defining Cloud Resources","description":"When a workflow is executed and tasks are scheduled, the machines needed to run the task are provisioned automatically and managed for the user until task completion. Tasks can be annotated with the resources they are expected to consume (eg. CPU, RAM, GPU) at runtime and these requests will be fullfilled during the scheduling process.","href":"/workflows/sdk/defining-a-workflow/defining-cloud-resources"},{"title":"Caching","description":"Caching allows workflow developers to reuse the results of previously run tasks to prevent wasted time and computation. This is helpful when running large batches of workflows with redundant inputs or when debugging errors in the middle of a workflow where upstream state can be reused.","href":"/workflows/sdk/defining-a-workflow/caching"},{"title":"Conditional Sections","description":"In order to support the functionality of an `if-elif-else` clause within the body of a workflow, we introduce the method `create_conditional_section`. This method creates a new conditional section in a workflow, allowing a user to conditionally execute a task based on the value of a task result.","href":"/workflows/sdk/defining-a-workflow/conditional-sections"},{"title":"Map Task","description":"There are many pipelines in bioinformatics that require running a processing step in parallel and aggregating their outputs at the end for downstream analysis. A prominent example of this is bulk RNA-sequencing, where alignment is performed to produce transcript abundances per sample, and gene counts of all samples are subsequently merged. Having a single count matrix makes it convenient to use in downstream steps, such as differential gene expression analysis. Another example is performing FastQC on multiple samples and summarizing the results in a MultiQC report.","href":"/workflows/sdk/defining-a-workflow/map-task"},{"title":"Storing and Using Secrets","description":"Often a workflow can depend on _secret data_, such as an API key, to function correctly. To make storing and using secret data easy, the Latch SDK comes with special utilities that handle this securely.","href":"/workflows/sdk/defining-a-workflow/storing-and-using-secrets"},{"title":"Versioning","description":null,"href":"/workflows/sdk/defining-a-workflow/versioning"}]},{"group":"Testing and Debugging a Workflow","pages":[{"title":"Development and Debugging","description":"When developing a workflow, it's helpful to run the task functions before executing the entire workflow in the cloud to debug the environment and logical issues. Since tasks run in a different environment than your local computer (namely, the one defined in your Dockerfile(s)), there may be discrepancies when running your code locally.To address this, the Latch SDK comes with a command that allows you to run tasks and debug your environment without having to reregister your workflow and run it through the UI.","href":"/workflows/sdk/testing-and-debugging-a-workflow/development-and-debugging"},{"title":"Learning through An Example","description":"We will walk through a quick end-to-end flow for testing and debugging a variant calling workflow to demonstrate how to use latch develop.","href":"/workflows/sdk/testing-and-debugging-a-workflow/learning-through-an-example"},{"title":"Remote Execution","description":"It is often desirable to be able to access a shell from within a running task of a workflow, to debug a misbehaving program or inspect some files for example.","href":"/workflows/sdk/testing-and-debugging-a-workflow/remote-execution"}]}]},{"group":"Nextflow","pages":[{"title":"Overview","description":null,"icon":"magnifying-glass","iconType":"solid","href":"/workflows/sdk/nextflow/overview"},{"title":"Tutorial","description":null,"icon":"book","iconType":"solid","href":"/workflows/sdk/nextflow/tutorial"},{"title":"Execution Profiles","description":null,"icon":"user","iconType":"solid","href":"/workflows/sdk/nextflow/profiles"},{"title":"Caching and Resuming","description":null,"icon":"window-restore","iconType":"solid","href":"/workflows/sdk/nextflow/caching"},{"title":"Private Registries","description":null,"icon":"lock","iconType":"solid","href":"/workflows/sdk/nextflow/registries"},{"group":"Customizing Your Interface","pages":[{"title":"About Page","description":null,"href":"/workflows/sdk/nextflow/interface/about"},{"title":"Publishing Results","description":null,"href":"/workflows/sdk/nextflow/interface/results"},{"title":"Parameter Validation","description":null,"href":"/workflows/sdk/nextflow/interface/param-validation"},{"title":"Updating the Entrypoint","description":null,"href":"/workflows/sdk/nextflow/interface/updating-entrypoint"}]},{"title":"Dependencies","description":null,"icon":"arrow-progress","iconType":"solid","href":"/workflows/sdk/nextflow/dependencies"},{"title":"Using GPU Accelerators","description":null,"icon":"microchip","iconType":"solid","href":"/workflows/sdk/nextflow/gpus"}]},{"group":"Snakemake","pages":[{"title":"Quick Start","description":null,"icon":"play","iconType":"solid","href":"/workflows/sdk/snakemake/quickstart"},{"title":"Snakemake Workflow Cloud Compatibility","description":null,"icon":"cloud","iconType":"solid","href":"/workflows/sdk/snakemake/cloud"},{"group":"Advanced Configuration","pages":[{"title":"Private Registries","description":null,"href":"/workflows/sdk/snakemake/configuration/registries"},{"title":null,"description":null,"href":"/workflows/sdk/snakemake/configuration/resources"},{"title":"Caching Snakemake Tasks","description":null,"href":"/workflows/sdk/snakemake/configuration/caching"}]},{"title":"Tutorial","description":"In this guide, we will walk through how to upload a simple Snakemake workflow to Latch.","icon":"book","iconType":"solid","href":"/workflows/sdk/snakemake/tutorial"},{"title":"Debugging Snakemake","description":null,"icon":"bug-slash","iconType":"solid","href":"/workflows/sdk/snakemake/debugging"},{"title":"Troubleshooting","description":"The following page outlines common problems with uploading Snakemake workflows and solutions.","icon":"bugs","iconType":"solid","href":"/workflows/sdk/snakemake/troubleshooting"},{"title":"Architecture Overview","description":null,"icon":"archway","iconType":"solid","href":"/workflows/sdk/snakemake/backend"}]},{"group":"Automation","pages":[{"title":"Workflows Automations","description":null,"icon":"robot","iconType":"solid","href":"/workflows/sdk/automation/overview"},{"title":"Data Addition Trigger","description":null,"sidebarTitle":"Example Data Addition Trigger","icon":"table","iconType":"solid","href":"/workflows/sdk/automation/example-data-addition"},{"title":"Interval Trigger","description":null,"sidebarTitle":"Example Interval Trigger","icon":"alarm-snooze","iconType":"solid","href":"/workflows/sdk/automation/example-interval"}]},{"group":"Pods","pages":[{"title":"What are Latch Pods?","description":"Access the scale of the cloud with the flexibility of your personal computer.","sidebarTitle":"Overview","icon":"magnifying-glass","iconType":"solid","href":"/pods/overview"},{"title":"Latch Pods Basics","description":"In this tutorial, we will walk through the basics of creating your first Pod.","icon":"hexagon","iconType":"solid","href":"/pods/getting-started"},{"title":"Accessing Latch Data in Pod using Latch Data FUSE","description":"Latch Pods provides direct access to all files stored on Latch Data.","icon":"file-chart-column","iconType":"solid","href":"/pods/mount-data"},{"group":"Shutdown Configuration","pages":[{"title":"Setting Up Auto Shutdown from Latch","description":"Pods allow easy customization of auto shutdown interval when inactive.","icon":"hourglass-clock","iconType":"solid","href":"/pods/auto-shutdown"},{"title":"Configuring Auto Shutdown","description":"Configure Pods for scheduled shutdown using systemd.","icon":"screwdriver-wrench","iconType":"solid","href":"/pods/hard-shutdown"}]},{"title":"Host a Custom App","description":"Latch Pods make it easy to host any custom application, such as Dash Apps, RShiny, Streamlit, and more, on Latch.","icon":"grid-2","iconType":"solid","href":"/pods/custom-app"},{"title":"Pod Templates","description":"Pod Templates provide an easy way to take a snapshot of a Pod’s dependencies and files, and save it as a template that is reusable in future Pods for your organization. ","icon":"layer-group","iconType":"solid","href":"/pods/templates"},{"title":"Custom File Viewer","description":"The Custom File Viewer enables scientists to click on files in Latch Data with a specific extension and view them in an application hosted on a Latch Pod without having to manually enter the pod and download the file.","icon":"browser","iconType":"solid","href":"/pods/file-viewer"},{"group":"Access \u0026 Integrations","pages":[{"title":"Set up SSH Access","description":"You may want to set up SSH access for Pod if you want to access Pod from your local terminal or open your favorite IDE, such as Visual Studio Code, inside a Pod.","icon":"square-terminal","iconType":"solid","href":"/pods/ssh"},{"title":"Integration with VSCode","description":"Follow our tutorial to use Visual Studio Code inside your Pod and navigate the filesystem on your favorite IDE.","icon":"display-code","iconType":"solid","href":"/pods/integration-with-vscode"},{"title":"Integration with GitHub","description":"Using GitHub within Pods","icon":"github","iconType":"solid","href":"/pods/integration-with-github"}]}]},{"group":"Plots","pages":[{"title":"What are Latch Plots?","description":"Set up dashboards with interactive visualizations and data transformations for scientists to explore their data.","sidebarTitle":"Overview","icon":"magnifying-glass","iconType":"solid","href":"/plots/overview"},{"group":"Basics","pages":[{"title":"Latch Plots Basics","description":"Learn how to bring data into a plotting layout and chart it.","sidebarTitle":"Plotting a CSV","icon":"chart-column","iconType":"solid","href":"/plots/basics"},{"title":"Develop your First Plot Notebook","description":"The Notebook View is where you bring in data, perform transformations in Python, and visualize your data.","sidebarTitle":"Develop your first Plot Notebook","icon":"code","iconType":"solid","href":"/plots/developer/getting-started"},{"title":"Components of a Plot Notebook","description":"An overview of all components in a Plot notebook","sidebarTitle":"Plot Notebook Components","icon":"notebook","iconType":"solid","href":"/plots/layouts"},{"title":"Plots Reactivity","description":"Learn how reactivity works in Plot notebooks","sidebarTitle":"Reactivity","icon":"bolt","iconType":"solid","href":"/plots/developer/reactivity"}]},{"group":"Data Plotting","pages":[{"title":"Plotting Overview","description":"Create interactive and customizable plots.","sidebarTitle":"Overview","icon":"chart-scatter","iconType":"solid","href":"/plots/plotting/overview"},{"title":"Supported Plot Types","description":"Learn about the plot types supported in a plotting layout.","sidebarTitle":" Plot Types","icon":"chart-tree-map","iconType":"solid","href":"/plots/plotting/plot-types"},{"title":"Add Custom Plots from Any Library","description":"Latch Plots allows you to install and import any libraries to generate custom plots and display them in the notebook view.","sidebarTitle":"Custom Plots in Python","icon":"python","iconType":"solid","href":"/plots/developer/custom-plots"},{"title":"Faceting","description":"Facet your plot based on a categorical column.","sidebarTitle":"Faceting","icon":"chart-pie-simple","iconType":"solid","href":"/plots/plotting/faceting"},{"title":"Appearance","description":"Learn what options are available for customizing the appearance of your plots.","sidebarTitle":"Appearance","icon":"palette","iconType":"solid","href":"/plots/plotting/styling"},{"title":"Error Bars","description":"Add error bars to your plot.","sidebarTitle":"Error Bars","icon":"chart-candlestick","iconType":"solid","href":"/plots/plotting/error-bars"},{"title":"Selecting Points","description":"Learn how to make a selection of points and use that selection to filter the source table.","sidebarTitle":"Selecting Points","icon":"square-dashed-circle-plus","iconType":"solid","href":"/plots/plotting/selecting-points"},{"title":"Filtering","description":"Learn how to filter the values displayed in a plot.","sidebarTitle":"Filtering","icon":"filter-list","iconType":"solid","href":"/plots/plotting/filtering"}]},{"group":"Data Transformations","pages":[{"title":"Overview","description":"The Data Transformation component functions similarly to a Python cell in a Jupyter Notebook, allowing users to input, modify, and execute Python code interactively.","sidebarTitle":"Overview","icon":"square-list","iconType":"solid","href":"/plots/transformations/overview"},{"title":"Widgets","description":"Widgets can be used to create transforms that users can update based on user input. You're able to define a widget and use its user input in your analysis code.","sidebarTitle":"Widgets","icon":"grid-2","iconType":"solid","href":"/plots/transformations/widget-types"},{"title":"Transform Outputs","description":"Learn how to view and use dataframe outputs from a transfrom.","sidebarTitle":"Transform Outputs","icon":"list-tree","iconType":"solid","href":"/plots/transformations/outputs"},{"title":"Description Text","description":"Write descriptions using markdown within a transform.","sidebarTitle":"Description Text","icon":"text","iconType":"solid","href":"/plots/transformations/description-text"}]},{"title":"Table Display/Filter","description":"Learn how to use a table display to view data and filter it for use downstream.","sidebarTitle":"Table Display/Filter","icon":"table","iconType":"solid","href":"/plots/table-display-cell"},{"title":"Text Display","description":"Learn how to add description text to your layout.","sidebarTitle":"Text Display","icon":"font-case","iconType":"solid","href":"/plots/text-cell"},{"group":"Developers","pages":[{"title":"Plots Reactivity","description":"Learn how reactivity works in Plot notebooks","sidebarTitle":"Reactivity","icon":"bolt","iconType":"solid","href":"/plots/developer/reactivity"},{"title":"SSH into the Plot Runtime","description":"How to connect to Plots runtime using SSH","sidebarTitle":"SSH Access","icon":"square-terminal","iconType":"solid","href":"/plots/developer/ssh"},{"title":"Installing Custom Dependencies","description":"How to install custom dependencies for your Plot runtime","sidebarTitle":"Installing Custom Dependencies","icon":"code-merge","iconType":"solid","href":"/plots/developer/dependencies"}]},{"group":"Use Cases","pages":[{"title":"Use Cases","description":null,"sidebarTitle":"Overview","icon":"dna","iconType":"solid","href":"/plots/templates/overview"},{"title":"The Ultimate Guide to Relative qPCR Analysis on Latch","description":"The guide below walks through how you can perform qPCR analysis on Latch using Plot Templates. ","sidebarTitle":"qPCR","icon":"vials","iconType":"solid","href":"/plots/templates/qpcr"}]}]},{"group":"Overview","pages":[{"title":"Workspaces \u0026 Orgs: An Overview","description":"Learn about roles and permissions for members of an organization.","icon":"magnifying-glass","iconType":"solid","sidebarTitle":"Workspaces \u0026 Orgs","href":"/admin/overview"}]},{"group":"Workspaces","pages":[{"title":"What are Latch Workspaces?","description":null,"icon":"building","iconType":"solid","sidebarTitle":"Overview","href":"/admin/workspaces/overview"},{"title":"Creating a Workspace","description":"Learn how to create a new workspace on Latch","icon":"grid-2-plus","iconType":"solid","sidebarTitle":"Creating a Workspace","href":"/admin/workspaces/creating-new-workspace"},{"title":"Inviting Members to a Workspace","description":"Learn how to invite users to an existing workspace","icon":"user-plus","iconType":"solid","sidebarTitle":"Inviting Members to a Workspace","href":"/admin/workspaces/inviting-members"},{"title":"Workspace Roles","description":"Learn about workspace roles and permissions","icon":"sliders","iconType":"solid","sidebarTitle":"Workspace Roles","href":"/admin/workspaces/roles"},{"title":"Workspace Billing","description":"Learn about billing for Latch workspaces and how to add your credit card information.","icon":"money-bill-wave","iconType":"solid","sidebarTitle":"Billing","href":"/admin/workspaces/billing"},{"title":"Copying and Moving Data Between Workspaces","description":null,"icon":"diagram-next","iconType":"solid","sidebarTitle":"Moving \u0026 Copying Data","href":"/admin/workspaces/move-copy-data"},{"title":"Opening Pod Templates in Other Workspaces","description":null,"icon":"hexagon-plus","iconType":"solid","sidebarTitle":"Workspace Pod Templates","href":"/admin/workspaces/workspace-pod-templates"}]},{"group":"Organizations: Manage Workspaces","pages":[{"title":"What are Latch Organizations?","description":"Manage multiple workspaces under a single organization on Latch","icon":"Buildings","iconType":"solid","sidebarTitle":"Overview","href":"/admin/orgs/overview"},{"title":"Organizations Basics","description":null,"icon":"square-info","iconType":"solid","sidebarTitle":"Organizations Basics","href":"/admin/orgs/about"},{"title":"Adding Workspaces to an Organization","description":"Learn how to add and transfer workspaces to an organization on Latch","icon":"sitemap","iconType":"solid","sidebarTitle":"Adding Workspaces to an Organization","href":"/admin/orgs/adding-workspaces"},{"title":"Inviting Members to an Organization","description":"Learn how to invite members to the organization and accept invitations","icon":"users-medical","iconType":"solid","sidebarTitle":"Inviting Members to an Organization","href":"/admin/orgs/managing-members"},{"title":"Organization Roles","description":"Learn about roles and permissions for members of an organization.","icon":"users","iconType":"solid","sidebarTitle":"Organization Roles","href":"/admin/orgs/roles"},{"title":"Transferring Credits to Workspaces","description":null,"icon":"coins","iconType":"solid","sidebarTitle":"Transferring Credits","href":"/admin/orgs/transfer-credits"},{"title":"Security Settings","description":"Configure access controls and authentication methods","icon":"shield-check","iconType":"solid","sidebarTitle":"Security Settings","href":"/admin/orgs/security"},{"title":"Analysis Packages","description":"Learn how to distribute analysis packages to customers","icon":"sitemap","iconType":"solid","sidebarTitle":"Distributing Analysis Packages","href":"/admin/orgs/analysis-packages"}]},{"group":"Resources","pages":[{"title":"Frequently Asked Questions","description":null,"icon":"messages-question","iconType":"solid","sidebarTitle":"FAQ","href":"/resources/faq"},{"title":"Latch Privacy Policy","description":"This Privacy Policy describes how Latch Bio, Inc. (“we”, “us”, “our”, or the “Company”) handles personal information that we collect through our digital properties that link to this Privacy Policy, including our website (collectively, the “Service”), as well as through social media, our marketing activities, and other activities described in this Privacy Policy.","icon":"shield-keyhole","iconType":"solid","sidebarTitle":"Privacy Policy","href":"/resources/privacy-policy"},{"title":"Latch Terms of Service","description":null,"icon":"file-contract","iconType":"solid","sidebarTitle":"Terms of Service","href":"/resources/terms-of-service"}]}],"pageMetadata":{"title":"Data Addition Trigger","description":null,"sidebarTitle":"Example Data Addition Trigger","icon":"table","iconType":"solid","href":"/workflows/sdk/automation/example-data-addition"},"mintConfig":{"layout":"topnav","sidebar":{"items":"container"},"topbar":{"style":"default"},"search":{"location":"top"},"rounded":"default","codeBlock":{"mode":"dark"},"topbarCtaButton":{"name":"Sign Up","url":"https://console.latch.bio/signup"},"$schema":"https://mintlify.com/schema.json","name":"LatchBio","logo":{"light":"https://mintlify.s3-us-west-1.amazonaws.com/latchbio/logo/light.svg","dark":"https://mintlify.s3-us-west-1.amazonaws.com/latchbio/logo/dark.svg"},"favicon":"/favicon.png","colors":{"primary":"#001AAE","light":"#92A2FF","dark":"#92A2FF"},"topbarLinks":[{"url":"mailto:support@latch.bio","name":"Contact Us","_id":"672464fb85507cebe4ae6679"},{"url":"https://console.latch.bio/","name":"Log In","_id":"672464fb85507cebe4ae667a"}],"navigation":[{"group":"Introduction","pages":["start/introduction","start/quickstart"]},{"group":"Data","pages":["data/overview","data/basic-uploading-and-downloading","data/mount-s3-bucket","data/mount-gcp-bucket","data/basespace-downloader","data/data-command-line","data/sharing"]},{"group":"Visualizations","pages":["data/visualizations/fastqc","data/visualizations/cellxgene",{"group":"Interactive Genome Viewer (IGV)","pages":["data/visualizations/igv","data/visualizations/igv-setting-defaults","data/visualizations/igv-reference-genomes"]}]},{"group":"Registry","pages":["registry/what-is-a-registry","registry/create-a-project",{"group":"Bring Data into Registry","pages":["registry/add-records-to-a-table/single-records","registry/add-records-to-a-table/bulk-link","registry/add-records-to-a-table/import-data","registry/benchling-sync"]},"registry/connect-records-across-tables"]},{"group":"SDK","pages":["registry/sdk/import-registry-records","registry/sdk/latch-sdk-registry-integration","registry/sdk/account-objects","registry/sdk/registry-projects","registry/sdk/table-objects","registry/sdk/record-objects"]},{"group":"Overview","pages":["workflows/overview"]},{"group":"Workflows","pages":[{"group":"Verified Workflows","pages":[{"group":"Bulk RNA-seq","pages":["workflows/bulk-rna-seq-deep-dive","workflows/bulk-rna-seq"]},{"group":"ATAC-seq","pages":["workflows/ATAC-Seq-Deep-Dive","workflows/ATAC-Seq"]},"workflows/crispresso2","workflows/cas-offinder","workflows/crispor","workflows/alphafold",{"group":"MAGeCK","pages":["workflows/mageck-overview","workflows/mageck-count","workflows/mageck-test","workflows/mageck-mle","workflows/mageck-pathway","workflows/mageck-plot"]}]},"workflows/csv-import","workflows/resource-monitoring"]},{"group":"Python SDK","pages":["workflows/sdk/getting-started/quick-start","workflows/sdk/getting-started/authorizing-your-own-workflow",{"group":"Workflow Concepts","pages":["workflows/sdk/defining-a-workflow/what-is-a-workflow","workflows/sdk/defining-a-workflow/split-tasks",{"group":"Workflow Environment","pages":["workflows/sdk/defining-a-workflow/workflow-environment/overview","workflows/sdk/defining-a-workflow/workflow-environment/environments-for-individual-tasks","workflows/sdk/defining-a-workflow/workflow-environment/common-dockfile-patterns"]},"workflows/sdk/defining-a-workflow/latch-urls","workflows/sdk/defining-a-workflow/working-with-files","workflows/sdk/defining-a-workflow/legacy-file-support",{"group":"Customizing Your Interface","pages":["workflows/sdk/defining-a-workflow/customizing-your-interface/overview","workflows/sdk/defining-a-workflow/customizing-your-interface/parameter-types","workflows/sdk/defining-a-workflow/customizing-your-interface/workflow-documentation","workflows/sdk/defining-a-workflow/customizing-your-interface/previewing-workflow","workflows/sdk/defining-a-workflow/customizing-your-interface/forks-flows","workflows/sdk/defining-a-workflow/customizing-your-interface/results"]},"workflows/sdk/defining-a-workflow/messages","workflows/sdk/defining-a-workflow/defining-cloud-resources","workflows/sdk/defining-a-workflow/caching","workflows/sdk/defining-a-workflow/conditional-sections","workflows/sdk/defining-a-workflow/map-task","workflows/sdk/defining-a-workflow/storing-and-using-secrets","workflows/sdk/defining-a-workflow/versioning"]},{"group":"Testing and Debugging a Workflow","pages":["workflows/sdk/testing-and-debugging-a-workflow/development-and-debugging","workflows/sdk/testing-and-debugging-a-workflow/learning-through-an-example","workflows/sdk/testing-and-debugging-a-workflow/remote-execution"]}]},{"group":"Nextflow","pages":["workflows/sdk/nextflow/overview","workflows/sdk/nextflow/tutorial","workflows/sdk/nextflow/profiles","workflows/sdk/nextflow/caching","workflows/sdk/nextflow/registries",{"group":"Customizing Your Interface","pages":["workflows/sdk/nextflow/interface/about","workflows/sdk/nextflow/interface/results","workflows/sdk/nextflow/interface/param-validation","workflows/sdk/nextflow/interface/updating-entrypoint"]},"workflows/sdk/nextflow/dependencies","workflows/sdk/nextflow/gpus"]},{"group":"Snakemake","pages":["workflows/sdk/snakemake/quickstart","workflows/sdk/snakemake/cloud",{"group":"Advanced Configuration","pages":["workflows/sdk/snakemake/configuration/registries","workflows/sdk/snakemake/configuration/resources","workflows/sdk/snakemake/configuration/caching"]},"workflows/sdk/snakemake/tutorial","workflows/sdk/snakemake/debugging","workflows/sdk/snakemake/troubleshooting","workflows/sdk/snakemake/backend"]},{"group":"Automation","pages":["workflows/sdk/automation/overview","workflows/sdk/automation/example-data-addition","workflows/sdk/automation/example-interval"]},{"group":"Pods","pages":["pods/overview","pods/getting-started","pods/mount-data",{"group":"Shutdown Configuration","pages":["pods/auto-shutdown","pods/hard-shutdown"]},"pods/custom-app","pods/templates","pods/file-viewer",{"group":"Access \u0026 Integrations","pages":["pods/ssh","pods/integration-with-vscode","pods/integration-with-github"]}]},{"group":"Plots","pages":["plots/overview",{"group":"Basics","pages":["plots/basics","plots/developer/getting-started","plots/layouts","plots/developer/reactivity"]},{"group":"Data Plotting","pages":["plots/plotting/overview","plots/plotting/plot-types","plots/developer/custom-plots","plots/plotting/faceting","plots/plotting/styling","plots/plotting/error-bars","plots/plotting/selecting-points","plots/plotting/filtering"]},{"group":"Data Transformations","pages":["plots/transformations/overview","plots/transformations/widget-types","plots/transformations/outputs","plots/transformations/description-text"]},"plots/table-display-cell","plots/text-cell",{"group":"Developers","pages":["plots/developer/reactivity","plots/developer/ssh","plots/developer/dependencies"]},{"group":"Use Cases","pages":["plots/templates/overview","plots/templates/qpcr"]}]},{"group":"Overview","pages":["admin/overview"]},{"group":"Workspaces","pages":["admin/workspaces/overview","admin/workspaces/creating-new-workspace","admin/workspaces/inviting-members","admin/workspaces/roles","admin/workspaces/billing","admin/workspaces/move-copy-data","admin/workspaces/workspace-pod-templates"]},{"group":"Organizations: Manage Workspaces","pages":["admin/orgs/overview","admin/orgs/about","admin/orgs/adding-workspaces","admin/orgs/managing-members","admin/orgs/roles","admin/orgs/transfer-credits","admin/orgs/security","admin/orgs/analysis-packages"]},{"group":"Resources","pages":["resources/faq","resources/privacy-policy","resources/terms-of-service"]}],"primaryTab":{"name":"Documentation"},"anchors":[{"name":"Introduction","url":"start","icon":"house","_id":"672464fb85507cebe4ae6671"},{"name":"Data","url":"data","icon":"file-chart-column","_id":"672464fb85507cebe4ae6672"},{"name":"Registry","url":"registry","icon":"table","_id":"672464fb85507cebe4ae6673"},{"name":"Workflows \u0026 SDK","url":"workflows","icon":"screwdriver-wrench","_id":"672464fb85507cebe4ae6674"},{"name":"Pods","url":"pods","icon":"hexagon","_id":"672464fb85507cebe4ae6675"},{"name":"Plots","url":"plots","icon":"chart-scatter-bubble","_id":"672464fb85507cebe4ae6676"},{"name":"Administration","url":"admin","icon":"screen-users","_id":"672464fb85507cebe4ae6677"},{"name":"Resources","url":"resources","icon":"clipboard-question","_id":"672464fb85507cebe4ae6678"}],"tabs":[{"name":"API References","url":"https://docs.latch.bio/api/modules.html","_id":"672464fb85507cebe4ae666d"},{"name":"Blog","url":"https://latchbio.substack.com/","_id":"672464fb85507cebe4ae666e"},{"name":"Website","url":"https://latch.bio/","_id":"672464fb85507cebe4ae666f"},{"name":"Change Log","url":"https://latchbio.notion.site/LatchBio-Product-Change-Logs-ca76a6ae05a74a4daf78cb4006ad80ac","_id":"672464fb85507cebe4ae6670"}],"feedback":{"thumbsRating":true,"raiseIssue":true},"redirects":[{"destination":"/start/introduction","source":"/wiki/introduction","_id":"672464fb85507cebe4ae6650"},{"destination":"/start/quickstart","source":"/wiki/getting-started","_id":"672464fb85507cebe4ae6651"},{"destination":"/start/introduction","source":"/wiki","_id":"672464fb85507cebe4ae6652"},{"destination":"/data/:slug*","source":"/wiki/data/:slug*","_id":"672464fb85507cebe4ae6653"},{"destination":"/data/overview","source":"/wiki/data","_id":"672464fb85507cebe4ae6654"},{"destination":"/data/visualizations/:slug*","source":"/wiki/visualizations/:slug*","_id":"672464fb85507cebe4ae6655"},{"destination":"/data/visualizations/fastqc","source":"/wiki/visualizations","_id":"672464fb85507cebe4ae6656"},{"destination":"/registry/:slug*","source":"/wiki/registry/:slug*","_id":"672464fb85507cebe4ae6657"},{"destination":"/registry/what-is-a-registry","source":"/wiki/registry","_id":"672464fb85507cebe4ae6658"},{"destination":"/workflows/:slug*","source":"/wiki/workflows/:slug*","_id":"672464fb85507cebe4ae6659"},{"destination":"/workflows/csv-import","source":"/wiki/workflow-helpers/csv-import","_id":"672464fb85507cebe4ae665a"},{"destination":"/workflows/overview","source":"/wiki/workflows","_id":"672464fb85507cebe4ae665b"},{"destination":"/workflows/overview","source":"/docs/getting-started/index","_id":"672464fb85507cebe4ae665c"},{"destination":"/pods/:slug*","source":"/wiki/pods/:slug*","_id":"672464fb85507cebe4ae665d"},{"destination":"/pods/overview","source":"/wiki/pods","_id":"672464fb85507cebe4ae665e"},{"destination":"/plots/:slug*","source":"/wiki/plots/:slug*","_id":"672464fb85507cebe4ae665f"},{"destination":"/plots/plotting/:slug*","source":"/wiki/plots/plotting/:slug*","_id":"672464fb85507cebe4ae6660"},{"destination":"/plots/developer/:slug*","source":"/wiki/plots/developer/:slug*","_id":"672464fb85507cebe4ae6661"},{"destination":"/plots/overview","source":"/wiki/plots/overview","_id":"672464fb85507cebe4ae6662"},{"destination":"/plots/overview","source":"/wiki/plots","_id":"672464fb85507cebe4ae6663"},{"destination":"/admin/workspaces/:slug*","source":"/wiki/workspaces/:slug*","_id":"672464fb85507cebe4ae6664"},{"destination":"/admin/workspaces/overview","source":"/wiki/workspaces","_id":"672464fb85507cebe4ae6665"},{"destination":"/admin/orgs/:slug*","source":"/wiki/organizations/:slug*","_id":"672464fb85507cebe4ae6666"},{"destination":"/admin/orgs/overview","source":"/wiki/organizations","_id":"672464fb85507cebe4ae6667"},{"destination":"/resources/:slug*","source":"/wiki/resources/:slug*","_id":"672464fb85507cebe4ae6668"},{"destination":"/resources/faq","source":"/wiki/resources","_id":"672464fb85507cebe4ae6669"},{"destination":"/workflows/sdk/:slug*","source":"/docs/:slug*","_id":"672464fb85507cebe4ae666a"},{"destination":"/workflows/overview#bring-your-own-workflow","source":"/docs","_id":"672464fb85507cebe4ae666b"},{"destination":"/workflows/overview","source":"/docs/quickstart/index","_id":"672464fb85507cebe4ae666c"}],"footerSocials":{"twitter":"https://twitter.com/latchbio","linkedin":"https://www.linkedin.com/company/latchbio/"},"analytics":{"koala":{"publicApiKey":"pk_0469d6299947a84c711662e1ed49f0fea8d7"}},"repo":{"github":{"owner":"latchbio","repo":"wiki","contentDirectory":"","deployBranch":"main","isPrivate":false}}},"apiReferenceData":{}},"favicons":{"icons":[{"rel":"apple-touch-icon","sizes":"180x180","href":"https://mintlify.s3-us-west-1.amazonaws.com/latchbio/_generated/favicon/apple-touch-icon.png?v=3","type":"image/png"},{"rel":"icon","sizes":"32x32","href":"https://mintlify.s3-us-west-1.amazonaws.com/latchbio/_generated/favicon/favicon-32x32.png?v=3","type":"image/png"},{"rel":"icon","sizes":"16x16","href":"https://mintlify.s3-us-west-1.amazonaws.com/latchbio/_generated/favicon/favicon-16x16.png?v=3","type":"image/png"},{"rel":"shortcut icon","href":"https://mintlify.s3-us-west-1.amazonaws.com/latchbio/_generated/favicon/favicon.ico?v=3","type":"image/x-icon"}],"browserconfig":"https://mintlify.s3-us-west-1.amazonaws.com/latchbio/_generated/favicon/browserconfig.xml?v=3"},"subdomain":"wiki.latch.bio","internalAnalyticsWriteKey":"phc_TXdpocbGVeZVm5VJmAsHTMrCofBQu3e0kN8HGMNGTVW","inkeep":{"integrationApiKey":"87792c6b7b21f2e7e0ed313f0fb1c2c0771544ecd11a5cca"},"trieve":{"chatEnabled":true,"datasetId":"a00a5483-63c8-47b8-9bfd-08e23ff4e093"},"shouldIndex":true,"org":{"plan":"startup","createdAt":"1680907578306"},"cssFiles":[],"jsFiles":[{"_id":"672939e593c6fe0f38518f51","filePath":"syft.js","subdomain":"latchbio","__v":0,"content":"!function(t){if(window.syftc=t,window.syft)return;window.syft=[],[\"identify\",\"track\",\"page\",\"signup\"].forEach(function(t){window.syft[t]=function(){var s=[].slice.call(arguments);s.unshift(t),window.syft.push(s)}});var s=document.createElement(\"script\");s.async=!0,s.setAttribute(\"src\",\"https://cdn.syftdata.com/syftnext/syft.umd.js\"),(document.body||document.head).appendChild(s)}({sourceId:\"cltz605bt000liwat0d8u19rq\"});\n"},{"_id":"6733eb1c93c6fe0f38cf5104","filePath":"data/syft.js","subdomain":"latchbio","__v":0,"content":"!function(t){if(window.syftc=t,window.syft)return;window.syft=[],[\"identify\",\"track\",\"page\",\"signup\"].forEach(function(t){window.syft[t]=function(){var s=[].slice.call(arguments);s.unshift(t),window.syft.push(s)}});var s=document.createElement(\"script\");s.async=!0,s.setAttribute(\"src\",\"https://cdn.syftdata.com/syftnext/syft.umd.js\"),(document.body||document.head).appendChild(s)}({sourceId:\"cltz605bt000liwat0d8u19rq\"});\n"},{"_id":"6733eb1c93c6fe0f38cf5111","filePath":"start/syft.js","subdomain":"latchbio","__v":0,"content":"!function(t){if(window.syftc=t,window.syft)return;window.syft=[],[\"identify\",\"track\",\"page\",\"signup\"].forEach(function(t){window.syft[t]=function(){var s=[].slice.call(arguments);s.unshift(t),window.syft.push(s)}});var s=document.createElement(\"script\");s.async=!0,s.setAttribute(\"src\",\"https://cdn.syftdata.com/syftnext/syft.umd.js\"),(document.body||document.head).appendChild(s)}({sourceId:\"cltz605bt000liwat0d8u19rq\"});\n"},{"_id":"6733eb1c93c6fe0f38cf5129","filePath":"wiki/syft.js","subdomain":"latchbio","__v":0,"content":"!function(t){if(window.syftc=t,window.syft)return;window.syft=[],[\"identify\",\"track\",\"page\",\"signup\"].forEach(function(t){window.syft[t]=function(){var s=[].slice.call(arguments);s.unshift(t),window.syft.push(s)}});var s=document.createElement(\"script\");s.async=!0,s.setAttribute(\"src\",\"https://cdn.syftdata.com/syftnext/syft.umd.js\"),(document.body||document.head).appendChild(s)}({sourceId:\"cltz605bt000liwat0d8u19rq\"});\n"},{"_id":"6733eb1d93c6fe0f38cf5137","filePath":"workflows/syft.js","subdomain":"latchbio","__v":0,"content":"!function(t){if(window.syftc=t,window.syft)return;window.syft=[],[\"identify\",\"track\",\"page\",\"signup\"].forEach(function(t){window.syft[t]=function(){var s=[].slice.call(arguments);s.unshift(t),window.syft.push(s)}});var s=document.createElement(\"script\");s.async=!0,s.setAttribute(\"src\",\"https://cdn.syftdata.com/syftnext/syft.umd.js\"),(document.body||document.head).appendChild(s)}({sourceId:\"cltz605bt000liwat0d8u19rq\"});\n"}],"mdxSourceWithNoJs":{"compiledSource":"/*@jsxRuntime automatic @jsxImportSource react*/\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = Object.assign({\n p: \"p\",\n a: \"a\",\n code: \"code\",\n em: \"em\",\n strong: \"strong\",\n ul: \"ul\",\n li: \"li\",\n ol: \"ol\",\n pre: \"pre\",\n span: \"span\",\n img: \"img\",\n br: \"br\",\n blockquote: \"blockquote\"\n }, _provideComponents(), props.components), {Note, Heading, CodeBlock} = _components;\n if (!CodeBlock) _missingMdxReference(\"CodeBlock\", true);\n if (!Heading) _missingMdxReference(\"Heading\", true);\n if (!Note) _missingMdxReference(\"Note\", true);\n return _jsxs(_Fragment, {\n children: [_jsx(Note, {\n children: \" This document is a work in progress and is subject to change. \"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"We will walk through the process of creating an \", _jsx(_components.a, {\n href: \"/workflows/sdk/automation/overview\",\n children: \"automation\"\n }), \" using the \", _jsx(_components.code, {\n children: \"Data Addition\"\n }), \" trigger type on Latch which will run a \", _jsx(_components.em, {\n children: \"target workflow\"\n }), \" on all children of the target directory. We assume that you understand how to write and register \", _jsx(_components.a, {\n href: \"/workflows/sdk/defining-a-workflow/what-is-a-workflow\",\n children: \"Workflows\"\n }), \" on Latch.\"]\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"Prerequisites:\"\n })\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.em, {\n children: \"Target directory\"\n }), \" in \", _jsx(_components.a, {\n href: \"https://console.latch.bio/data\",\n children: \"Latch Data\"\n }), \": this is the folder which is watched by the automation. The automation workflow will be triggered if a child is added to this folder.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"Terms:\"\n })\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.em, {\n children: \"Automation Workflow\"\n }), \": workflow which will be called by automation. This is the workflow we create in \", _jsx(_components.a, {\n href: \"#3-create-the-automation-workflow\",\n children: \"steps 3-5\"\n }), \" of this tutorial.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.em, {\n children: \"Target Workflow\"\n }), \": workflow which will be ran by automation workflow on child of the \", _jsx(_components.em, {\n children: \"target directory\"\n }), \". This workflow should contain the logic on how to process the files in child directories. This is the workflow we create in \", _jsx(_components.a, {\n href: \"#1-create-the-target-workflow\",\n children: \"step 1\"\n }), \" of this tutorial.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.em, {\n children: \"Registry Table\"\n }), \": we use a Registry Table in this tutorial to record child directories which are processed by the target workflow to avoid reprocessing same directories in consequent runs of automation. We create this table in \", _jsx(_components.a, {\n href: \"#2-create-a-new-registry-table\",\n children: \"step 2\"\n }), \" of this tutorial.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(Heading, {\n level: \"2\",\n id: \"1-create-the-target-workflow\",\n children: \"1: Create the Target Workflow\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"This example requires another \", _jsx(_components.em, {\n children: \"target workflow\"\n }), \" which will get executes on every child folder when \", _jsx(_components.em, {\n children: \"automation workflow\"\n }), \" gets triggered. Below is a simple workflow example which reads every file in a child directory and prints out its Latch Path.\"]\n }), \"\\n\", _jsxs(_components.ol, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [\"Initialize a new workflow using \", _jsx(_components.code, {\n children: \"latch init test-workflow\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Replace \", _jsx(_components.code, {\n children: \"__init__.py\"\n }), \" and \", _jsx(_components.code, {\n children: \"task.py\"\n }), \" with the following sample code.\", \"\\n\", _jsx(CodeBlock, {\n filename: \"\",\n expandable: \"false\",\n children: _jsx(_components.pre, {\n className: \"language-python\",\n children: _jsxs(_components.code, {\n className: \"language-python\",\n children: [_jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token comment\",\n children: \"# __init__.py\"\n })\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" wf\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"task \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" task\"]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" latch\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"resources\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"workflow \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" workflow\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" latch\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"types\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"directory \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" LatchDir\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" LatchOutputDir\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" latch\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"types\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), _jsx(_components.span, {\n className: \"token builtin\",\n children: \"file\"\n }), \" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" LatchFile\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" latch\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"types\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"metadata \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" LatchAuthor\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" LatchMetadata\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" LatchParameter\"]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\"metadata \", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \" LatchMetadata\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" display_name\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"Target Workflow\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" author\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \"LatchAuthor\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" name\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"Your Name\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" parameters\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"input_directory\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" LatchParameter\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" display_name\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"Input Directory\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" batch_table_column\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), _jsx(_components.span, {\n className: \"token boolean\",\n children: \"True\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# Show this parameter in batched mode.\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"output_directory\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" LatchParameter\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" display_name\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"Output Directory\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" batch_table_column\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), _jsx(_components.span, {\n className: \"token boolean\",\n children: \"True\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# Show this parameter in batched mode.\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })\n }), \"\\n\", \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token decorator annotation punctuation\",\n children: \"@workflow\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), \"metadata\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"def\"\n }), \" \", _jsx(_components.span, {\n className: \"token function\",\n children: \"template_workflow\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" input_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" LatchDir\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" output_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" LatchOutputDir\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), \" \", _jsx(_components.span, {\n className: \"token operator\",\n children: \"-\"\n }), _jsx(_components.span, {\n className: \"token operator\",\n children: \"\u003e\"\n }), \" LatchOutputDir\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"return\"\n }), \" task\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), \"input_directory\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \"input_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" output_directory\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \"output_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsx(CodeBlock, {\n filename: \"\",\n expandable: \"false\",\n children: _jsx(_components.pre, {\n className: \"language-python\",\n children: _jsxs(_components.code, {\n className: \"language-python\",\n children: [_jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token comment\",\n children: \"# task.py\"\n })\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" os\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" logging \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" Logger\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" urllib\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"parse \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" urljoin\"]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" latch \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" message\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" latch\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"resources\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"tasks \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" small_task\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" latch\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"types\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"directory \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" LatchDir\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" LatchFile\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" LatchOutputDir\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" latch\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"account \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" Account\"]\n }), \"\\n\", \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\"log \", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \" Logger\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"wf.task\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\", \"\\n\", \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token decorator annotation punctuation\",\n children: \"@small_task\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"def\"\n }), \" \", _jsx(_components.span, {\n className: \"token function\",\n children: \"task\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), \"input_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" LatchDir\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" output_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" LatchOutputDir\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), \" \", _jsx(_components.span, {\n className: \"token operator\",\n children: \"-\"\n }), _jsx(_components.span, {\n className: \"token operator\",\n children: \"\u003e\"\n }), \" LatchOutputDir\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n })]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# iterate through all directories of the child input directories using iterdir()\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"for\"\n }), \" \", _jsx(_components.span, {\n className: \"token builtin\",\n children: \"file\"\n }), \" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"in\"\n }), \" input_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"iterdir\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" log\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"error\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), _jsxs(_components.span, {\n className: \"token string-interpolation\",\n children: [_jsx(_components.span, {\n className: \"token string\",\n children: \"f\\\"\"\n }), _jsxs(_components.span, {\n className: \"token interpolation\",\n children: [_jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n }), _jsx(_components.span, {\n className: \"token builtin\",\n children: \"file\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n })]\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \" \"\n }), _jsxs(_components.span, {\n className: \"token interpolation\",\n children: [_jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n }), _jsx(_components.span, {\n className: \"token builtin\",\n children: \"file\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"remote_path\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n })]\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"\"\n })]\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), \" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# note: `error` is used here since its the highest logging level\"\n })]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"return\"\n }), \" output_directory\"]\n }), \"\\n\", \"\\n\"]\n })\n })\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Register the sample target workflow with Latch using \", _jsx(_components.code, {\n children: \"latch register --remote --yes test-workflow\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Record the ID of your workflow on the sidebar which we will use later in the example.\\n\", _jsx(_components.img, {\n src: \"https://mintlify.s3-us-west-1.amazonaws.com/latchbio/workflows/sdk/assets/automation/get-workflow-id.png\",\n alt: \"Workflow ID\"\n })]\n }), \"\\n\", _jsx(_components.li, {\n children: \"Test the workflow by running it on Latch\"\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"You will need to pass the parameters into your target workflow from your automation. To obtain the JSON representation of the workflow inputs, navigate to a previous execution of your workflow. Select \", _jsx(_components.strong, {\n children: \"Graph and Logs\"\n }), \", click on square box around the first task, and select \", _jsx(_components.strong, {\n children: \"Inputs\"\n }), \". Copy the workflow parameters inside the \", _jsx(_components.code, {\n children: \"literal\"\n }), \" object, and pass it to \", _jsx(_components.code, {\n children: \"params\"\n }), \".\\n\", _jsx(_components.br, {}), \"\\n\", _jsx(_components.br, {}), \"\\n\", \"i.e.\", \"\\n\", _jsx(CodeBlock, {\n filename: \"\",\n expandable: \"false\",\n children: _jsx(_components.pre, {\n className: \"language-json\",\n children: _jsxs(_components.code, {\n className: \"language-json\",\n children: [_jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token property\",\n children: \"\\\"literals\\\"\"\n }), _jsx(_components.span, {\n className: \"token operator\",\n children: \":\"\n }), \" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: \" # copy everything inside the brackets\"\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n })\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsx(_components.img, {\n src: \"https://mintlify.s3-us-west-1.amazonaws.com/latchbio/workflows/sdk/assets/automation/get-workflow-parameters.png\",\n alt: \"Workflow Parameters\"\n })]\n }), \"\\n\"]\n }), \"\\n\", _jsx(Heading, {\n level: \"2\",\n id: \"2-create-a-new-registry-table\",\n children: \"2: Create a New Registry Table\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"In this example, we record all processed child directories in the Registry Table to not reprocess directories when automation workflow is runs again. This example requires you to create a new table with no existing columns. The automation workflow will add a column \", _jsx(_components.code, {\n children: \"Processed Directory\"\n }), \" with the directory name of processed children.\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"For many common use cases, Registry serves as the location to track workflow inputs and outputs, and hence we include an example of it here. However, having a registry table is not required, if you don’t want to use Registry as a mean to track your inputs and outputs.\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"To create a new table to be used with the automation:\"\n }), \"\\n\", _jsxs(_components.ol, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [\"Go to \", _jsx(_components.a, {\n href: \"https://console.latch.bio/registry\",\n children: \"Latch Registry\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Select an existing project, and click \", _jsx(_components.code, {\n children: \"New Table\"\n }), \".\"]\n }), \"\\n\", _jsx(_components.li, {\n children: \"Record the Table ID on the sidebar which we will use later in the example.\"\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.img, {\n src: \"https://mintlify.s3-us-west-1.amazonaws.com/latchbio/workflows/sdk/assets/automation/get-table-id.png\",\n alt: \"Table ID\"\n })\n }), \"\\n\", _jsx(Heading, {\n level: \"2\",\n id: \"3-create-the-automation-workflow\",\n children: \"3: Create the Automation Workflow\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"This is the workflow which will be run when automation gets triggered. To create the automation workflow, clone the \", _jsx(_components.a, {\n href: \"https://github.com/latchbio/automation-wf\",\n children: \"Automation Workflow Template\"\n }), \" and navigate to the \", _jsx(_components.code, {\n children: \"automation-wf/wf\"\n }), \" directory.\"]\n }), \"\\n\", _jsx(CodeBlock, {\n filename: \"\",\n expandable: \"false\",\n children: _jsx(_components.pre, {\n className: \"language-shell-session\",\n children: _jsxs(_components.code, {\n className: \"language-shell-session\",\n children: [_jsx(_components.span, {\n className: \"\",\n children: _jsxs(_components.span, {\n className: \"token command\",\n children: [_jsx(_components.span, {\n className: \"token shell-symbol important\",\n children: \"$\"\n }), \" \", _jsxs(_components.span, {\n className: \"token bash language-bash\",\n children: [_jsx(_components.span, {\n className: \"token function\",\n children: \"git\"\n }), \" clone git@github.com:latchbio/automation-wf.git\"]\n })]\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token output\",\n children: \"Cloning into 'automation-wf'...\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token output\",\n children: \"remote: Enumerating objects: 33, done.\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token output\",\n children: \"remote: Counting objects: 100% (33/33), done.\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token output\",\n children: \"remote: Compressing objects: 100% (24/24), done.\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token output\",\n children: \"remote: Total 33 (delta 9), reused 28 (delta 6), pack-reused 0\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token output\",\n children: \"Receiving objects: 100% (33/33), 8.52 KiB | 1.42 MiB/s, done.\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token output\",\n children: \"Resolving deltas: 100% (9/9), done.\"\n })\n }), \"\\n\", \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsxs(_components.span, {\n className: \"token command\",\n children: [_jsx(_components.span, {\n className: \"token shell-symbol important\",\n children: \"$\"\n }), \" \", _jsxs(_components.span, {\n className: \"token bash language-bash\",\n children: [_jsx(_components.span, {\n className: \"token builtin class-name\",\n children: \"cd\"\n }), \" automation-wf/wf\"]\n })]\n })\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsx(_components.p, {\n children: \"File Tree:\"\n }), \"\\n\", _jsx(CodeBlock, {\n filename: \"\",\n expandable: \"false\",\n children: _jsx(_components.pre, {\n className: \"language-shell-session\",\n children: _jsxs(_components.code, {\n className: \"language-shell-session\",\n children: [_jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token output\",\n children: \"├── Dockerfile\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token output\",\n children: \"├── README.md\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token output\",\n children: \"├── version\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token output\",\n children: \"└── wf\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token output\",\n children: \" ├── __init__.py\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token output\",\n children: \" ├── automation.py\"\n })\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token output\",\n children: \" └── util.py\"\n })\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"__init__.py\"\n }), \" calls the automation task defined in \", _jsx(_components.code, {\n children: \"automation.py\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"automation.py\"\n }), \" contains the Python logic to determine how a workflow should be launched.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"util.py\"\n }), \" contains the utility function which launches target workflow.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(Heading, {\n level: \"2\",\n id: \"4-configure-the-target-workflow\",\n children: \"4. Configure the Target Workflow\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"To specify the target workflow and the registry table which you have just created, configure the following parameters in \", _jsx(_components.code, {\n children: \"wf/__init__.py\"\n }), \" and specify your name in workflow metadata:\"]\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"output_directory\"\n }), \": The Latch Path to the output folder which this automation workflow will populate. i.e. \", _jsx(_components.code, {\n children: \"latch://...\"\n })]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"target_wf_id\"\n }), \": The ID of the target workflow that you have just created.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"params\"\n }), \": The parameters for your workflow. Refer to \", _jsx(_components.a, {\n href: \"#1-create-the-target-workflow\",\n children: \"Create The Target Workflow\"\n }), \" to get the parameters.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"table_id\"\n }), \": The ID of the table which you created that stores metadata for this automation. Refer to \", _jsx(_components.a, {\n href: \"#2-create-a-new-registry-table\",\n children: \"Create A New Registry Table\"\n }), \" to create a table and get the ID.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.blockquote, {\n children: [\"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Important\"\n }), \":\\nCurrently, automations are only passing \", _jsx(_components.code, {\n children: \"input_directory\"\n }), \" as the parameter to the automation workflow. If your workflow has different parameters automation will fail to start it.\\n\", _jsx(_components.br, {}), \"\\n\", \"In case you need more parameters to pass to your automation workflow, we suggest to hard-code them into the workflow while we are working on adding parameter support for automations.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(CodeBlock, {\n filename: \"\",\n expandable: \"false\",\n children: _jsx(_components.pre, {\n className: \"language-python\",\n children: _jsxs(_components.code, {\n className: \"language-python\",\n children: [_jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token comment\",\n children: \"# __init__.py​\"\n })\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" latch\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"resources\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"workflow \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" workflow\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" latch\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"types\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"directory \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" LatchDir\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" LatchOutputDir\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" latch\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"types\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"metadata \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" LatchAuthor\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" LatchMetadata\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" LatchParameter\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" wf\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"automation \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" automation_task\"]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\"metadata \", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \" LatchMetadata\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# MODIFY NAMING METADATA BELOW\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" display_name\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"Automation Template\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" author\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \"LatchAuthor\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" name\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"Your Name Here\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# MODIFY NAMING METADATA ABOVE\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# IMPORTANT: these exact parameters are required for the workflow to work with automations\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" parameters\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"input_directory\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" LatchParameter\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" display_name\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"Input Directory\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })\n }), \"\\n\", \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token decorator annotation punctuation\",\n children: \"@workflow\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), \"metadata\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"def\"\n }), \" \", _jsx(_components.span, {\n className: \"token function\",\n children: \"automation_workflow\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), \"input_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" LatchDir\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), \" \", _jsx(_components.span, {\n className: \"token operator\",\n children: \"-\"\n }), _jsx(_components.span, {\n className: \"token operator\",\n children: \"\u003e\"\n }), \" \", _jsx(_components.span, {\n className: \"token boolean\",\n children: \"None\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" output_directory \", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \" LatchOutputDir\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" path\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"latch://FIXME\\\"\"\n }), \" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# fixme: change to remote path of desired output directory\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" automation_task\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" input_directory\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \"input_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" output_directory\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \"output_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" target_wf_id\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"FIXME\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# fixme: change wf_id to the desired workflow id\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" table_id\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"FIXME\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# fixme: change table_id to the desired registry table\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\", \"\\n\"]\n })\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"(Optional) Change the parameters object in \", _jsx(_components.code, {\n children: \"automation.py\"\n }), \" from \", _jsx(_components.a, {\n href: \"#1-create-the-target-workflow\",\n children: \"step 1.6\"\n }), \" if your target workflow takes different parameters than \", _jsx(_components.code, {\n children: \"input_directory\"\n }), \" and \", _jsx(_components.code, {\n children: \"output_directory\"\n }), \":\"]\n }), \"\\n\", _jsx(CodeBlock, {\n filename: \"\",\n expandable: \"false\",\n children: _jsx(_components.pre, {\n className: \"language-python\",\n children: _jsxs(_components.code, {\n className: \"language-python\",\n children: [_jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token comment\",\n children: \"# automation.py\"\n })\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n })]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\"params \", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"input_directory\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"scalar\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"blob\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"metadata\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"type\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"dimensionality\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"MULTIPART\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"uri\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" input_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"remote_path\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"output_directory\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"scalar\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"blob\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"metadata\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"type\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n }), _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"dimensionality\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"MULTIPART\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"uri\\\"\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" output_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"remote_path\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n })]\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Usage Notes\"\n }), \":\"]\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [\"The \", _jsx(_components.code, {\n children: \"input_directory\"\n }), \" refers to the child directory (i.e. the trigger directory) to be passed to the target workflow.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"The \", _jsx(_components.code, {\n children: \"output_directory\"\n }), \" refers to directory where the output of the target workflow will be stored.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(Heading, {\n level: \"2\",\n id: \"5-optional-modify-automation-logic\",\n children: \"5. (Optional) Modify Automation Logic\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The file \", _jsx(_components.code, {\n children: \"wf/automation.py\"\n }), \" contains the logic that determines how an execution for the target workflow should be launched.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The \", _jsx(_components.code, {\n children: \"automation_task\"\n }), \" defines the logic that is used to launch the workflow. The code below checks a registry table to see whether an output directory exists, and launches an execution for the target workflow if that is not the case.\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Modify the function below to change the logic for launching target workflows.\"\n }), \"\\n\", _jsx(CodeBlock, {\n filename: \"\",\n expandable: \"false\",\n children: _jsx(_components.pre, {\n className: \"language-python\",\n children: _jsxs(_components.code, {\n className: \"language-python\",\n children: [_jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token comment\",\n children: \"# automation.py\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" uuid\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" typing \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" Set\"]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" latch\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"registry\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"table \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" Table\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" latch\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"resources\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"tasks \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" small_task\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" latch\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"types\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"directory \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" LatchDir\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" LatchOutputDir\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" latch\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"types\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), _jsx(_components.span, {\n className: \"token builtin\",\n children: \"file\"\n }), \" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" LatchFile\"]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"from\"\n }), \" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"utils \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"import\"\n }), \" launch_workflow\"]\n }), \"\\n\", \"\\n\", \"\\n\", _jsx(_components.span, {\n className: \"\",\n children: _jsx(_components.span, {\n className: \"token decorator annotation punctuation\",\n children: \"@small_task\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token keyword\",\n children: \"def\"\n }), \" \", _jsx(_components.span, {\n className: \"token function\",\n children: \"automation_task\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" input_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" LatchDir\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" output_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" LatchOutputDir\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" target_wf_id\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" \", _jsx(_components.span, {\n className: \"token builtin\",\n children: \"str\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" table_id\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" \", _jsx(_components.span, {\n className: \"token builtin\",\n children: \"str\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [_jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), \" \", _jsx(_components.span, {\n className: \"token operator\",\n children: \"-\"\n }), _jsx(_components.span, {\n className: \"token operator\",\n children: \"\u003e\"\n }), \" \", _jsx(_components.span, {\n className: \"token boolean\",\n children: \"None\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"\\\"\"\n }), \"\\\"\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" Logic on how to process the \", _jsx(_components.span, {\n className: \"token builtin\",\n children: \"input\"\n }), \" directory \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"and\"\n }), \" launch the target workflows\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"\\\"\"\n }), \"\\\"\"]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# fetch the table using Latch SDK\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" automation_table \", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \" Table\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), \"table_id\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" processed_directory_column \", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \" \", _jsx(_components.span, {\n className: \"token string\",\n children: \"\\\"Processed Directory\\\"\"\n })]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# [PARAMS OMITTED]\"\n })]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# check if the provided table contains column `Processed Directory` and creates one if it isn't present\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# we use Latch SDK to get the columns of the table and try to get the column by name\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"if\"\n }), \" automation_table\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"get_columns\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"get\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), \"processed_directory_column\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" \", _jsx(_components.span, {\n className: \"token boolean\",\n children: \"None\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), \" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"is\"\n }), \" \", _jsx(_components.span, {\n className: \"token boolean\",\n children: \"None\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"with\"\n }), \" automation_table\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"update\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), \" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"as\"\n }), \" automation_table_updater\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# create an update context for the table\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" automation_table_updater\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"upsert_column\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), \"processed_directory_column\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" LatchDir\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# fetch all the directories that have been processed and recorded in the Registry table previously\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" resolved_directories\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" Set\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"[\"\n }), _jsx(_components.span, {\n className: \"token builtin\",\n children: \"str\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"]\"\n }), \" \", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \" \", _jsx(_components.span, {\n className: \"token builtin\",\n children: \"set\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# list_records() returns a generator of records(rows) of the Registry Table\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"for\"\n }), \" page \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"in\"\n }), \" automation_table\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"list_records\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"for\"\n }), \" _\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" record \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"in\"\n }), \" page\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"items\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" value \", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \" record\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"get_values\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"[\"\n }), \"processed_directory_column\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"]\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"assert\"\n }), \" \", _jsx(_components.span, {\n className: \"token builtin\",\n children: \"isinstance\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" value\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" LatchDir\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), \" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# we only allow processing of child directories\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" resolved_directories\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"add\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), _jsx(_components.span, {\n className: \"token builtin\",\n children: \"str\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), \"value\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"assert\"\n }), \" \", _jsx(_components.span, {\n className: \"token builtin\",\n children: \"isinstance\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), \"input_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"remote_path\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" \", _jsx(_components.span, {\n className: \"token builtin\",\n children: \"str\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"assert\"\n }), \" \", _jsx(_components.span, {\n className: \"token builtin\",\n children: \"isinstance\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), \"output_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"remote_path\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" \", _jsx(_components.span, {\n className: \"token builtin\",\n children: \"str\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# Launch the target workflow for each child directory which hasn't been processed yet.\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# Record the processed directory in the Registry table.\"\n })]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# iterdir() returns an iterator of the child files and directories of the input directory\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"for\"\n }), \" child \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"in\"\n }), \" input_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"iterdir\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# skip files, output directory and directories that have been processed\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"if\"\n }), \" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token builtin\",\n children: \"isinstance\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), \"child\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n }), \" LatchFile\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"or\"\n }), \" \", _jsx(_components.span, {\n className: \"token builtin\",\n children: \"str\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), \"child\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), \" \", _jsx(_components.span, {\n className: \"token operator\",\n children: \"==\"\n }), \" \", _jsx(_components.span, {\n className: \"token builtin\",\n children: \"str\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), \"output_directory\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"or\"\n }), \" \", _jsx(_components.span, {\n className: \"token builtin\",\n children: \"str\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), \"child\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), \" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"in\"\n }), \" resolved_directories\"]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"continue\"\n })]\n }), \"\\n\", \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"with\"\n }), \" automation_table\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"update\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), \" \", _jsx(_components.span, {\n className: \"token keyword\",\n children: \"as\"\n }), \" automation_table_updater\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# use a util function to launch the target workflow with the right parameters\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" launch_workflow\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" target_wf_id\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \"target_wf_id\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" params\", _jsx(_components.span, {\n className: \"token operator\",\n children: \"=\"\n }), \"params\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token comment\",\n children: \"# update registry table with the processed directory\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" automation_table_updater\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"upsert_record\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token builtin\",\n children: \"str\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), \"uuid\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \".\"\n }), \"uuid4\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"(\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token operator\",\n children: \"**\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"{\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" processed_directory_column\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \":\"\n }), \" child\", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \"}\"\n }), _jsx(_components.span, {\n className: \"token punctuation\",\n children: \",\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"\",\n children: [\" \", _jsx(_components.span, {\n className: \"token punctuation\",\n children: \")\"\n })]\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsx(Heading, {\n level: \"2\",\n id: \"5-register-automation-workflow\",\n children: \"5. Register Automation Workflow\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"Register the automation workflow to your Latch workspace.\"\n }), \"\\n\", _jsx(CodeBlock, {\n filename: \"\",\n expandable: \"false\",\n children: _jsx(_components.pre, {\n className: \"language-shell-session\",\n children: _jsxs(_components.code, {\n className: \"language-shell-session\",\n children: [_jsx(_components.span, {\n className: \"\",\n children: _jsxs(_components.span, {\n className: \"token command\",\n children: [_jsx(_components.span, {\n className: \"token shell-symbol important\",\n children: \"$\"\n }), \" \", _jsxs(_components.span, {\n className: \"token bash language-bash\",\n children: [\"latch register \", _jsx(_components.span, {\n className: \"token parameter variable\",\n children: \"--remote\"\n }), \" \", _jsx(_components.span, {\n className: \"token parameter variable\",\n children: \"--yes\"\n }), \" automation-wf\"]\n })]\n })\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsx(Heading, {\n level: \"2\",\n id: \"6-create-automation\",\n children: \"6. Create Automation\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Navigate to \", _jsx(_components.a, {\n href: \"https://console.latch.bio/automations\",\n children: \"Automations\"\n }), \" tab via \", _jsx(_components.strong, {\n children: \"Worfklows\"\n }), \" \u003e \", _jsx(_components.strong, {\n children: \"Automations\"\n }), \" and click on the \", _jsx(_components.strong, {\n children: \"Create Automation\"\n }), \" button.\"]\n }), \"\\n\", _jsxs(_components.ol, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [\"\\n\", _jsxs(_components.p, {\n children: [\"Input an \", _jsx(_components.strong, {\n children: \"Automation Name\"\n }), \" and \", _jsx(_components.strong, {\n children: \"Description\"\n }), \".\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"\\n\", _jsxs(_components.p, {\n children: [\"Select the \", _jsx(_components.code, {\n children: \"Event Type\"\n }), \" as \", _jsx(_components.code, {\n children: \"Data Added\"\n }), \".\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"\\n\", _jsxs(_components.p, {\n children: [\"Specify \", _jsx(_components.code, {\n children: \"Follow-up Update Period\"\n }), \" to something short like 30 seconds to make your automation easy to test.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"\\n\", _jsxs(_components.p, {\n children: [\"Select a folder where files/folders will be uploaded using the \", _jsx(_components.code, {\n children: \"Select Target\"\n }), \" button. Any items uploaded to this folder will trigger the automation workflow.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"\\n\", _jsx(_components.p, {\n children: \"Select the automation workflow that you have just registered with Latch.\"\n }), \"\\n\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.img, {\n src: \"https://mintlify.s3-us-west-1.amazonaws.com/latchbio/workflows/sdk/assets/automation/create-ldata-automation-example.png\",\n alt: \"Create Ldata Automation Example\"\n })\n }), \"\\n\", _jsx(Heading, {\n level: \"2\",\n id: \"7-test-your-automation\",\n children: \"7. Test Your Automation\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"To test your automation, go to the target directory that you have specified when creating automation, and create a couple of folders. Upload any files to the folders, and wait for the trigger timer to expire.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Go to \", _jsx(_components.strong, {\n children: \"Worfklows\"\n }), \" \u003e \", _jsx(_components.strong, {\n children: \"All Executions\"\n }), \". There should be 1 automation workflow execution, and a target workflow execution for each child in your target directory. Each target workflow should print out\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = Object.assign({}, _provideComponents(), props.components);\n return MDXLayout ? _jsx(MDXLayout, Object.assign({}, props, {\n children: _jsx(_createMdxContent, props)\n })) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\nfunction _missingMdxReference(id, component) {\n throw new Error(\"Expected \" + (component ? \"component\" : \"object\") + \" `\" + id + \"` to be defined: you likely forgot to import, pass, or provide it.\");\n}\n","frontmatter":{},"scope":{"mintConfig":{"$schema":"https://mintlify.com/schema.json","name":"LatchBio","logo":{"light":"https://mintlify.s3-us-west-1.amazonaws.com/latchbio/logo/light.svg","dark":"https://mintlify.s3-us-west-1.amazonaws.com/latchbio/logo/dark.svg"},"favicon":"/favicon.png","colors":{"primary":"#001AAE","light":"#92A2FF","dark":"#92A2FF"},"topbarCtaButton":{"name":"Sign Up","url":"https://console.latch.bio/signup"},"topbarLinks":[{"url":"mailto:support@latch.bio","name":"Contact Us","_id":"672464fb85507cebe4ae6679"},{"url":"https://console.latch.bio/","name":"Log In","_id":"672464fb85507cebe4ae667a"}],"navigation":[{"group":"Introduction","pages":["start/introduction","start/quickstart"]},{"group":"Data","pages":["data/overview","data/basic-uploading-and-downloading","data/mount-s3-bucket","data/mount-gcp-bucket","data/basespace-downloader","data/data-command-line","data/sharing"]},{"group":"Visualizations","pages":["data/visualizations/fastqc","data/visualizations/cellxgene",{"group":"Interactive Genome Viewer (IGV)","pages":["data/visualizations/igv","data/visualizations/igv-setting-defaults","data/visualizations/igv-reference-genomes"]}]},{"group":"Registry","pages":["registry/what-is-a-registry","registry/create-a-project",{"group":"Bring Data into Registry","pages":["registry/add-records-to-a-table/single-records","registry/add-records-to-a-table/bulk-link","registry/add-records-to-a-table/import-data","registry/benchling-sync"]},"registry/connect-records-across-tables"]},{"group":"SDK","pages":["registry/sdk/import-registry-records","registry/sdk/latch-sdk-registry-integration","registry/sdk/account-objects","registry/sdk/registry-projects","registry/sdk/table-objects","registry/sdk/record-objects"]},{"group":"Overview","pages":["workflows/overview"]},{"group":"Workflows","pages":[{"group":"Verified Workflows","pages":[{"group":"Bulk RNA-seq","pages":["workflows/bulk-rna-seq-deep-dive","workflows/bulk-rna-seq"]},{"group":"ATAC-seq","pages":["workflows/ATAC-Seq-Deep-Dive","workflows/ATAC-Seq"]},"workflows/crispresso2","workflows/cas-offinder","workflows/crispor","workflows/alphafold",{"group":"MAGeCK","pages":["workflows/mageck-overview","workflows/mageck-count","workflows/mageck-test","workflows/mageck-mle","workflows/mageck-pathway","workflows/mageck-plot"]}]},"workflows/csv-import","workflows/resource-monitoring"]},{"group":"Python SDK","pages":["workflows/sdk/getting-started/quick-start","workflows/sdk/getting-started/authorizing-your-own-workflow",{"group":"Workflow Concepts","pages":["workflows/sdk/defining-a-workflow/what-is-a-workflow","workflows/sdk/defining-a-workflow/split-tasks",{"group":"Workflow Environment","pages":["workflows/sdk/defining-a-workflow/workflow-environment/overview","workflows/sdk/defining-a-workflow/workflow-environment/environments-for-individual-tasks","workflows/sdk/defining-a-workflow/workflow-environment/common-dockfile-patterns"]},"workflows/sdk/defining-a-workflow/latch-urls","workflows/sdk/defining-a-workflow/working-with-files","workflows/sdk/defining-a-workflow/legacy-file-support",{"group":"Customizing Your Interface","pages":["workflows/sdk/defining-a-workflow/customizing-your-interface/overview","workflows/sdk/defining-a-workflow/customizing-your-interface/parameter-types","workflows/sdk/defining-a-workflow/customizing-your-interface/workflow-documentation","workflows/sdk/defining-a-workflow/customizing-your-interface/previewing-workflow","workflows/sdk/defining-a-workflow/customizing-your-interface/forks-flows","workflows/sdk/defining-a-workflow/customizing-your-interface/results"]},"workflows/sdk/defining-a-workflow/messages","workflows/sdk/defining-a-workflow/defining-cloud-resources","workflows/sdk/defining-a-workflow/caching","workflows/sdk/defining-a-workflow/conditional-sections","workflows/sdk/defining-a-workflow/map-task","workflows/sdk/defining-a-workflow/storing-and-using-secrets","workflows/sdk/defining-a-workflow/versioning"]},{"group":"Testing and Debugging a Workflow","pages":["workflows/sdk/testing-and-debugging-a-workflow/development-and-debugging","workflows/sdk/testing-and-debugging-a-workflow/learning-through-an-example","workflows/sdk/testing-and-debugging-a-workflow/remote-execution"]}]},{"group":"Nextflow","pages":["workflows/sdk/nextflow/overview","workflows/sdk/nextflow/tutorial","workflows/sdk/nextflow/profiles","workflows/sdk/nextflow/caching","workflows/sdk/nextflow/registries",{"group":"Customizing Your Interface","pages":["workflows/sdk/nextflow/interface/about","workflows/sdk/nextflow/interface/results","workflows/sdk/nextflow/interface/param-validation","workflows/sdk/nextflow/interface/updating-entrypoint"]},"workflows/sdk/nextflow/dependencies","workflows/sdk/nextflow/gpus"]},{"group":"Snakemake","pages":["workflows/sdk/snakemake/quickstart","workflows/sdk/snakemake/cloud",{"group":"Advanced Configuration","pages":["workflows/sdk/snakemake/configuration/registries","workflows/sdk/snakemake/configuration/resources","workflows/sdk/snakemake/configuration/caching"]},"workflows/sdk/snakemake/tutorial","workflows/sdk/snakemake/debugging","workflows/sdk/snakemake/troubleshooting","workflows/sdk/snakemake/backend"]},{"group":"Automation","pages":["workflows/sdk/automation/overview","workflows/sdk/automation/example-data-addition","workflows/sdk/automation/example-interval"]},{"group":"Pods","pages":["pods/overview","pods/getting-started","pods/mount-data",{"group":"Shutdown Configuration","pages":["pods/auto-shutdown","pods/hard-shutdown"]},"pods/custom-app","pods/templates","pods/file-viewer",{"group":"Access \u0026 Integrations","pages":["pods/ssh","pods/integration-with-vscode","pods/integration-with-github"]}]},{"group":"Plots","pages":["plots/overview",{"group":"Basics","pages":["plots/basics","plots/developer/getting-started","plots/layouts","plots/developer/reactivity"]},{"group":"Data Plotting","pages":["plots/plotting/overview","plots/plotting/plot-types","plots/developer/custom-plots","plots/plotting/faceting","plots/plotting/styling","plots/plotting/error-bars","plots/plotting/selecting-points","plots/plotting/filtering"]},{"group":"Data Transformations","pages":["plots/transformations/overview","plots/transformations/widget-types","plots/transformations/outputs","plots/transformations/description-text"]},"plots/table-display-cell","plots/text-cell",{"group":"Developers","pages":["plots/developer/reactivity","plots/developer/ssh","plots/developer/dependencies"]},{"group":"Use Cases","pages":["plots/templates/overview","plots/templates/qpcr"]}]},{"group":"Overview","pages":["admin/overview"]},{"group":"Workspaces","pages":["admin/workspaces/overview","admin/workspaces/creating-new-workspace","admin/workspaces/inviting-members","admin/workspaces/roles","admin/workspaces/billing","admin/workspaces/move-copy-data","admin/workspaces/workspace-pod-templates"]},{"group":"Organizations: Manage Workspaces","pages":["admin/orgs/overview","admin/orgs/about","admin/orgs/adding-workspaces","admin/orgs/managing-members","admin/orgs/roles","admin/orgs/transfer-credits","admin/orgs/security","admin/orgs/analysis-packages"]},{"group":"Resources","pages":["resources/faq","resources/privacy-policy","resources/terms-of-service"]}],"primaryTab":{"name":"Documentation"},"anchors":[{"name":"Introduction","url":"start","icon":"house","_id":"672464fb85507cebe4ae6671"},{"name":"Data","url":"data","icon":"file-chart-column","_id":"672464fb85507cebe4ae6672"},{"name":"Registry","url":"registry","icon":"table","_id":"672464fb85507cebe4ae6673"},{"name":"Workflows \u0026 SDK","url":"workflows","icon":"screwdriver-wrench","_id":"672464fb85507cebe4ae6674"},{"name":"Pods","url":"pods","icon":"hexagon","_id":"672464fb85507cebe4ae6675"},{"name":"Plots","url":"plots","icon":"chart-scatter-bubble","_id":"672464fb85507cebe4ae6676"},{"name":"Administration","url":"admin","icon":"screen-users","_id":"672464fb85507cebe4ae6677"},{"name":"Resources","url":"resources","icon":"clipboard-question","_id":"672464fb85507cebe4ae6678"}],"tabs":[{"name":"API References","url":"https://docs.latch.bio/api/modules.html","_id":"672464fb85507cebe4ae666d"},{"name":"Blog","url":"https://latchbio.substack.com/","_id":"672464fb85507cebe4ae666e"},{"name":"Website","url":"https://latch.bio/","_id":"672464fb85507cebe4ae666f"},{"name":"Change Log","url":"https://latchbio.notion.site/LatchBio-Product-Change-Logs-ca76a6ae05a74a4daf78cb4006ad80ac","_id":"672464fb85507cebe4ae6670"}],"feedback":{"thumbsRating":true,"raiseIssue":true},"redirects":[{"destination":"/start/introduction","source":"/wiki/introduction","_id":"672464fb85507cebe4ae6650"},{"destination":"/start/quickstart","source":"/wiki/getting-started","_id":"672464fb85507cebe4ae6651"},{"destination":"/start/introduction","source":"/wiki","_id":"672464fb85507cebe4ae6652"},{"destination":"/data/:slug*","source":"/wiki/data/:slug*","_id":"672464fb85507cebe4ae6653"},{"destination":"/data/overview","source":"/wiki/data","_id":"672464fb85507cebe4ae6654"},{"destination":"/data/visualizations/:slug*","source":"/wiki/visualizations/:slug*","_id":"672464fb85507cebe4ae6655"},{"destination":"/data/visualizations/fastqc","source":"/wiki/visualizations","_id":"672464fb85507cebe4ae6656"},{"destination":"/registry/:slug*","source":"/wiki/registry/:slug*","_id":"672464fb85507cebe4ae6657"},{"destination":"/registry/what-is-a-registry","source":"/wiki/registry","_id":"672464fb85507cebe4ae6658"},{"destination":"/workflows/:slug*","source":"/wiki/workflows/:slug*","_id":"672464fb85507cebe4ae6659"},{"destination":"/workflows/csv-import","source":"/wiki/workflow-helpers/csv-import","_id":"672464fb85507cebe4ae665a"},{"destination":"/workflows/overview","source":"/wiki/workflows","_id":"672464fb85507cebe4ae665b"},{"destination":"/workflows/overview","source":"/docs/getting-started/index","_id":"672464fb85507cebe4ae665c"},{"destination":"/pods/:slug*","source":"/wiki/pods/:slug*","_id":"672464fb85507cebe4ae665d"},{"destination":"/pods/overview","source":"/wiki/pods","_id":"672464fb85507cebe4ae665e"},{"destination":"/plots/:slug*","source":"/wiki/plots/:slug*","_id":"672464fb85507cebe4ae665f"},{"destination":"/plots/plotting/:slug*","source":"/wiki/plots/plotting/:slug*","_id":"672464fb85507cebe4ae6660"},{"destination":"/plots/developer/:slug*","source":"/wiki/plots/developer/:slug*","_id":"672464fb85507cebe4ae6661"},{"destination":"/plots/overview","source":"/wiki/plots/overview","_id":"672464fb85507cebe4ae6662"},{"destination":"/plots/overview","source":"/wiki/plots","_id":"672464fb85507cebe4ae6663"},{"destination":"/admin/workspaces/:slug*","source":"/wiki/workspaces/:slug*","_id":"672464fb85507cebe4ae6664"},{"destination":"/admin/workspaces/overview","source":"/wiki/workspaces","_id":"672464fb85507cebe4ae6665"},{"destination":"/admin/orgs/:slug*","source":"/wiki/organizations/:slug*","_id":"672464fb85507cebe4ae6666"},{"destination":"/admin/orgs/overview","source":"/wiki/organizations","_id":"672464fb85507cebe4ae6667"},{"destination":"/resources/:slug*","source":"/wiki/resources/:slug*","_id":"672464fb85507cebe4ae6668"},{"destination":"/resources/faq","source":"/wiki/resources","_id":"672464fb85507cebe4ae6669"},{"destination":"/workflows/sdk/:slug*","source":"/docs/:slug*","_id":"672464fb85507cebe4ae666a"},{"destination":"/workflows/overview#bring-your-own-workflow","source":"/docs","_id":"672464fb85507cebe4ae666b"},{"destination":"/workflows/overview","source":"/docs/quickstart/index","_id":"672464fb85507cebe4ae666c"}],"footerSocials":{"twitter":"https://twitter.com/latchbio","linkedin":"https://www.linkedin.com/company/latchbio/"},"analytics":{"koala":{"publicApiKey":"pk_0469d6299947a84c711662e1ed49f0fea8d7"}},"repo":{"github":{"owner":"latchbio","repo":"wiki","contentDirectory":"","deployBranch":"main","isPrivate":false}}},"pageMetadata":{"title":"Data Addition Trigger","description":null,"sidebarTitle":"Example Data Addition Trigger","icon":"table","iconType":"solid","href":"/workflows/sdk/automation/example-data-addition"}}},"entitlements":{"AI_CHAT":{"status":"ENABLED"}}},"__N_SSG":true},"page":"/_sites/[subdomain]/[[...slug]]","query":{"subdomain":"wiki.latch.bio","slug":["workflows","sdk","automation","example-data-addition"]},"buildId":"Een-WiNRwYtikoUb8u0AO","isFallback":false,"isExperimentalCompile":false,"gsp":true,"scriptLoader":[]}</script></html></body></html>

Pages: 1 2 3 4 5 6 7 8 9 10