Automate news analysis and intelligent Q&A with Pinecone vector search—instantly summarize articles from Telegram links and answer questions using AI-powered context retrieval.
This intelligent workflow transforms your Telegram into a powerful news analysis and research assistant. When users share news articles via URL, the bot automatically scrapes the content, analyzes it with AI, and stores it in a vector database for future reference. When users ask questions without URLs, the bot searches through previously stored articles and provides contextual answers based on your accumulated knowledge base.
Key benefits include:
This agent is perfect for news teams, research departments, competitive intelligence units, and knowledge workers who need to process and reference multiple articles efficiently.
This workflow serves multiple user personas:
No coding experience required—just API credentials and basic configuration knowledge.
Why it's needed: Telegram serves as your user interface, allowing team members to submit articles and ask questions through a familiar messaging platform.
Setup steps:
/newbot and follow the prompts123456789:ABCdefGHIjklmnoPQRstuvWXYZabcdefg)Configuration in TaskAGI:
Why it's needed: FireCrawl extracts clean, readable content from web articles, handling complex page layouts and removing ads/navigation clutter.
Setup steps:
markdown for best article readabilityConfiguration in TaskAGI:
30 seconds for reliable scrapingmarkdown for clean text processingWhy it's needed: OpenAI's GPT-4 powers article analysis and intelligent question answering, providing sophisticated natural language understanding.
Setup steps:
gpt-4o (the model used in this workflow)0.7 for balanced creativity and consistency1500 for comprehensive responsesConfiguration in TaskAGI:
Why it's needed: Pinecone is a vector database that stores article embeddings, enabling semantic search to find related articles based on meaning rather than keywords.
Setup steps:
news-articles (or your preferred name)1024 (for multilingual-e5-large embeddings)cosine (best for semantic similarity)starter (sufficient for most use cases)us-east-1-aws)news-articles)Configuration in TaskAGI:
multilingual-e5-large (supports 100+ languages)10 for efficient vector uploadsThis is your workflow's entry point. No configuration needed—it automatically activates when someone sends a message to your bot.
Purpose: Routes the workflow based on whether the message includes a URL.
Configuration:
message.text contains "http"
Purpose: Isolates the URL from the message text.
Configuration:
message.text
https?://[^\s]+
extracted_url
Example: If user sends "Check this article: https://example.com/news", output is https://example.com/news
Purpose: Downloads and cleans article content using FireCrawl.
Configuration:
extracted_url
markdown
article_content, article_title, article_metadata
Purpose: Uses GPT-4 to analyze the article and extract key insights.
Configuration:
gpt-4o
0.7
1500
Analyze this news article and provide a structured summary including:
1. Main headline and key facts
2. Impact and significance
3. Key stakeholders mentioned
4. Related topics or industries affected
Article content:
{article_content}
article_summary
Purpose: Converts article content into a vector for semantic search.
Configuration:
article_content
multilingual-e5-large
article_embedding
Purpose: Saves the article and its embedding to Pinecone for future retrieval.
Configuration:
news-articles
article_embedding
{
"title": "article_title",
"url": "extracted_url",
"summary": "article_summary",
"timestamp": "current_date"
}
Purpose: Delivers the analysis back to the user.
Configuration:
message.chat_id
📰 **Article Summary**
{article_title}
{article_summary}
🔗 Source: {extracted_url}
Purpose: Prepares the user's question for semantic search.
Configuration:
message.text
user_question
Purpose: Converts the question into a vector for searching similar articles.
Configuration:
user_question
multilingual-e5-large
query_embedding
Purpose: Finds the most relevant stored articles using semantic similarity.
Configuration:
news-articles
query_embedding
3 (retrieve 3 most relevant articles)search_results
Purpose: Formats retrieved articles into a context string for the AI.
Configuration:
search_results
Based on these related articles:
{search_results[0].metadata.title} - {search_results[0].metadata.summary}
{search_results[1].metadata.title} - {search_results[1].metadata.summary}
{search_results[2].metadata.title} - {search_results[2].metadata.summary}
context
Purpose: Creates an informed response using retrieved articles as context.
Configuration:
gpt-4o
0.7
1000
You are a helpful assistant that answers questions based on news articles.
Use the following context to answer the user's question accurately.
Context:
{context}
User Question: {user_question}
Provide a comprehensive answer citing the relevant articles.
ai_answer
Purpose: Returns the AI-generated answer to the user.
Configuration:
message.chat_id
💡 **Answer Based on Your Articles**
{ai_answer}
_This answer was generated from {search_results.length} related articles in your knowledge base._
Before testing the workflow:
Test Case 1: Submit a News Article
Send a message to your Telegram bot with a real news URL:
Check this: https://www.bbc.com/news/world
Verify at each step:
Expected result: Within 15-20 seconds, you receive a formatted summary with the article title, key points, and source link.
Test Case 2: Ask a Question
Send a question to your bot:
What recent news is there about technology?
Verify at each step:
Expected result: Within 10-15 seconds, you receive an answer that references the articles you previously submitted.
Success Indicators:
Troubleshooting:
Your Telegram News Article RAG Chatbot is now ready to revolutionize how you process and reference news!
Explore these powerful automation agents that complement your workflow.
Automate expense tracking via Telegram with AI-powered voice transcription, OCR receipt scanning, and intelligent expens...
Transform product images into viral UGC videos instantly—from Telegram to social platforms with AI-powered scripts and a...
Transform product images into professional UGC video ads instantly. Receive images via Telegram, generate AI scripts wit...