Classify Apify scraped dataset rows with OpenAI and Google Sheets

Go to Workflow
0 views
Built by Abu Abu
Created on July 28, 2026

Description

Quick overview
This workflow runs on demand to classify up to 1,000 items from an Apify dataset using OpenAI via the glueworks/llm-dataset-processor Actor, then upserts each item’s id, title, url, and category into a Google Sheets spreadsheet.

How it works
Starts when you manually execute the workflow.
Loads the Apify dataset ID, Google Sheet ID, and the OpenAI model name from a configuration step.
Runs the Apify Actor glueworks/llm-dataset-processor in classify mode to label each dataset item as LEAD, SPAM, or NEUTRAL and writes the result to a category field.
Retrieves the processed items from the Actor’s output Apify dataset.
Appends or updates rows in Google Sheets (matching on id) with the item id, title, url, and category.

Setup
Add an Apify API token credential and ensure you have an Apify dataset ID to process.
Add a Google Sheets OAuth2 credential and create/choose a spreadsheet with columns for id, title, url, and category.
In the configuration values, set your upstream Apify dataset ID, the target Google Sheet document ID, and (optionally) the OpenAI model name used by the Apify Actor.
If needed, edit the classification prompt in the Apify Actor input to match your data fields and labeling rules.

Nodes Used (1)

Google Sheets
n8n-nodes-base.googleSheets