Skip to content

Send Stock Price Updates to Slack with Make and ScrapingBee

As an investor, consistently monitoring the performance of the stocks in your portfolio is crucial for making informed decisions and maximizing returns. However, manually checking stock prices each day can be tedious and time-consuming.

Fortunately, by leveraging the power of no-code tools like Make and ScrapingBee, you can easily automate the process of retrieving stock data and delivering timely price updates right to your team‘s Slack channel. In this step-by-step guide, we‘ll walk through setting up this workflow so you can effortlessly stay on top of market movements.

What are Make and ScrapingBee?

Before diving in, let‘s briefly introduce the two platforms that make this automation possible:

Make (formerly known as Integromat) is a versatile no-code tool for creating powerful integrations and automations between web apps without writing a single line of code. It offers a user-friendly visual interface for building multi-step workflows called "scenarios."

ScrapingBee is a web scraping API that handles the complexities of extracting data from websites. It takes care of common roadblocks like CAPTCHAs, proxy rotation, and JavaScript rendering, allowing you to reliably pull structured data from any webpage with a simple API call.

By connecting Make and ScrapingBee, we can create an automated pipeline that scrapes live stock prices and delivers the information to Slack on a regular schedule.

Step 1: Sign Up for Make and ScrapingBee

To get started, you‘ll need accounts on both platforms:

  1. Create a free Make account if you don‘t already have one. The free plan allows for up to 1,000 operations per month, which is plenty for this use case.

  2. Sign up for ScrapingBee here and grab your API key from the dashboard. You‘ll need this to authenticate your requests to the scraping API.

ScrapingBee API key in dashboard

Step 2: Create a New Make Scenario

With your accounts ready, it‘s time to build the automation in Make:

  1. From your account homepage, click "Create a new scenario" to start a blank workflow.

  2. Click the "+" button to add your first module, and search for "ScrapingBee" in the app directory. Select the "Make an API call" action.

Adding the ScrapingBee module in Make

  1. To connect your ScrapingBee account, click "Add" next to the API key field and paste in the key from your dashboard. Click "Save" to create the connection.

Step 3: Configure the ScrapingBee Module

Next, we‘ll set up the ScrapingBee module to scrape stock data from Yahoo Finance:

  1. Under "API URL," enter the following endpoint with your desired stock ticker symbol (e.g., TSLA for Tesla):
    https://finance.yahoo.com/quote/TSLA

  2. Change the "Method" dropdown to GET, as we‘re simply requesting data from the page.

  3. Toggle on "Show advanced settings" and scroll down to the "Extract Rules" section. Here we‘ll specify which elements to pull from the page using CSS selectors. Enter the following JSON:

{
  "name": "#quote-header-info h1",
  "price": "#quote-header-info fin-streamer[data-field=regularMarketPrice]",
  "change": "#quote-header-info fin-streamer[data-field=regularMarketChange]",
  "percentChange": "#quote-header-info fin-streamer[data-field=regularMarketChangePercent]"
}

Configuring extraction rules

  1. Click "OK" to save the module settings. You can now run a quick test by clicking "Run Once" and inspecting the output to make sure the stock data is scraped correctly.

Step 4: Configure the Slack Module

With our stock data in hand, the next step is sending it to Slack:

  1. Click the "+" button and add the Slack "Send a message" action. You‘ll be prompted to connect your Slack account and grant the necessary permissions.

  2. In the "Channel" field, select the Slack channel where you want the stock updates delivered.

  3. For the message text, you can customize it with the scraped data using curly brace notation. For example:

Here‘s your daily update for {name}:
- Current Price: {price}  
- Change: {change} ({percentChange})

Feel free to get creative and include additional information or emojis to make the alerts more engaging!

Customizing the Slack message

  1. Save the module and do a final test run of the entire scenario to confirm the stock update posts successfully to Slack.

Step 5: Schedule the Scenario

The last step is scheduling the scenario to run automatically on a regular basis:

  1. In your scenario‘s settings, open the "Scheduling" section.

  2. Set your desired interval (e.g., every day at 9am) for when the stock updates should be pulled and posted.

  3. Activate the scenario and you‘re all set! Make will now run the scraping and Slack posting jobs according to your schedule.

Scheduling the scenario

Advanced Tips and Customizations

Now that you have a working automated workflow, here are some ideas for taking it even further:

  • Want to track multiple stocks? Simply clone the scenario and modify the ticker symbols as needed. You could create a separate Slack channel for each stock or post them all to a dedicated investing channel.

  • Get alerted to major price swings by adding a Filter module that checks if the day‘s change exceeds a certain threshold before posting to Slack.

  • Enhance the Slack updates with richer content like sparkline charts, news headlines, or analyst ratings by scraping additional data points and leveraging Slack‘s formatting options.

  • Explore other financial websites or APIs besides Yahoo Finance for sourcing stock data. Just be sure to adjust the extraction rules based on the target page‘s HTML structure.

The beauty of no-code tools like Make is the ability to quickly experiment with new features and build out your automations to perfectly fit your needs. Don‘t be afraid to dive into the documentation and get creative!

Conclusion

In this guide, we‘ve walked through the process of using Make and ScrapingBee to create an automated workflow for delivering daily stock price updates to Slack. By leveraging the power of no-code web scraping and app integration, investors can now easily monitor their portfolio‘s performance without the tedium of manual price checks.

The benefits of automated stock alerts go beyond just convenience. Having timely pricing data at your fingertips empowers you to stay nimble in the fast-moving world of investing—whether that means capitalizing on buy opportunities or cutting losses before they snowball. Plus, sharing these insights via Slack keeps your whole team aligned on market movements.

We encourage you to try setting up this integration yourself and discover how automated stock monitoring can streamline your investing workflow. And if you‘re hungry to learn more, check out our other guides on using no-code tools to boost your productivity and decision-making.

Happy investing!

Join the conversation

Your email address will not be published. Required fields are marked *