How to sync your Zotero references in Coda (Using Make)

Zotero is an excellent tool for managing references, thanks to its browser extension, which simplifies capturing resources for academic work. It also facilitates extracting references from resources. For writing academic papers, the combination of databases (tables) and free writing provided by tools like Coda or similar can be useful. These tools also make it simple to reference resources in-text without disrupting the writing flow.

Syncing data between Zotero and Coda can facilitate the process of producing your paper/thesis/academic work. It can assist you in organizing your knowledge. You can capture your references in Zotero and then write your thesis/paper/article in Coda, or a similar tool. In this article, we will focus on syncing data between Zotero and Coda using Make.

Make is an automation software with a user-friendly drag-and-drop interface and powerful API capabilities. There are other automation software options available, such as your custom script or alternative tools like n8n, Zapier, IFTTT, or similar. In Coda, you may also create Coda packs to sync data across tools. At the time of this post, I did not create a Pack because the API authentication method provided by Zotero (Oauth 1.0) is not available in the Coda Pack SDK. In contrast, users can find the use of Make more friendly and a good fit also for less technical people thanks to the no-code nature of the software.

What is Zotero

Zotero is a free reference management software that you can install on your computer or use in the browser. It's a powerful tool for managing academic references, allowing you to export and cite them directly in your Word document (for example, if you use the Office suite) through its Word extension. While Word is a great option for using Zotero, this article explores syncing Zotero with cloud-based software Coda through custom-built automation.

What is Coda

Coda is a "one doc" solution that combines tables and text pages to create a connected, alive, scalable document. It is the all-in-one doc that brings words, data, and teams together. Coda also includes a collaborative editing feature similar to Google Docs/Word, which makes it a great tool for receiving feedback on papers, articles, and theses.

How to sync data between Zotero and Coda through Make

To automate this process, we will use Make, the Zotero API, and Coda API. We will use the HTTP module to make API calls to Zotero since it's not supported natively in Make. The Coda API is available natively in Make, so we will use that for our API calls. You can find the API documentation for Zotero here, for Coda here, and for the HTTP module here. The automation involves adding a new resource (item) to Coda when it's added to Zotero. The picture below shows what the entire scenario in Make can look like.

A screenshot of the whole Make scenario to automate sending Zotero items to Coda


Here are the steps for creating the scenario (automation) in Make to sync Zotero references and authors to the dedicated tables in Coda. For a more visual explanation, watch this video.

  1. Create a new scenario in Make

  2. Set up Zotero web (follow API documentation instructions)

    If you haven’t already done so, you will need to set up your Zotero web account first. This is a web-based version of Zotero that syncs data from your desktop app automatically. Our automation will use this environment to get your new references in Zotero. You can follow these steps to activate your Zotero web account.

    2b. Authenticate Zotero in Make through the HTTP module

    Once your Zotero web account is activated, you will authenticate it in Make on the HTTP “Make a request” module. This is your trigger (first module) in the automation. In the HTTP module, add a header with key: Authorization and value: Bearer {{yourToken}}. Replace {{yourToken}} with your API token. You can create your API token from the Zotero web app here. You can then copy your new private key and paste it after Bearer in your authentication header.

    The HTTP request is GET, and the endpoint URL is https://api.zotero.org/users/{{userID}}/collections/{{ID}}/items?dateModified=desc&limit=10. Replace {{userID}} and {{ID}} with your own user and collection ID. You can get your userID here. You can get the collection ID from the URL of your collection. The collection ID is the string at the end of the URL of your collection (highlighted in the screenshot below).

    Use this API call to retrieve data from a designated collection in Zotero. This simplifies the process and aligns with our use case of syncing Zotero and Notion for a particular paper or thesis. By keeping all your references in one collection (folder) in Zotero, the process becomes more streamlined.

The collection ID is the string after the last slash in the web URL of your Zotero collection.

Set up the Coda doc (or copy the pre-made doc here). You can include two related tables in the Coda Doc: “References”, and “Authors”. Each reference is related to at least one author. Each author can be related to one or multiple references.

Follow the steps in the video to create the scenario

  1. Add the HTTP module “make a request” to get data from Zotero. Follow the instructions in point #2 above. This will allow you to retrieve items from a specific collection in Zotero. Right-click on the module, then select “Run this module only”. This allows you to get data and test that the module is working as expected.

  2. Add an Iterator to split the data. Map the “Data” array from the HTTP module output in the Iterator.

  3. Add the Coda module “List Rows”, and connect your Coda account in Make if you haven’t already done so. To get your Coda API token, open a Coda doc > access “Account settings” after clicking on your account picture at the top right corner of the doc > scroll down to “API settings” > “Generate API token” > copy token and paste it in Make.

    This module allows you to search the existing items in Coda by the Zotero Key (a unique field) so that the scenario will only continue if nothing is found (i.e., the item was not already added to Coda). This step avoids duplicates in your Coda doc. In the “query” field, you can write the following: "Zotero Key":"{{4.data.key}}” (assuming your column in Coda is named “Zotero Key”—otherwise, replace it with your column name).

  4. Add a filter for “Total number of bundles”=0. This ensures the scenario will only continue if nothing is found in the Coda table.

  5. Add the Coda module “Create a row”. Select the appropriate Coda Doc and table (the “References” table), then map all the values from the “Iterator” into each column in the Coda table.

  6. Add an Iterator to loop the authors (an Array data type), and map the “Creators” field from the previous Iterator. This module will create unique bundles for each author, which we can then map into the dedicated “Authors” table in Coda.

  7. Add a “Sleep” module to delay the next step for 10 seconds. This ensures the scenario does not run into the Coda API rate limit, which I encountered while testing the scenario with multiple items in a single run.

  8. Add the Coda module “Upsert a row”. This module allows you to update or create a row in the “Authors” table based on whether the author exists. You can use the “Name” as the “Key Column”. Then map the values from the previous Iterator to create the author in the Coda table.

Once all of this is done, your scenario is ready. You can click the button “Run once” if you want to fully test it out. You can also define the frequency of the scenario runs (bottom left corner), before activating it. And heading off to produce your next best paper.

 
 



Similar Articles


Previous
Previous

On Integrity - according to the Conscious Leadership Group

Next
Next

How Coda AI works - overview and best practices