Skip to content

Conversation

@drobnikj
Copy link
Member

@drobnikj drobnikj commented Nov 28, 2025

Adding Apify plugin with two new actions

  • Run Apify Actor
  • Scrape Single URL
image image

yfe404 and others added 6 commits November 27, 2025 16:12
Adds a new "Run Actor" action that allows workflows to execute Apify Actors.

Features:
- Integration setup with API token configuration
- Actor selection by ID (e.g., apify/rag-web-browser)
- JSON input support for Actor parameters
- Sync/async execution modes
- Full input/output display in Runs panel
- Connection testing

Files added:
- plugins/apify/ - Complete plugin implementation

Files modified:
- action-grid.tsx, action-config.tsx - UI for Run Actor action
- workflow-executor.workflow.ts - Runtime execution handler
- credential-fetcher.ts - API key mapping
- integration-form-dialog.tsx - Settings form
- test/route.ts - Connection test endpoint

Limitations:
- Icon is a placeholder, not the official Apify logo
@MisaFialova
Copy link

@drobnikj is the Run Apify Actor only running the Actor, or does it also get the dataset? Since we're only having 2 operations in the first version, I think we should go with Run Apify Actor and Get dataset in one operation.

@drobnikj
Copy link
Member Author

drobnikj commented Dec 2, 2025

Run Apify Actor

It runs Actor and get dataset, but "Run Apify Actor and Get dataset" will not look nice in UI as it is too long.
I also pick name Run Apify Actor instead Run an Actor as there is no connectiction with Apify in action list (only logo) and people can get confused about Actor.

@drobnikj drobnikj requested a review from yfe404 December 2, 2025 09:40
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure where this file is imported, if it is not used we may want to remove it.


// Run synchronously and wait for completion (waits indefinitely if waitSecs not specified)
const runData = await actorClient.call(actorInput);
console.log("[Scrape Single URL] Actor call completed:", {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if it is left intentionally or not, so I am just pointing it.

runId: runData.id || "unknown",
status: runData.status || "SUCCEEDED",
datasetId: runData.defaultDatasetId,
datasetItems,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be data: datasetItems ?

Copy link

@protoss70 protoss70 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I just have one nit. It looks like Firecrawl has a short section in the README.md explaining how to use their integration. It might be worth adding our short section to the README also under integrations section.

Image

Copy link

@JanHranicky JanHranicky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good 😎 Found an UI bug and had some problems settings it up locally.

Comment on lines +37 to +40
if (!value || typeof value !== "string") {
setJsonError(null);
return;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would split this into 2 conditions, so that if value is not string, some error message like "Value must be string" is displayed. Now the user can just type in a number and the component pretends its valid JSON:

image

runId: runData.id || "unknown",
status: runData.status || "SUCCEEDED",
datasetId: runData.defaultDatasetId,
datasetItems,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also think it should be data: datasetItems 🤔

- Database Event

### Action Nodes

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When setting up the repo locally, I also had to generate an encyption key INTEGRATION_ENCRYPTION_KEY in the .env.local file to store the API keys in the db. Without it I got following error:

Failed to decrypt integration config: Error: INTEGRATION_ENCRYPTION_KEY environment variable is required for encrypting integration credentials
    at getEncryptionKey (lib/db/integrations.ts:22:11)
    at decrypt (lib/db/integrations.ts:58:15)
    at decryptConfig (lib/db/integrations.ts:90:23)
    at <unknown> (lib/db/integrations.ts:128:13)
    at Array.map (<anonymous>)
    at getIntegrations (lib/db/integrations.ts:126:18)
    at async GET (app/api/integrations/route.ts:50:26)
  20 |
  21 |   if (!keyHex) {
> 22 |     throw new Error(
     |           ^
  23 |       `${ENCRYPTION_KEY_ENV} environment variable is required for encrypting integration credentials`
  24 |     );

I generated it using openssl rand -hex 32. We may want to add this to README

@MisaFialova
Copy link

Run Apify Actor

It runs Actor and get dataset, but "Run Apify Actor and Get dataset" will not look nice in UI as it is too long. I also pick name Run Apify Actor instead Run an Actor as there is no connectiction with Apify in action list (only logo) and people can get confused about Actor.

@drobnikj agree - I just wanted to make sure this is the logic behind 💃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants