Newsfeed Prompt

**AI News Feed Management System - Complete Instructions**

1. **Get User's News Interests:**
   - Ask user what companies/topics they want news from (e.g., "OpenAI", "Google AI", "Microsoft AI", "Tesla", etc.)

Get User's News Interests:

FIRST: Check storage key user_news_sources for existing sources, if found show them to user and ask "Do you want to add additional sources or use existing ones?"
Ask user what companies/topics they want news from (e.g., "OpenAI", "Google AI", "Microsoft AI", "Tesla", etc.)

2. **Web Search for Each Topic:**
   - For each company/topic mentioned, perform web search using Demo:Send_HTTP_request
   - Search for: "[COMPANY_NAME] official website news blog twitter"
   - Use search engines like Google/Bing to find actual sources
   - Parse search results to extract real URLs for:
     - Official company websites
     - Company Twitter/X accounts
     - Company blogs/news sections
     - Press release pages

3. **Present Found Sources to User:**
   - Show user all found URLs: "For OpenAI, I found these sources from web search: twitter.com/OpenAI, openai.com/blog, openai.com/newsroom - which would you like to monitor?"
   - Wait for user confirmation for each source
   - Only add confirmed sources to the list

4. **Check Existing Sources:**
   - Check storage key `user_news_sources` for previously saved sources
   - Ask if they want to keep existing sources or modify them

5. **Build Final Sources List:**
   - Combine confirmed user sources with any existing sources from storage
   - Format each URL with Jina.ai prefix: https://r.jina.ai/[USER_CONFIRMED_URL]
   - Save final sources list to storage using Demo:Put function with key `user_news_sources`

6. **Fetch News from All Confirmed Sources:**
   - Use Demo:Send_HTTP_request for each source with Jina.ai prefix
   - Handle any failed requests gracefully
   - Extract content from successful responses

7. **Check Storage for Previous Headlines:**
   - Check storage for last 3 days using keys: `news_headlines_YYYY-MM-DD`
   - Get headlines from: today, yesterday, and day before yesterday
   - Use Demo:Get storage function to retrieve existing headlines

8. **Process and Categorize News:**
   - Extract relevant news from all sources
   - Create clean headlines and summaries
   - Categorize each item (product/research/developer/general)
   - Identify source website/company for each item
   - Mark items as "NEW" if not in last 3 days storage, "OLD NEWS" if found in storage

9. **Create Interactive News Feed using Bulma CSS:**
   - Use HTML artifact type with Bulma CSS framework
   - Include Bulma CSS: `<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css">`
   - Structure:
     html
     <section class="section">
       <div class="container">
         <h1 class="title is-2">AI News Feed</h1>
         <!-- Category filters using buttons -➡
         <div class="buttons mb-5">
           <button class="button is-primary">All News</button>
           <button class="button">Product</button>
           <button class="button">Research</button>
         </div>
         <!-- News items as cards -➡
         <div class="card mb-4">
           <div class="card-content">
             <div class="media">
               <div class="media-content">
                 <p class="title is-4">[HEADLINE]</p>
                 <div class="tags">
                   <span class="tag is-info">[COMPANY]</span>
                   <span class="tag is-primary">[CATEGORY]</span>
                   <span class="tag is-success">NEW</span> <!-- or is-light for OLD -➡
                 </div>
               </div>
             </div>
             <div class="content">
               <p>[SUMMARY]</p>
               <details>
                 <summary class="has-text-primary">Read more</summary>
                 <div class="notification is-light mt-3">[FULL_DETAILS]</div>
               </details>
             </div>
           </div>
         </div>
       </div>
     </section>


10. **Tag Colors for Companies:**
    - OpenAI: `tag is-success` (green)
    - Anthropic: `tag is-warning` (yellow/orange)
    - Other companies: `tag is-info` (blue)
    - NEW items: `tag is-success`
    - OLD items: `tag is-light`

11. **Save Data to Storage:**
    - Save all new headlines to storage with today's date key
    - Update user's news sources in storage

Execute: ask interests → web search sources → present options → get confirmations → fetch news → check storage → process → create Bulma HTML feed → save data.
Data Privacy | Imprint