Use Apple Shortcuts to send notes on YouTube videos to Readwise

I created an Apple Shortcut that takes a YouTube video URL, retrieves the Title of the video, prompts you for the Author and Notes you want to include, then adds it as a new highlight in Readwise.

Why do I use Readwise?

I have been using Readwise quite a bit lately as the place where I capture highlights and notes from books, articles, tweets, and podcasts. Not only do I use it for highlights, but in a way, it has become a way for me to bookmark ideas that I find across the internet.

Why capture YouTube videos?

The Readwise extension and apps do a great job of capturing from books, articles, and tweets. But I watch a lot of YouTube videos. I often want to capture brief notes about these videos to reference them later.

I also capture interesting videos with a summary I can share in my newsletters.

What you’ll need to get started.

You’ll need a few things to get started.

Create your Apple Shortcut

Enable Share Sheet

  • Enable the Share Sheet in your Shortcut. The input will automatically be added to the top.
  • Change the action to receive URLs from the Share Sheet and Quick Actions.

Get the Title of the Video

You won’t get the video’s title if you only use the YouTube video URL. To get the title, we can call a YouTube API to return this for us.

  • Add a Get Contents of URL action.
  • Set the URL to https://www.youtube.com/oembed?url=Shortcut Input&format=json where the “Shortcut Input” is coming from the variable of the first action.

Ask for Author and Notes

  • (Optional) Add an Ask for Input action. Set it to Text and set the Prompt to “Who is the Author?. “
  • Add an Ask for Input action. Set it to Text and the prompt to “What notes would you like to add?.”

Call the Readwise API

  • Add another Get Contents of URL action.
  • Change the URL to https://readwise.io/api/v2/highlights/
  • Change the method to Post.
  • In the Headers, add a Key called Authorization. In the value, add Token {{Your Readwise API Token}}.
  • Ensure Request Body is set to JSON.
  • Add a Key called highlights. The type should be Array.
  • Click on the highlights key and then add another key of type Dictionary.
  • Within that dictionary key, you’ll add 4 text keys. Setting the value of each key to the appropriate variable from the actions we asked for earlier.

Run and Test your Shortcut

  • Click on Run.
  • Since you’re not triggering this from the Share Menu, it will ask you for the URL. Enter a URL to a YouTube video.
  • It will next prompt you for the Author.
  • Next, you’ll be prompted for your notes. I usually take notes in an Apple Quick Note and then paste them into the shortcut when I’m done.
  • If successful, you’ll see some JSON at the end of the Shortcut containing your content.
  • If unsuccessful, you should see an error message.

Check out your highlight in Readwise

  • Open the Readwise Latest page, which shows your latest highlights.
  • You should see your new highlight!

Conclusion

This shortcut is not perfect. It can be improved in some ways. Let me know if you have any suggestions.

As I make improvements, I’ll continue to update this post.



✴️ Also on Micro.blog
Eric Gregorich @ericgregorich