More and more organizations are using Slack for internal communication purposes, and more and more organizations use Apify for web scraping. So what if you could do both from the same app?
Well, now you can. This integration allows you to run your Apify actors, be notified about their run status, and get your results, all without opening your browser. All you have to do is follow these few simple steps to set it up, and you will be able to do your scraping and share it with your team with one shortcut, directly from Slack.
What is a Slack integration?
A Slack integration is a service you can easily install in your Slack workspace in order to automate and centralize tasks. It’s a way to do everything from the same space, Slack, without switching tabs continuously. In this instance, you can run Apify actors in Slack without opening your browser window and heading to Apify Console. Why? Because we know you’ve got no time to waste.
What do you need to get started?
To use the Apify integration for Slack, you will need:
A Slack account (and workspace)
Step 1: Create a task on Apify Console
A task is a saved configuration for an actor - a cloud program running on the Apify platform. In this tutorial, we'll use the Google Shopping Scraper actor, Apify’s tool to scrape Google Shopping for product details, prices, reviews, and more.
To create a new task for this actor, simply go to the actor’s page on Apify Store and click the Try for free button. You will be redirected to Apify Console. After filling in the input fields (read more on Google Shopping Scraper set up in this step-by-step tutorial), click the Save as new task button. You can rename the task by clicking the Settings tab (let’s call it shopping-test for now) and find the task again by clicking Tasks in the left sidebar.
Step 2: Set up the Slack integration
Now click the Integrations tab, find the Slack integration and click the Add button. You will be prompted to log in with your Slack account and select your workspace.
Select what type of events you would like to be notified of (e.g., when a run is created, when a run succeeds, when a run fails, etc.), your workspace, and the channel you want to receive the notifications in (you can set up an ad hoc channel for this test). In the Message field, you can see how the notification will look, or you can craft a new custom one.
Once you are done, click the Save button.
Step 3: Give the Apify integration a trial run!
Click the Start button and head to the Slack channel you selected to see your first Apify integration notifications.
Step 4: Start your run directly from Slack
You can now run the same task directly from Slack by typing /apify run [task name] into the Slack message box. Remember you can retrieve the task’s name by clicking Tasks in the left sidebar on Apify Console.
When an actor doesn’t require you to fill in any input fields, you can run it by simply typing /apify run [actor name].