diff --git a/ai-connector/claude/claude.json b/ai-connector/claude/claude.json index 7958773..1a3e87b 100644 --- a/ai-connector/claude/claude.json +++ b/ai-connector/claude/claude.json @@ -5,24 +5,10 @@ "data": { "type": "blueprint", "attributes": { - "checkAuth": [ - { - "action": "goToUrl", - "url": "https://claude.ai/settings/billing" - }, - { - "action": "waitForNetworkIdle" - }, - { - "action": "checkAuth", - "notAuthUrlPattern": "/login", - "timeout": 5000 - } - ], "getDocuments": [ { "action": "goToUrl", - "url": "https://claude.ai/settings/billing" + "url": "https://platform.claude.com/settings/billing" }, { "action": "waitForNetworkIdle" @@ -32,29 +18,34 @@ "seconds": 2 }, { - "action": "paginationLoop", - "id": "load-more-pagination", - "nextSelector": "button:has-text('Load more')", - "maxPages": 20, + "action": "forEach", + "id": "stripe-invoice-links", + "on": { + "querySelector": "tbody a[href*='stripe.com']" + }, + "selectorStrategies": [ + { + "strategy": "css", + "value": "tbody a[href*='stripe.com']" + }, + { + "strategy": "css", + "value": "tbody.text-sm a.inline.underline" + }, + { + "strategy": "href-pattern", + "value": "a[href*='pay.stripe.com/invoice']" + } + ], "steps": [ { - "action": "forEach", - "id": "invoice-links-loop", - "optional": true, - "on": { - "querySelector": "a[href*='invoice.stripe.com']" - }, - "steps": [ - { - "action": "getPdf", - "outputVariable": "new_pdfs" - }, - { - "action": "mergeVariables", - "inputVariable": "new_pdfs", - "outputVariable": "all_pdfs" - } - ] + "action": "getPdf", + "outputVariable": "new_pdfs" + }, + { + "action": "mergeVariables", + "inputVariable": "new_pdfs", + "outputVariable": "all_pdfs" } ] }, @@ -62,6 +53,20 @@ "action": "downloadPdfsFromUrls", "inputVariable": "all_pdfs" } + ], + "checkAuth": [ + { + "action": "goToUrl", + "url": "https://platform.claude.com/settings/billing" + }, + { + "action": "waitForNetworkIdle" + }, + { + "action": "checkAuth", + "authSelector": "a[href*='/settings/billing']", + "timeout": 10000 + } ] } }