As described in this blog post, the Apify Crawler product is being phased out and replaced by the apify/legacy-phantomjs-crawler actor, which provides the same functionality and configuration options. In this article, you'll learn how to migrate your old Zaps that use the legacy Apify Zapier app to the the new Zapier app (currently in beta), which provides triggers and actions for actors.

First of all, you'll need to migrate your crawler to a task of the apify/legacy-phantomjs-crawler actor. In this example, let's open the Example_Hacker_News crawler detail page and click Migrate crawler to actor task.

After the crawler has been migrated, open the newly created actor task and try to run it. If you find expected results in the dataset, you can go to Zapier and update your active Zaps. The following sections describe how you can convert each step of your old Zap to use the new Apify app and the newly created actor task.

NOTE: Currently, the new Apify app for Zapier is in beta mode and is awaiting final approval from the Zapier team. If you want to use it, you need to sign in to Zapier using this link. After you sign in, you should find the new version of the Apify app (2.1.*) in your Zapier account.

Crawler Run Finished ➡ Task Finished (Trigger)

We need to convert the current trigger set up to the new Task Finished trigger. There is just one field, where you need to choose the crawler to trigger this Zap.

We recommend opening a new tab in your browser where you can set up a new Zap with the trigger. After the new Zap is created, you have to find Apify in the list of available integrations and choose the Task Finished trigger. You'll need to find and choose the newly created actor task migrated from the old crawler in the previous step.

If you're using the trigger output attributes in the following steps of a Zap, please keep in mind that we changed some attributes. This is a list of changes:

  • _idid
  • resultsdatasetItems
  • resultsFile ➡ datasetItemsFileUrls

There are several new attributes on the output of the step. You don't need these new attributes to convert the step to the Task Finished trigger. These new attributes are described in detail in other help articles about Zapier integration.

Run Crawler ➡ Run Task (Action)

Instead of the Run Crawler action, you'll need to use the Run task action. As in the old action, this action also allows you to override the crawler setting using a provided JSON object.

To update your Zap, it's best to add a new step to your Zap using the Add Step button and then find the Run Task action from our new Zapier app. After you change the Run Crawler action to Run Task, you can just delete the old Run Crawler step and re-test the whole Zap. The Run Task action should have your migrated task in the Task field and you have to copy & paste the value from the Crawler Properties to the Input JSON overrides field. You can leave the Run synchronously field set to "No", since the old action also supported only asynchronous runs.

After you have set up your Run task action and tested it, you can connect it with additional steps. But keep in mind that the output of this Zap step is not the Crawler execution object, but an Actor run object, which has different output fields.

Fetch Crawler Run Results ➡ Fetch Dataset Items (Action)

The Fetch Crawler Run Results action is replaced in the new Zapier app by the Fetch Dataset Items action. In this Zap step, you had to fill the Execution ID from the previous step or you could copy & paste the ID from the list of crawler executions.

As in the previous example, we recommend you add a new step with converted Fetch Dataset Items actions. After you set it up, you can delete the old step and test the whole Zap. In the new action, you need to fill the Dataset field, which can be an ID or the name of the Dataset. You can pick the dataset ID from the previous Task Finished step, where you can find it under field Default Dataset ID. Or you can find the ID on Apify in your task run detail under Dataset tab. You don't need to fill in the Limit and Offset fields, because they have the same defaults as the old action.

The output fields of the new Fetch Dataset Items step are quite different, since it returns dataset instead of crawler execution results. In this example, we deal with results and resultsFile attributes in this step. You can find results under items attribute and resultsFile under itemsFileUrls.

We hope that this article helped you to convert your Zaps to use our new Zapier app, and switch from crawlers to actor tasks. If you have any kind of question about the migration or about the new Apify integration for Zapier, please contact support@apify.com.

Did this answer your question?