Apify icon

Apify

Access Apify tools for web scraping, data extraction, and automation.

Actor Task → Run Task

AI-generated

Overview

This node executes a specified Actor Task on the Apify platform, which is used for web scraping, data extraction, and automation. It allows users to run a task by providing the task ID or a username-task name combination, optionally customize the input JSON body, and configure execution parameters such as waiting for the task to finish, timeout duration, memory allocation, and build version. This node is beneficial for automating workflows that require running predefined scraping or automation tasks on Apify and integrating their results into further processing steps.

Use Case Examples

  1. Run a web scraping task by specifying its task ID and wait for the task to complete before continuing the workflow.
  2. Trigger an automation task with a custom JSON input body to tailor the task's behavior dynamically.
  3. Set a specific memory limit and timeout for a task run to optimize resource usage and execution time.

Properties

Name Meaning
Actor Task The ID or tilde-separated username and task name of the Actor Task to run. It supports selection from a list, URL input, or direct ID input.
Use Custom Body Whether to use a custom JSON body as input for the task run.
Input (JSON) The custom JSON input body to send to the task if 'Use Custom Body' is enabled.
Wait for Finish Whether to wait for the task run to finish before continuing the workflow.
Timeout Optional timeout for the task run in seconds, overriding the task's default timeout.
Memory Memory limit for the task run in megabytes, selectable from predefined options.
Build Specifies the Actor build to run, either by build tag or build number. Defaults to the build specified in the task settings.
Authentication Choose the authentication method to use for the Apify API, either API Key or OAuth2.

Output

JSON

  • runId - The unique identifier of the task run.
  • status - The status of the task run (e.g., running, succeeded, failed).
  • output - The output data produced by the task run, if available.
  • startedAt - Timestamp when the task run started.
  • finishedAt - Timestamp when the task run finished, if applicable.

Dependencies

  • Requires Apify API access via API Key or OAuth2 authentication.

Troubleshooting

  • Ensure the Actor Task ID or URL is valid and accessible with the provided credentials.
  • If waiting for the task to finish, be aware of the workflow timeout setting in n8n to avoid premature termination.
  • Custom JSON input must be valid JSON to avoid errors during task execution.
  • Memory and timeout settings should be within allowed limits defined by Apify to prevent run failures.

Links

Discussion