> ## Documentation Index
> Fetch the complete documentation index at: https://wiki.latch.bio/llms.txt
> Use this file to discover all available pages before exploring further.

# Benchling Integration

Latch Registry allows you to perform a one-way sync to bring entities from [Benchling Registry](https://www.benchling.com/resources/benchling-registry-product-sheet) and [Benchling Inventory](https://www.benchling.com/resources/benchling-inventory-product-sheet) to Latch Registry as tables.

Once Benchling data is transformed into table forms on Latch, you can:

* Easily search, sort, filter, and join data across tables.
* Directly sync sequences from Benchling Protein entities, for example, and kick-start hundreds of AlphaFold2 for protein prediction or DNA Chisel for codon optimization.

This document walks through the process of setting up the Benchling one-way data sync to the Latch Registry.

<Note>The list of currently supported Benchling schemas are Custom Entities, DNA Sequences, AA Sequences, Mixtures, DNA Oligos, RNA Oligos, Molecules, and Plates.</Note>

## Setup Benchling Sync

The integration works by using your Benchling developer API key.

<Steps>
  <Step title="Set up Benchling.">
    In [Latch Console](https://console.latch.bio/settings/developer), go to Workspace Settings > Developer, and click on `Benchling`.

    <img src="https://mintcdn.com/latchbio/LdV6VvwVO8ylN7Bn/images/benchling/credentials-1.png?fit=max&auto=format&n=LdV6VvwVO8ylN7Bn&q=85&s=f94c271699a1f1a7f25d01fd14238aa4" alt="" width="1639" height="1020" data-path="images/benchling/credentials-1.png" />
  </Step>

  <Step title="Get your personal API key.">
    Follow the official [Benchling tutorial](https://help.benchling.com/hc/en-us/articles/9714802977805-Access-the-Benchling-Developer-Platform#h_2962600be3) to get your personal user API key.
  </Step>

  <Step title="For `BENCHLING_API_KEY`, enter your Benchling API key.">
    Ex. `sk_example_key`.
  </Step>

  <Step title="For `BENCHLING_TENANT_URL` enter your tenant URL.">
    <Note>Include the full tenant URL including `https://`.</Note>
    To find the tenant URL, log into your Benchling account or organization and copy the URL in the address bar as indicated in the image below.

    <img src="https://mintcdn.com/latchbio/MyGUG0Q2iaPqX-v6/images/registry/bench11.png?fit=max&auto=format&n=MyGUG0Q2iaPqX-v6&q=85&s=cfc7bcdf73a469547d709f1c43efd31e" className="w-full border-slate-100 border rounded-md" width="1213" height="139" data-path="images/registry/bench11.png" />

    Ex. `https://latch.benchling.com/`.
  </Step>

  <Step title="Click `Submit` to save your Benchling credentials which will securely store your credentials in Amazon Secrets Manager.">
    <img src="https://mintcdn.com/latchbio/LdV6VvwVO8ylN7Bn/images/benchling/credentials-2.png?fit=max&auto=format&n=LdV6VvwVO8ylN7Bn&q=85&s=256f046b9650bbcc729499f612133e87" alt="" width="1636" height="1092" data-path="images/benchling/credentials-2.png" />
  </Step>

  <Step title="You will see your Benchling secrets added to the `Workspace Secrets` section.">
    <img src="https://mintcdn.com/latchbio/LdV6VvwVO8ylN7Bn/images/benchling/credentials-3.png?fit=max&auto=format&n=LdV6VvwVO8ylN7Bn&q=85&s=f5ebf91acfecbd60320eda743255a3fd" alt="" width="1554" height="1052" data-path="images/benchling/credentials-3.png" />
  </Step>
</Steps>

## Syncing Data Using Benchling Sync

After successfully adding your Benchling credentials to Latch, you can go to the Latch Registry and sync your Benchling data to a new project on Latch.

<Note>Only one-way sync from Benchling to Latch is supported at the moment.</Note>

<Steps>
  <Step title="Go to `Registry`." />

  <Step title="Create a new project by clicking `New Project` in the sidebar.">
    <img src="https://mintcdn.com/latchbio/LdV6VvwVO8ylN7Bn/images/benchling/data-1.png?fit=max&auto=format&n=LdV6VvwVO8ylN7Bn&q=85&s=bfb72391531cbe372f67c4f933174ed9" alt="" width="2054" height="514" data-path="images/benchling/data-1.png" />

    <img src="https://mintcdn.com/latchbio/LdV6VvwVO8ylN7Bn/images/benchling/data-2.png?fit=max&auto=format&n=LdV6VvwVO8ylN7Bn&q=85&s=afee508baeaa95449bdf091a61751133" alt="" width="2044" height="1400" data-path="images/benchling/data-2.png" />
  </Step>

  <Step title="Click on `Benchling Data Sync` in the top right corner.">
    <img src="https://mintcdn.com/latchbio/LdV6VvwVO8ylN7Bn/images/benchling/data-3.png?fit=max&auto=format&n=LdV6VvwVO8ylN7Bn&q=85&s=2150556b9467e40e4aec896c9f4ebfbb" alt="" width="2052" height="306" data-path="images/benchling/data-3.png" />
  </Step>

  <Step title="Select the project to sync data into.">
    <img src="https://mintcdn.com/latchbio/LdV6VvwVO8ylN7Bn/images/benchling/data-4.png?fit=max&auto=format&n=LdV6VvwVO8ylN7Bn&q=85&s=a38b58b5f83449fa94da9318e3255e21" alt="" width="2154" height="1546" data-path="images/benchling/data-4.png" />

    <img src="https://mintcdn.com/latchbio/LdV6VvwVO8ylN7Bn/images/benchling/data-5.png?fit=max&auto=format&n=LdV6VvwVO8ylN7Bn&q=85&s=20ea77ff5ab60db1791595d9ce8ce2d1" alt="" width="2156" height="1550" data-path="images/benchling/data-5.png" />
  </Step>

  <Step title="Use the selector to switch between Plate and Entity schemas.">
    <img src="https://mintcdn.com/latchbio/LdV6VvwVO8ylN7Bn/images/benchling/data-6.png?fit=max&auto=format&n=LdV6VvwVO8ylN7Bn&q=85&s=ed0d22411f6b2bcc4483fe32833626d3" alt="" width="2154" height="305" data-path="images/benchling/data-6.png" />
  </Step>

  <Step title="Check the Benchling Schemas and columns that you want to sync.">
    These schemas will be synced into the tables under the project that you have selected in step 4. If the entity schema you selected links to other schemas, the related schemas will be automatically selected for an sync as well. This is to ensure the parent-child relationships in Benchling are also propagated to Latch Registry tables.

    <img src="https://mintcdn.com/latchbio/LdV6VvwVO8ylN7Bn/images/benchling/data-7.png?fit=max&auto=format&n=LdV6VvwVO8ylN7Bn&q=85&s=0ca111ce882dee8af381113dbf0715e8" alt="" width="2152" height="1432" data-path="images/benchling/data-7.png" />
  </Step>
</Steps>

## (Optional) Enable Automatic Sync

If this option is enabled, your data will be automatically synced from Benchling to Latch every 30 minutes.

<img src="https://mintcdn.com/latchbio/LdV6VvwVO8ylN7Bn/images/benchling/data-8.png?fit=max&auto=format&n=LdV6VvwVO8ylN7Bn&q=85&s=549071e0df13c3af48f38754c373d845" alt="" width="2154" height="305" data-path="images/benchling/data-8.png" />

<Steps>
  <Step title="Click `Save Sync Settings` to save the state of your sync." />

  <Step title="Click `Manual Sync` to manually sync all the schemas that you have selected into Latch.">
    Depending on the size and the amount of schemas that you are syncing, this might take a couple of minutes. Please keep the tab with the sync open. If you need to use the rest of the platform, please open a new tab and go to the Console page there.
  </Step>

  <Step title="After the sync exits, all of the schemas that you have selected will be available in the specified project.">
    <img src="https://mintcdn.com/latchbio/LdV6VvwVO8ylN7Bn/images/benchling/data-9.png?fit=max&auto=format&n=LdV6VvwVO8ylN7Bn&q=85&s=008611e3fa9f98764e6d265810c0a597" alt="" width="1684" height="1142" data-path="images/benchling/data-9.png" />
  </Step>
</Steps>
