{ "kind": "open-flow-workflow", "version": 1, "name": "Webpage Markdown Extractor", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_6fd5b1a65d6a0aeb": { "name": "Page URL", "kind": "start", "inputDefs": [ { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "url" } ] }, "n_2a3d4459a1788860": { "inputs": { "url": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_6fd5b1a65d6a0aeb", "output": "url" } ] } }, "name": "Validate page URL", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "url" } ], "outputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "url" } ], "name": "Validate page URL", "moduleId": "n_926e79973add3996", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_23eb24d189ac0b1a": { "inputs": { "url": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_2a3d4459a1788860", "output": "url" } ] }, "formats": { "kind": "value", "value": [ "markdown" ] }, "maxAge": { "kind": "value", "value": 0 }, "onlyMainContent": { "kind": "value", "value": true }, "timeout": { "kind": "value", "value": 30000 } }, "name": "Scrape page as Markdown", "kind": "task", "task": { "inputs": [ { "description": "The URL to scrape.", "jsonSchema": { "type": "string", "description": "The URL to scrape." }, "nullable": true, "handle": "url", "value": null }, { "description": "One Alexandria provider-tool call or an array of up to ten calls.", "jsonSchema": { "description": "One Alexandria provider-tool call or an array of up to ten calls." }, "nullable": true, "handle": "alexandria", "value": null }, { "description": "Whether to return tool contracts discovered for the scraped domain.", "jsonSchema": { "type": "boolean", "description": "Whether to return tool contracts discovered for the scraped domain." }, "nullable": true, "handle": "domainTools", "value": null }, { "description": "The request origin accepted with Alexandria calls.", "jsonSchema": { "type": "string", "description": "The request origin accepted with Alexandria calls." }, "nullable": true, "handle": "origin", "value": null }, { "description": "The integration identifier accepted with Alexandria calls.", "jsonSchema": { "type": "string", "description": "The integration identifier accepted with Alexandria calls." }, "nullable": true, "handle": "integration", "value": null }, { "description": "The browser actions to run before scraping.", "jsonSchema": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "The browser action type, such as click, write, wait, or press." }, "selector": { "type": "string", "description": "The CSS selector targeted by the action." }, "text": { "type": "string", "description": "The text to type for write actions." }, "key": { "type": "string", "description": "The key to press for press actions." }, "milliseconds": { "type": "integer", "description": "The duration in milliseconds used by wait-style actions." } }, "required": [ "type" ], "additionalProperties": true, "description": "A browser action to execute." }, "description": "The browser actions to run before scraping." }, "nullable": true, "handle": "actions", "value": null }, { "description": "The output formats to return.", "jsonSchema": { "type": "array", "items": { "anyOf": [ { "type": "string", "enum": [ "markdown", "html", "rawHtml", "rawBase64", "links", "images", "screenshot", "screenshot@fullPage", "json", "changeTracking", "summary", "branding", "product", "menu", "audio", "video" ], "description": "A built-in Firecrawl output format." }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "markdown", "summary", "html", "rawHtml", "rawBase64", "links", "images", "screenshot", "json", "changeTracking", "branding", "product", "menu", "audio", "video", "question", "highlights" ], "description": "The structured Firecrawl output format type." }, "schema": { "type": "object", "additionalProperties": { "description": "A record value." }, "description": "The JSON Schema used for structured output." }, "prompt": { "type": "string", "description": "The prompt used for structured output." }, "checkPromptInjection": { "type": "boolean", "description": "Whether to reject prompt injection before structured extraction." }, "fullPage": { "type": "boolean", "description": "Whether a screenshot should capture the full page." }, "quality": { "type": "integer", "minimum": 1, "maximum": 100, "description": "The screenshot quality from 1 through 100." }, "viewport": { "type": "object", "additionalProperties": { "description": "A record value." }, "description": "The screenshot viewport dimensions." }, "modes": { "type": "array", "items": { "type": "string", "enum": [ "git-diff", "json" ], "description": "A change-tracking comparison mode." }, "description": "The change-tracking comparison modes." }, "tag": { "type": "string", "description": "The change-tracking history tag." }, "question": { "type": "string", "description": "The natural-language question to answer about the page." }, "query": { "type": "string", "description": "The query used to select relevant page highlights." } }, "required": [ "type" ], "additionalProperties": false, "description": "A structured Firecrawl format descriptor." } ], "description": "A requested Firecrawl output format." }, "description": "The output formats to return." }, "nullable": true, "handle": "formats", "value": null }, { "description": "Custom HTTP headers to send with the request.", "jsonSchema": { "type": "object", "additionalProperties": { "type": "string", "description": "A record value." }, "description": "Custom HTTP headers to send with the request." }, "nullable": true, "handle": "headers", "value": null }, { "description": "Location settings for the request.", "jsonSchema": { "type": "object", "properties": { "country": { "type": "string", "description": "The ISO 3166-1 alpha-2 country code to request from." }, "languages": { "type": "array", "items": { "type": "string", "description": "A preferred locale such as en-US or fr-CA." }, "description": "The preferred locales for the request." } }, "additionalProperties": true, "description": "Location settings for the request." }, "nullable": true, "handle": "location", "value": null }, { "description": "The request timeout in milliseconds.", "jsonSchema": { "type": "integer", "minimum": 1000, "maximum": 300000, "description": "The request timeout in milliseconds." }, "nullable": true, "handle": "timeout", "value": null }, { "description": "The delay before scraping starts.", "jsonSchema": { "type": "integer", "description": "The delay before scraping starts." }, "nullable": true, "handle": "waitFor", "value": null }, { "description": "The cache max age in milliseconds.", "jsonSchema": { "type": "integer", "description": "The cache max age in milliseconds." }, "nullable": true, "handle": "maxAge", "value": null }, { "description": "The minimum acceptable cache age without triggering a fresh scrape.", "jsonSchema": { "type": "integer", "description": "The minimum acceptable cache age without triggering a fresh scrape." }, "nullable": true, "handle": "minAge", "value": null }, { "description": "Whether to keep only the main content of the page.", "jsonSchema": { "type": "boolean", "description": "Whether to keep only the main content of the page." }, "nullable": true, "handle": "onlyMainContent", "value": null }, { "description": "Whether to run Firecrawl's additional LLM-based content cleanup.", "jsonSchema": { "type": "boolean", "description": "Whether to run Firecrawl's additional LLM-based content cleanup." }, "nullable": true, "handle": "onlyCleanContent", "value": null }, { "description": "The HTML tags that should be prioritized in the extracted content.", "jsonSchema": { "type": "array", "items": { "type": "string", "description": "An HTML tag name to keep." }, "description": "The HTML tags that should be prioritized in the extracted content." }, "nullable": true, "handle": "includeTags", "value": null }, { "description": "The HTML tags that should be removed from the extracted content.", "jsonSchema": { "type": "array", "items": { "type": "string", "description": "An HTML tag name to remove." }, "description": "The HTML tags that should be removed from the extracted content." }, "nullable": true, "handle": "excludeTags", "value": null }, { "description": "Whether to emulate a mobile device.", "jsonSchema": { "type": "boolean", "description": "Whether to emulate a mobile device." }, "nullable": true, "handle": "mobile", "value": null }, { "description": "The proxy mode to use for the request.", "jsonSchema": { "type": "string", "enum": [ "basic", "enhanced", "auto" ], "description": "The proxy mode to use for the request." }, "nullable": true, "handle": "proxy", "value": null }, { "description": "The parser configurations to enable for the request.", "jsonSchema": { "type": "array", "items": { "anyOf": [ { "const": "pdf", "description": "The default PDF parser." }, { "type": "object", "additionalProperties": { "description": "A record value." }, "description": "A configured PDF parser." } ], "description": "A parser name or configuration." }, "description": "The parser configurations to enable for the request." }, "nullable": true, "handle": "parsers", "value": null }, { "description": "Whether ad resources should be blocked.", "jsonSchema": { "type": "boolean", "description": "Whether ad resources should be blocked." }, "nullable": true, "handle": "blockAds", "value": null }, { "description": "Whether Firecrawl should store the result in cache.", "jsonSchema": { "type": "boolean", "description": "Whether Firecrawl should store the result in cache." }, "nullable": true, "handle": "storeInCache", "value": null }, { "description": "Whether base64-encoded images should be removed from the output.", "jsonSchema": { "type": "boolean", "description": "Whether base64-encoded images should be removed from the output." }, "nullable": true, "handle": "removeBase64Images", "value": null }, { "description": "Whether TLS verification should be skipped.", "jsonSchema": { "type": "boolean", "description": "Whether TLS verification should be skipped." }, "nullable": true, "handle": "skipTlsVerification", "value": null }, { "description": "Whether the request should opt into zero data retention.", "jsonSchema": { "type": "boolean", "description": "Whether the request should opt into zero data retention." }, "nullable": true, "handle": "zeroDataRetention", "value": null }, { "description": "Whether to enable Firecrawl lockdown mode.", "jsonSchema": { "type": "boolean", "description": "Whether to enable Firecrawl lockdown mode." }, "nullable": true, "handle": "lockdown", "value": null }, { "description": "Whether and how to redact personally identifiable information.", "jsonSchema": { "anyOf": [ { "type": "boolean", "description": "Whether to enable default PII redaction." }, { "type": "object", "additionalProperties": { "description": "A record value." }, "description": "Custom PII redaction settings." } ], "description": "Whether and how to redact personally identifiable information." }, "nullable": true, "handle": "redactPII", "value": null }, { "description": "The browser profile settings.", "jsonSchema": { "type": "object", "additionalProperties": { "description": "A record value." }, "description": "The browser profile settings." }, "nullable": true, "handle": "profile", "value": null }, { "description": "The threat-protection override settings.", "jsonSchema": { "type": "object", "additionalProperties": { "description": "A record value." }, "description": "The threat-protection override settings." }, "nullable": true, "handle": "threatProtection", "value": null }, { "description": "Metadata attached to the Firecrawl audit event.", "jsonSchema": { "type": "object", "additionalProperties": { "description": "A record value." }, "description": "Metadata attached to the Firecrawl audit event." }, "nullable": true, "handle": "auditMetadata", "value": null } ], "outputs": [ { "description": "The output payload for this action.", "jsonSchema": { "type": "object", "properties": { "success": { "type": "boolean", "description": "Whether the scrape request succeeded." }, "data": { "type": "object", "additionalProperties": { "description": "A record value." }, "description": "The extracted page payload." }, "warning": { "type": "string", "description": "A warning returned by Firecrawl." }, "error": { "type": "string", "description": "An error message returned by Firecrawl." }, "code": { "anyOf": [ { "type": "string", "description": "A union variant." }, { "type": "number", "description": "A union variant." } ], "description": "The Firecrawl response code." } }, "required": [ "success" ], "additionalProperties": true, "description": "The output payload for this action." }, "nullable": false, "handle": "output" } ], "name": "Scrape page as Markdown", "executor": { "kind": "connector", "action": "firecrawl.scrape", "outputMode": "value" } } }, "n_6d52f12b84c98c09": { "inputs": { "result": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_23eb24d189ac0b1a", "output": "output" } ] } }, "name": "Read Markdown and page status", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "object" }, "nullable": false, "handle": "result" } ], "outputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "response" }, { "jsonSchema": { "type": "integer", "minimum": 100, "maximum": 599 }, "nullable": true, "handle": "pageStatus" } ], "name": "Read Markdown and page status", "moduleId": "n_5543e374b1a6b622", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_482263940af4f491": { "name": "Page Markdown", "kind": "outputs", "outputDefs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "response" }, { "jsonSchema": { "type": "integer", "minimum": 100, "maximum": 599 }, "nullable": true, "handle": "pageStatus" } ], "outputMappings": { "response": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_6d52f12b84c98c09", "output": "response" } ] }, "pageStatus": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_6d52f12b84c98c09", "output": "pageStatus" } ] } } } }, "edges": [ { "source": "n_6fd5b1a65d6a0aeb", "target": "n_2a3d4459a1788860" }, { "source": "n_2a3d4459a1788860", "target": "n_23eb24d189ac0b1a" }, { "source": "n_23eb24d189ac0b1a", "target": "n_6d52f12b84c98c09" }, { "source": "n_6d52f12b84c98c09", "target": "n_482263940af4f491" } ] } }, "modules": { "n_926e79973add3996": { "name": "Validate page URL", "imports": [], "source": "export default function ({ url }) {\n if (typeof url !== 'string' || !/^https?:\\/\\/[^\\s/]+(?:\\/[^\\s]*)?$/i.test(url.trim())) {\n throw new Error('Supply one nonempty HTTP or HTTPS page URL.');\n }\n return { url: url.trim() };\n}\n" }, "n_5543e374b1a6b622": { "name": "Read Markdown and page status", "imports": [], "source": "export default function ({ result }) {\n if (!result || typeof result !== 'object' || Array.isArray(result) || result.success !== true) {\n throw new Error('Firecrawl did not report a successful scrape.');\n }\n const response = result.data?.markdown;\n if (typeof response !== 'string' || !response.trim()) {\n throw new Error('Firecrawl did not return nonempty Markdown.');\n }\n const status = result.data?.metadata?.statusCode;\n return { response, pageStatus: Number.isInteger(status) && status >= 100 && status <= 599 ? status : null };\n}\n" } } }, "presentation": { "designer": { "version": 1, "flow": { "direction": "vertical" } } } }