Apify (Advanced Website Crawler)
Add a bot to Apify using the official integration.
The official Apify integration connects your bot to Apify, an advanced website crawling platform. It allows your bot to manage your Apify crawler runs.
This integration is useful if you need more powerful crawling than Studio’s default web crawler provides.
Setup
You will need:
Install the integration in Botpress
First, install the integration to your bot:
- In Botpress Studio, select Explore Hub in the upper-right corner.
- Search for the Apify integration. In the Hub, it’s listed as Advanced Website Crawler.
- Select Install Integration.
In the Configuration menu, you should see two fields:
- API Token
- Webhook Secret (Optional)
Leave these empty for now—you’ll come back to them after completing the setup in your Apify account.
Get your Apify API token
Next, get your Apify API token:
- Log in to your Apify account.
- Select Settings from the bottom-left corner.
- Go to API & Integrations.
- Under Personal API tokens, copy the API token—it should start with
apify_api_.
Configure the integration in Botpress
Now, you can configure the integration in Botpress:
- In the integration’s API Token field, paste your Apify API token.
- Select Save Configuration.
- Copy the integration’s webhook URL (starting with
https://webhook.botpress.cloud).
Configure your Apify webhook
Finally, create a Webhook integration:
-
Go to the Website Content Crawler in the Apify Store.
-
Select Try for Free, then Save & Start. This opens the Actor’s configuration page.
-
Select the Integrations tab (on the Actor’s page, not the left sidebar).
-
Scroll down to Generic integrations, then select HTTP webhook.
-
Under Start when, select the following options:
- Run succeeded
- Run created
- Run failed
- Run timed out
- Run resurrected
- Run aborted
-
Paste your Botpress webhook URL into the URL field.
-
Select Save.
Cards
Here’s a reference for all Cards available with the integration:
Get Run Status
Check the status of a crawler run (useful for monitoring)
inputobjectoutputobjectStart Crawler Run
Start a crawler run asynchronously. Use with webhooks for production crawling. You can either use individual parameters for simple cases, or provide rawInputJsonOverride for full control.
inputobjectoutputobjectSync Run Results
Get the results from a completed crawler run and sync to Botpress KB
inputobjectoutputobjectTriggers
Here’s a reference for all Triggers available with the integration:
You can access data returned from any of these Triggers by reading event.payload after the Trigger fires.
Crawler Completed
Triggered when an Apify crawler run completes successfully
payloadobjectCrawler Failed
Triggered when an Apify crawler run fails, times out, or is aborted
payloadobject