This template converts Apify Actors into n8n community nodes. The generation script reads your Actor's input schema and creates the node package structure, which you can then customize and publish. Simply provide an Actor ID, and the script generates a complete n8n community node package using your Actor's input schema—ready to customize and publish.
Apify is a platform for building, deploying, and publishing web automation tools called Actors, while n8n is a fair-code licensed workflow automation platform that connects various services and APIs.
- Node.js v23.11.1 or higher
- A valid Apify Actor ID from the Apify Store
Install dependencies:
npm installRun the generation script:
npm run create-actor-appWhen prompted, enter your Actor ID. Find this in your Actor's console URL, for example, if your Actor page is https://console.apify.com/actors/aYG0l9s7dbB7j3gbS/input, the Actor ID is aYG0l9s7dbB7j3gbS.
The script fetches your Actor's metadata and input schema, generates node files with proper naming, converts Actor input fields into n8n node parameters, and creates all necessary boilerplate code.
Test the generated node:
npm run build
npm run devAfter generation, your node files will be located in:
nodes/Apify<YourActorName>/
For example, if you converted the Website Content Crawler Actor, the folder will be:
nodes/ApifyWebsiteContentCrawler/
The generated code includes five sections labeled with SNIPPET comments. Search for SNIPPET in your IDE to locate them quickly.
Location: nodes/Apify{YourActorName}/Apify{YourActorName}.node.ts
The script generates these constants from your Actor's metadata:
export const ACTOR_ID = 'aYG0l9s7dbB7j3gbS'
export const CLASS_NAME = 'ApifyWebsiteContentCrawler'
export const DISPLAY_NAME = 'Apify Website Content Crawler'
export const DESCRIPTION = ''Tip: Change
DISPLAY_NAMEorDESCRIPTIONto adjust how your node appears in the n8n interface.
Location: nodes/Apify{YourActorName}/Apify{YourActorName}.node.ts
The default configuration uses the Apify logo:
icon: 'file:logo.svg'Replace the SVG files in the node directory with your own branding.
Location: nodes/Apify{YourActorName}/Apify{YourActorName}.node.ts
The subtitle appears beneath your node in n8n workflows:
subtitle: 'Run Scraper',Location: nodes/Apify{YourActorName}/Apify{YourActorName}.node.ts
This description appears in n8n's node browser:
description: DESCRIPTION,Location: nodes/Apify{YourActorName}/helpers/genericFunctions.ts
When your node runs in AI agent workflows, reduce token usage by filtering the returned data:
if (isUsedAsAiTool(this.getNode().type)) {
results = results.map((item: any) => ({ markdown: item.markdown }));
}AI agents perform better with clean, focused data that takes up less context.
The Apify{YourActorName}.node.json file controls where your node appears in n8n:
{
"categories": ["Data & Storage", "Marketing & Content"],
"alias": ["crawler", "scraper", "website", "content"]
}Adjust categories to match your Actor's purpose and add relevant search keywords to alias.
The template includes pre-configured authentication in the credentials/ directory. Users running n8n locally provide their Apify API token. Users on n8n cloud can authenticate via OAuth2.
Start n8n with your custom node:
npm run devThis launches n8n at http://localhost:5678 with hot reloading enabled. Changes to your node files automatically refresh.
Before publishing: Update placeholder values in package.json (AUTHOR_NAME, AUTHOR_EMAIL, PACKAGE_DESCRIPTION) with your information.

