Learn how to seamlessly transfer your valuable notes and highlights from Readwise to Mem using the powerful capabilities of Raycast. This comprehensive guide is designed for avid readers, dedicated note-takers, and anyone who seeks to have their information readily accessible at their fingertips. 

By following these steps, you'll be able to automate the process of importing your book highlights into Mem, ensuring that your insights are always organized, searchable, and ready to enhance your creative projects. Whether you're a student, a professional, or a lifelong learner, this guide will help you streamline your workflow and make the most of your reading experiences.

Understanding Raycast

If you’re not familiar with Raycast, it’s an app for Mac users that makes it easy to create custom shortcuts and commands to automate everyday tasks. Think of it as Spotlight on steroids, offering features like clipboard history, quick links, shortcuts, and even built-in AI.
In this guide, you’ll use Raycast to automate a workflow that brings all your book highlights into Mem. This way, they can be easily searched, tagged, and used for your creative projects by simply typing in the title of the book. Let’s dive in!

Step 1: Gathering Your API Keys

Before building anything, you need to gather three important API keys. These keys will unlock the doors for your automation.

Mem API Key

To access your Mem API key, go to the settings by clicking the icon in the top right corner. Then, click on setup integrations to find the option to create your API key. Once created, copy and paste it into a note—either in Mem or a notepad, depending on your preference.

Readwise API Key

Next, you need your Readwise API key. This key allows you to connect Readwise, where all your book highlights are stored. Access it by visiting this url. You can also search for "Readwise API" to find it. Click on the link that says "Readwise.io/access token" to copy your access token.

OpenAI API Key

Finally, if you want summarization features, you’ll need your OpenAI API key. You might also need a ChatGPT Plus subscription. Access this key by visiting this URL.
Once you have all three API keys, you’re ready to move on to the next step.

Step 2: Creating a Script Command in Raycast

Now, you’ll create something in Raycast called a script command. This command will retrieve book highlights, import them to Mem, send them to ChatGPT for summarization, and then import the summary back into Mem.

How to Create a Script Command

Creating a script command is simple. Once Raycast is installed, press your chosen hotkey to activate it. You’ll see several commands and extensions available. Navigate to the extensions screen and select the "Scripts" tab. Here, you can create a new script command titled "Fetch Book Highlights and Send Them to Mem."

Important Considerations

When creating your script command, ensure Raycast can access it. Save it in the right place, such as a Dropbox folder titled "RC Scripts," so Raycast can find it. If your script requires an argument, like a book title, make sure to include it.

Step 3: Setting Up and Testing Your Script

With Raycast installed, press your hotkey to activate it. You’ll notice various commands and extensions available. This tool runs in the background, and once you start using it, you’ll realize how dependent you become on it.

Creating a Test Script

To demonstrate, create a simple test script command. Ensure Raycast can access it by saving it in the correct directory. If your script has an argument, like a book title, make sure to include it.

Accessing Your Script

Navigate to the extensions screen and open your script titled "Simple Test." You’ll see parameters at the top, which are crucial for Raycast to access the script. Removing these parameters may cause your script to disappear from Raycast.

Handling API Keys and Errors

This section is where you’ll input your API keys. If you copy and paste the entire script, you might encounter errors. In such cases, paste the script into ChatGPT and ask for help identifying the errors. It may instruct you to install certain components through Terminal. Once resolved, your highlights should import seamlessly into Mem.

Finalizing Your Script Setup

Now that your script command is set up, update the code with your API keys. A sample code will be provided for reference. Here comes the fun part—testing your setup!

Executing the Raycast Script Command

Head to the home screen on Mem and execute the command to fetch book highlights and send them to Mem. Be cautious of typos, as they may cause issues. Import a book you haven’t yet added, like "The Creativity Advantage." You’ll see your highlights successfully sent to Mem, along with a summary based on your prompt. This method is simple yet flexible, allowing for further customization.

Customizing Your Queries

You can customize how you query Readwise. For instance, you might want specific notes on a topic or containing a keyword for an article. This flexibility enhances your ability to retrieve information quickly.

Importing Options

In this setup, everything imports directly to Mem. However, you can adjust it to search Readwise for specific highlights and copy-paste them if you prefer. You can also separate the summary and import steps for more control.

You’ve successfully set up a workflow to import Readwise highlights to Mem using Raycast. This process streamlines your note-taking and enhances your creative projects. If you have any questions, feel free to leave them in the comments below.