Skip to content

dforwardfeed/slack-AIpodcast-summaries

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YouTube Transcript Bot

A Slack integration that monitors channels for YouTube URLs, extracts and summarizes video transcripts using OpenAI, and stores them in a Weaviate vector database for future reference and querying. Specifically designed for generative AI podcasts and interviews with founders, operators, and researchers to extract technical insights.

Python Version License Slack Integration OpenAI Powered Weaviate Vector Database Arcade.dev Integration

Overview

YouTube Transcript Bot processes YouTube videos shared in Slack. When a team member posts a YouTube link in a monitored channel, the bot:

  1. Extracts the video transcript
  2. Generates a concise summary using OpenAI
  3. Delivers the summary as a direct message to the specified user
  4. Stores the summary in a Weaviate vector database for future semantic searching

Key Features

  • Slack Channel Monitoring: Watches specified Slack channels for YouTube URLs
  • Transcript Extraction: Pulls transcripts from YouTube videos
  • AI-Powered Summarization: Uses OpenAI to create summaries
  • Private Delivery: Sends summaries as direct messages
  • Vector Database Storage: Stores summaries in Weaviate for semantic searching
  • Query Functionality: Supports natural language queries with !query command

How It Works

The application uses:

  • Arcade.dev for seamless Slack integration without requiring a custom Slack app
  • YouTube Transcript API for extracting video transcripts
  • OpenAI API for generating summaries
  • Weaviate serverless cluster for vector database storage
  • Weaviate Query Agent for efficient natural language querying of stored summaries

Weaviate Query Agent

The bot leverages Weaviate's Query Agent to provide powerful natural language querying capabilities. This pre-built agentic service abstracts away the complexities of vector search, allowing users to query stored summaries using simple natural language.

When a user issues a !query command, the Weaviate Query Agent analyzes the query, determines the appropriate search strategy, and returns relevant summaries that best match the semantic intent.

Arcade.dev Integration

The bot uses Arcade.dev to seamlessly integrate with Slack without requiring a custom Slack app. This integration provides secure user impersonation, independent scaling, and enterprise-ready security while significantly simplifying the development process.

Installation

Prerequisites

  1. Python 3.8 or higher
  2. An Arcade.dev account with API key
  3. An OpenAI API key
  4. A Weaviate Cloud serverless cluster (free tier available)
  5. A Slack workspace where you have permissions to add apps

Setup

  1. Clone the repository

    git clone https://github.com/yourusername/youtube-transcript-bot.git
    cd youtube-transcript-bot
  2. Install required packages

    pip install -r requirements.txt
  3. Set up environment variables Create a .env file in the project root with the following variables:

    # API Keys
    ARCADE_API_KEY=your_arcade_api_key
    OPENAI_API_KEY=your_openai_api_key
    WEAVIATE_URL=your_weaviate_cluster_url
    WEAVIATE_API_KEY=your_weaviate_api_key
    
    # User Configuration
    USER_ID=your_email@example.com
    CHANNEL_NAME=youtube
    TARGET_USERNAME=username_to_receive_summaries
    
  4. Run the application

    python main.py

    On first run, you'll need to authorize the application with Slack through the Arcade.dev API.

Usage

  1. Start the bot using python main.py
  2. Share YouTube links in the configured Slack channel
  3. The bot will process videos and send summaries as direct messages
  4. Query past summaries with !query [your question] in the Slack channel

Example: !query What are the best practices for React performance?

Troubleshooting

If the bot isn't working as expected:

  • Ensure you have the latest version of Arcade tools: tool_name="Slack.GetMessagesInChannelByName@[latest version] - Slack.GetChannelMetadataByName@[latest version], Slack.SendDmToUser@[latest version]
  • Ensure all API keys in your .env file are correct
  • Verify the YouTube link has an available transcript
  • Check that the channel name matches exactly (case-sensitive)
  • Make sure your Weaviate cluster is running

MIT Licensed

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors