Quick Overview
This workflow runs daily at 10:00 and reads commodity news from OilPrice and Invezz RSS feeds, uses a Groq-hosted LLM to classify sentiment and extract commodity/impact details, appends the results to Google Sheets, and posts a Slack alert when aggregated sentiment crosses a threshold.
How it works
- Runs every day at 10:00 on a schedule.
- Fetches the latest articles from the OilPrice and Invezz commodities RSS feeds, sorts them by publication date, and keeps the five most recent from each source.
- Merges both feeds and normalizes each article into a consistent structure (title, link, date, content, snippet, and source).
- Sends the article text to Groq (chat model) to return a JSON sentiment classification with confidence, commodity, impact level, and a one-line summary.
- Parses the model response and appends the structured result to a Google Sheets worksheet along with the article URL/title/source and a timestamp.
- Converts the sentiment label into a numeric score, aggregates average sentiment per commodity across the processed articles, and formats a Slack message with the trend and latest summary/link.
- Posts the Slack message when the average sentiment for a commodity is greater than 0.3 or less than -0.3, otherwise it ends without sending an alert.
Setup
- Add Groq API credentials for the Groq chat model used for sentiment classification.
- Connect Google Sheets OAuth2 credentials and update the spreadsheet/document ID, sheet name, and column headers to match the fields being appended.
- Connect Slack OAuth2 credentials and set the target Slack user/channel configuration used to send alerts.
- Review and, if needed, adjust the RSS feed URLs and the alert thresholds (0.3 and -0.3) to fit your news sources and sensitivity.