Created
March 4, 2025 01:10
-
-
Save timothycarambat/8ef7d25ce46eff29a045cf650428b036 to your computer and use it in GitHub Desktop.
AnythingLLM Agent Flow - Hacker news scraper flow & Discord web hook notification
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Send message to Discord", | |
"description": "Sends a simple text message to my Discord #general channel.\n`textToSend` is the text string content that will be shown in the discord message.", | |
"active": true, | |
"steps": [ | |
{ | |
"type": "start", | |
"config": { | |
"variables": [ | |
{ | |
"name": "textToSend", | |
"value": "_this is default content_" | |
} | |
] | |
} | |
}, | |
{ | |
"type": "apiCall", | |
"config": { | |
"url": "https://discord.com/api/webhooks/your-webhook-notification-url", | |
"method": "POST", | |
"headers": [], | |
"bodyType": "json", | |
"body": "{\n \"content\": \"${textToSend}\",\n \"avatar_url\": \"https://i.imgur.com/KEungv8.png\",\n \"username\": \"AnythingLLM Flow Agent\"\n}", | |
"formData": [], | |
"responseVariable": "" | |
} | |
} | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Hacker News Headline Viewer", | |
"description": "This tool can be used to visit hacker news webpage and extract ALL headlines and links from the page that have to do with a particular topic.\n\nAvailable options for `hackerNewsURLPath`:\n(empty) \n\"front\"\n\"newest\"\n\nthe `topicOfInterest` variable is used as the guide line for what kinds of topic I am interested in and what should be done. Any articles or links that seem interesting should be returned to me as clickable links in markdown\n\nExample:\n\"Checkout HackerNews newest and find political posts\"\nhackerNewsURLPath => \"newest\"\ntopicOfInterest =>\"Political discussions or items\"\n\n\n\"Checkout HackerNews and find AI posts\"\nhackerNewsURLPath => \"\"\ntopicOfInterest =>\"Artificial intelligence\"", | |
"active": true, | |
"steps": [ | |
{ | |
"type": "start", | |
"config": { | |
"variables": [ | |
{ | |
"name": "hackerNewsURLPath", | |
"value": "" | |
}, | |
{ | |
"name": "topicOfInterest", | |
"value": "all" | |
}, | |
{ | |
"name": "pageContentFromSite", | |
"value": "" | |
} | |
] | |
} | |
}, | |
{ | |
"type": "webScraping", | |
"config": { | |
"url": "https://news.ycombinator.com/${hackerNewsURLPath}", | |
"resultVariable": "pageContentFromSite", | |
"captureAs": "querySelector", | |
"querySelector": "span.titleline" | |
} | |
}, | |
{ | |
"type": "llmInstruction", | |
"config": { | |
"instruction": "Extract all links from this content that would be relevant to this topic: ${topicOfInterest} \n\n\nContent\n${pageContentFromSite}", | |
"inputVariable": "pageContentFromSite", | |
"resultVariable": "" | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment