N8N

N8N Apify

Apify and N8N just release a set of nodes & triggers that can be added natively in N8N cloud.

In this tutorial we will go over the differences between the old approach and the new one.

If you prefer a video over text format, the video on our YouTube channel is embedded below.

I’m also taking on customers for N8N workflows. Hit me up if you need any help

If you want to follow along with this tutorial, I’m using the Instagram Hashtag and Profile Scrapers. Both are affiliate links. 

Old Way of Setting up Apify

The old way of using N8N and Apify made users use an http node. Users would have to set up a token and grab the API endpoint for the individual Apify Actor.

In addition this would still need JSON input which is sent in as body.

New Approach to using Apify with N8n

The new way to use Apify in N8N utilizes two nodes. One that runs an actor and another one that grabs the items from the dataset that is created from the Actor run.

Set up the Apify API Key in N8N

Before we use these nodes, we have to setup the API key within N8N. To do this login to you appify account, go to settings and click on API & Integrations.

For the Apify API key connection, post in the api key. You should be good to go.

Run an Apify Actor in N8N

First we will need to run an actor. Paste in URL from your console to the actor section.

From the Apify Actor page, grab the example JSON. Paste it in input JSON and add in dynamic JSON if you have any earlier in the workflow.

Get Dataset Items

Once you run the Actor, you will have to get the dataset items. To do this pass in dynamic json of .defaultDatasetID from the previous node. 

From there you should have the results you need.

Other Applications of Apify in N8N

While this tutorial focused around the Actor run and grabbing the dataset results, there are a lot of nodes you can use. 

The image to the right walks through all the different nodes available. 

Final Thoughts

Thanks for checking out this article on N8N. If you need any help with your workflows, check it out under Services.

Leave a Reply

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