Generate AI text and images with Claude and Stripe metered billing
Ready for 3.0What this workflow does
This workflow has 21 nodes and runs when an HTTP POST request hits its webhook URL. It uses only n8n's built-in nodes. It also calls api.stripe.com and api.anthropic.com over HTTP.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Set - Config (Edit Fields (Set)): sets 8 fields: apiKey, contentType, prompt…
- HTTP Request: calls api.stripe.com
- JS - Resolve Customer (Code): runs custom JavaScript code
- If: checks a condition and branches into true / false
- HTTP Request: calls api.stripe.com
- Respond - Unauthorized (Respond to Webhook): sends the response back to the webhook caller
- JS - Parse Subscription (Code): runs custom JavaScript code
- HTTP Request: calls an HTTP API
- JS - Check Entitlement (Code): runs custom JavaScript code
- If: checks a condition and branches into true / false
…plus 10 more steps. See the full node list below.
HTTP calls to: api.stripe.com, api.anthropic.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 - HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Switch
n8n-nodes-base.switch - Merge
n8n-nodes-base.merge - Respond to Webhook
n8n-nodes-base.respondToWebhook
From the author
Quick overview This workflow exposes a POST webhook that authenticates requests against Stripe customer metadata, checks an active subscription and metered usage limits, generates text with Anthropic Claude or images via an external image API, records Stripe…