Extract structured data from webpages with Apify and OpenAI
Ready for 3.0What this workflow does
This AI workflow has 21 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects OpenAI Chat Model. It also calls api.apify.com over HTTP.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Configuration (Edit Fields (Set)): sets 9 fields: apify_search_actor, apify_content_crawler_actor, crawler_type…
- Normalize Input (Edit Fields (Set)): sets 5 fields: target_url, subject, website_domain…
- Has Target Data? (If): checks a condition and branches into true / false
- Has Direct Target URL? (If): checks a condition and branches into true / false
- Respond - Missing Target Data (Respond to Webhook): sends the response back to the webhook caller
- Use Direct URL (Edit Fields (Set)): sets 1 field: resolved_url
- Search Page with Apify (HTTP Request): calls api.apify.com (POST)
- Scrape Page with Apify (HTTP Request): calls api.apify.com (POST)
- Extract First Result URL (Edit Fields (Set)): sets 1 field: resolved_url
- Respond - Search Request Failed (Respond to Webhook): sends the response back to the webhook caller
…plus 8 more steps. See the full node list below.
Services it uses
Other Apify + OpenAI templates (230)
HTTP calls to: api.apify.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (8)
- Webhook
n8n-nodes-base.webhook - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - HTTP Request
n8n-nodes-base.httpRequest - Respond to Webhook
n8n-nodes-base.respondToWebhook - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured
From the author
Quick overview This workflow exposes a webhook that finds or accepts a target webpage, scrapes it to clean Markdown using Apify, and uses OpenAI with a dynamic schema to return structured JSON fields requested by the caller. How it works 1. Receives a POST…