Skip to content

POC on Azure Function to "Scrape Reddit" for new posts and email them with SendGrid

License

Notifications You must be signed in to change notification settings

isaacrlevin/RedditPoller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

POC To Show Capabilities of using Azure Functions Scheduling to Notify of Reddit Posts

What is the Goal Here?

  • To see ease of implementing 3rd party Packages in Azure Functions
  • Stateless way of getting notified using 3rd Party Services
  • Proof to see how quick a function can be stood up

What does this app do?

  • Uses Azure Function Schedule Trigger (currently runs every minute using "0 */1 * * * * CRON)
  • Uses RedditSharp to "scrape" Reddit subreddit (in this case /r/Azure)
  • Gets Posts tht have been created within the last minute, digests them, and emails with SendGrid

Getting Started:

  • Clone this Repo and restore :

    git clone https://github.com/isaac2004/RedditPoller  
    dotnet restore
    
  • Configure Azure Components

    • Setup Free Azure Subscription (if you do not have one)
    • Add new instance of SendGrid (Free Version) on your subscription
      • You get 25k emails a month here
      • Capture Api Key created during process and place in host.json "SendGridApiKey" setting
  • Publish App from Visual Studio 2017 Preview 3.0

    • Right-Click RedditPoller project
    • Create new Function App, Storage Account and Deploy
    • Add SendGrid Api Key and email to be notified in App Settings of Azure Function
  • How can this be extended?

    • Add custom logic to notify on specific posts (matching a keyword for instance)
    • Add auth against Reddit (supported with RedditSharp) to get access to mailbox/subscribed subs/etc
    • MakeTimerTrigger customizable
    • Really options are plenty for adding hooks to Reddit

License

MIT License

Copyright (c) 2016-2017 Isaac Levin

Twitter: @isaac2004

About

POC on Azure Function to "Scrape Reddit" for new posts and email them with SendGrid

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages