Run icon
Get icon
Update icon

Run Apify actor and update Notion

Run an Apify actor, fetch its default dataset, and write the scraped web data into a Notion page on a schedule with Kestra orchestration.

Categories
Data

Turn raw web scraping output into a living Notion document. This blueprint runs an Apify actor (the same actors that power Apify Store scrapers for social feeds, marketplaces, and search results), retrieves the dataset that run produces, and updates a Notion page with the results. It closes the gap between collecting web data and making it visible to your team, so scraped records land where people already work instead of sitting in an Apify dataset nobody opens.

How it works

  1. The run_actor task (io.kestra.plugin.apify.actor.Run) starts an Apify actor by actorId, capped with maxItems and parameterized through the input object (for example hashtags and resultsPerPage). It authenticates with apiToken and returns the run metadata, including defaultDatasetId.
  2. The get_dataset task (io.kestra.plugin.apify.dataset.Get) reads that run output via {{ outputs.run_actor.defaultDatasetId }} and fetches the collected items from the Apify dataset.
  3. The update_page task (io.kestra.plugin.notion.page.Update) writes a markdown content block to a Notion page identified by pageId, embedding both the actor run and dataset outputs so the latest scrape is always reflected in Notion.

What you get

  • A repeatable Apify-to-Notion pipeline defined entirely in YAML.
  • Automatic propagation of the dataset id from the actor run to the dataset fetch.
  • Scraped web data published into a shared Notion page your team already reads.
  • A single place to adjust actor inputs, item limits, and the target page.

Who it's for

  • Growth, marketing, and research teams tracking social posts, hashtags, or competitor pages.
  • Data engineers who want scraping wired into a wider orchestration platform.
  • Operations teams that live in Notion and want fresh data delivered to them.

Why orchestrate this with Kestra

Apify can schedule an actor, but it stops at the dataset. Kestra carries the result across tools: it chains the actor run, the dataset fetch, and the Notion update as one declarative flow, passing outputs between tasks. Add a Schedule trigger to refresh Notion on a cadence, attach retries so a transient Apify or Notion API error does not break the chain, and get execution lineage, logs, and outputs for every run in one UI. That cross-service hand-off and end-to-end visibility is exactly what Apify's own scheduler cannot provide.

Prerequisites

  • An Apify account with an actor and an API token.
  • A Notion integration with access to the target page.

Secrets

  • APIFY_API_TOKEN: Apify API token used by both Apify tasks.
  • NOTION_API_TOKEN: Notion integration token for the page update.
  • NOTION_PAGE_ID: id of the Notion page to update.

Quick start

  1. Add the APIFY_API_TOKEN, NOTION_API_TOKEN, and NOTION_PAGE_ID secrets to your Kestra instance.
  2. Set actorId to the Apify actor you want to run and adjust the input fields.
  3. Share the target Notion page with your Notion integration.
  4. Execute the flow and confirm the scraped results appear on the Notion page.

How to extend

  • Add a Schedule trigger to run the scrape and refresh Notion daily or weekly.
  • Swap the actor and input to scrape a different source or marketplace.
  • Insert a transform step (for example a script task) to clean or summarize items before writing to Notion.
  • Fan out to multiple Notion pages or append a database row instead of overwriting page content.

Links

Orchestrate with Kestra
Orchestrate Apify with Kestra
Share this Blueprint
See How

New to Kestra?

Use blueprints to kickstart your first workflows.