Plugin Request: Synchronize YouTube Watch History with Obsidian

Hello everyone,

I am seeking your assistance in creating an Obsidian plugin that can automate the synchronization of my YouTube watch history directly into Obsidian. Here is what I would like the plugin to accomplish:

  1. Authentication with YouTube API:

    • Use OAuth 2.0 to connect to my Google account and access my YouTube watch history.
  2. Extract Watch History:

    • Retrieve the videos I have watched along with their relevant information (title, URL, watch date).
  3. Automatically Generate Markdown Notes:

    • Create a formatted note for each video with the following details:
      • Video title
      • YouTube link
      • Watch date
      • Sections to add summaries and personal notes
  4. Periodic Updates:

    • Allow for regular updates (daily, weekly, etc.) to add newly watched videos into Obsidian.

Example Note Format:

---
title: "Video Title"
url: "https://www.youtube.com/watch?v=example"
date_watched: "2024-08-05"
tags: [YouTube, Video]
---

# Video Title
**Link**: [Watch on YouTube](https://www.youtube.com/watch?v=example)
**Watch Date**: 2024-08-05

## Summary
- Add a summary here.

## Notes
- Add notes here.

Why This Is Important:

  • Automation and Time-Saving: I want to avoid manually copying each video I watch into Obsidian.
  • Centralization of Information: Keeping all my notes and multimedia content centralized in Obsidian for more efficient management.
  • Flexibility and Customization: Having the ability to customize the generated notes for each video according to my needs.

I am willing to provide additional details and test the plugin once developed. I would be extremely grateful if someone could help me achieve this integration.

Thank you in advance for your help and support!

Best regards,

2 Likes

Moved to plugin ideas

2 Likes

Have you looked at the Youtube API?

It will take you to the Youtube Data API

There is a method to retrieve data via a search based upon ownership, which would pull all your own videos, or videos of another user:

forContentOwner 	boolean
This parameter can only be used in a properly authorized request, and it is intended exclusively for YouTube content partners.

The forContentOwner parameter restricts the search to only retrieve videos owned by the content owner identified by the onBehalfOfContentOwner parameter. If forContentOwner is set to true, the request must also meet these requirements:

    The onBehalfOfContentOwner parameter is required.
    The user authorizing the request must be using an account linked to the specified content owner.
    The type parameter value must be set to video.

and

forMine 	boolean
This parameter can only be used in a properly authorized request. The forMine parameter restricts the search to only retrieve videos owned by the authenticated user. If you set this parameter to true, then the type parameter's value must also be set to video. In addition, none of the following other parameters can be set in the same request: videoDefinition, videoDimension, videoDuration, videoEmbeddable, videoLicense, videoPaidProductPlacement, videoSyndicated, videoType.

Alternatively there is a method for retrieving data from a playlist, so you would save items you want to pull into obsidian to a playlist.

There are a few obsidian plugins that already tackle certain aspects of this problem.

I found guelo which will pull youtube likes.

Ytranscript will pull transcripts from a video

media-notes allows one to take notes.

What I want is a funnel of all my youtube activity processed via my own filter (to filter out kids videos, adverts etc), to then sort into machine readible list, and to fine-tune this into a journal of my video consumption etc.

Auto-tags that I can then use to pull into my journal notes when I want to reference something I have watched etc.