Accès aux données Stripe en langage naturel avec Kimi K2 via OpenRouter

Intermédiaire

Ceci est unCRM, AI Chatbotworkflow d'automatisation du domainecontenant 12 nœuds.Utilise principalement des nœuds comme StripeTool, Agent, ChatTrigger, LmChatOpenRouter, MemoryBufferWindow. viaOpenRouterutilisationKimi K2自然语言gestionStripedonnées

Prérequis
  • Clé API Stripe

Catégorie

Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "id": "lc8NKe6V14iG51T4",
  "meta": {
    "instanceId": "9219ebc7795bea866f70aa3d977d54417fdf06c41944be95e20cfb60f992db19",
    "templateCredsSetupCompleted": true
  },
  "name": "Access Stripe data in natural language with Kimi K2 via OpenRouter",
  "tags": [],
  "nodes": [
    {
      "id": "fc80d268-934e-4bb7-a854-0483732bfb34",
      "name": "Agent IA",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -48,
        -112
      ],
      "parameters": {
        "options": {
          "systemMessage": "=You are an AI agent with authorized access to a defined set of Stripe tools. Your core objective is to understand and respond to user queries by securely interacting with Stripe's API, enabling read and write operations in accordance with their requests and permissions.\n\nTool Access and Capabilities\nRead Data Capabilities\nYou can retrieve the following information from Stripe:\nCustomers: Access and list multiple customer records.\nCharges: Retrieve and list multiple charge transactions.\nCoupons: Get lists of existing coupons.\nBalance: Obtain the current balance details.\n\nWrite Data Capabilities\nYou are authorized to:\nCreate Coupons: Generate new coupons within the Stripe system.\n\nStrictly follow these rules:\n\nNever access or attempt to retrieve data outside of the above abilities.\nAlways confirm actions (especially when creating coupons) and provide users with a summary of the resulting Stripe operation.\nClearly explain any Stripe terminology or usage as needed.\nReject and inform users if they request actions beyond your tool permissions.\nYour responses must be concise, accurate, and tailored to the user's intent regarding Stripe operations. \nUse Stripe data responsibly and in line with best practices for financial data access."
        }
      },
      "typeVersion": 2
    },
    {
      "id": "0dc1fc15-7958-4f01-be6d-bed3946d60c9",
      "name": "Modèle de chat OpenRouter",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        -64,
        112
      ],
      "parameters": {
        "model": "moonshotai/kimi-k2",
        "options": {}
      },
      "credentials": {
        "openRouterApi": {
          "id": "TG7gYjmueITLXr7m",
          "name": "OpenRouter account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "6edc5f19-be6c-4842-b69d-efc7bb46ad7f",
      "name": "À la réception d'un message chat",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -256,
        -112
      ],
      "webhookId": "ee12c9ab-62ac-4e5a-b657-4677bcfcf6d0",
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.1
    },
    {
      "id": "8f520f8d-5085-420a-907f-65958f4ca843",
      "name": "Mémoire simple",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        80,
        112
      ],
      "parameters": {
        "contextWindowLength": 20
      },
      "typeVersion": 1.3
    },
    {
      "id": "08695c48-3f6d-404d-acca-d799708f101b",
      "name": "Créer un coupon dans Stripe",
      "type": "n8n-nodes-base.stripeTool",
      "position": [
        320,
        368
      ],
      "parameters": {
        "resource": "coupon",
        "percentOff": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Percent_Off', ``, 'number') }}"
      },
      "credentials": {
        "stripeApi": {
          "id": "zMFMWhEPuLeplXSo",
          "name": "Stripe account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c37f6b38-638b-46f6-a8d9-3ff526a7599b",
      "name": "Obtenir un solde dans Stripe",
      "type": "n8n-nodes-base.stripeTool",
      "position": [
        816,
        96
      ],
      "parameters": {},
      "credentials": {
        "stripeApi": {
          "id": "zMFMWhEPuLeplXSo",
          "name": "Stripe account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "1adee53c-0f39-44cb-b2c6-83779340bb0b",
      "name": "Obtenir plusieurs charges dans Stripe",
      "type": "n8n-nodes-base.stripeTool",
      "position": [
        496,
        96
      ],
      "parameters": {
        "limit": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Limit', ``, 'number') }}",
        "resource": "charge",
        "operation": "getAll"
      },
      "credentials": {
        "stripeApi": {
          "id": "zMFMWhEPuLeplXSo",
          "name": "Stripe account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "b9c48bc6-a79a-4e2b-bb2f-23837bd936af",
      "name": "Obtenir plusieurs coupons dans Stripe",
      "type": "n8n-nodes-base.stripeTool",
      "position": [
        672,
        96
      ],
      "parameters": {
        "limit": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Limit', ``, 'number') }}",
        "resource": "coupon",
        "operation": "getAll"
      },
      "credentials": {
        "stripeApi": {
          "id": "zMFMWhEPuLeplXSo",
          "name": "Stripe account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "94ce8cf5-c2cf-4cb5-8a05-2a72c8011213",
      "name": "Note adhésive",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        256,
        -32
      ],
      "parameters": {
        "width": 688,
        "height": 304,
        "content": "## Read data\n"
      },
      "typeVersion": 1
    },
    {
      "id": "5f79a25d-eab2-452d-ac07-8ccf3778ac2c",
      "name": "Note adhésive1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        256,
        288
      ],
      "parameters": {
        "width": 224,
        "height": 256,
        "content": "## Write data"
      },
      "typeVersion": 1
    },
    {
      "id": "4f9598f9-3e48-4979-a1f5-8c64b5c7b44c",
      "name": "Obtenir plusieurs clients dans Stripe",
      "type": "n8n-nodes-base.stripeTool",
      "position": [
        320,
        96
      ],
      "parameters": {
        "limit": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Limit', ``, 'number') }}",
        "filters": {},
        "resource": "customer",
        "operation": "getAll"
      },
      "credentials": {
        "stripeApi": {
          "id": "zMFMWhEPuLeplXSo",
          "name": "Stripe account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "1cfd5b2f-36d7-42c8-ba67-0d2906d0bd93",
      "name": "Note adhésive2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -624,
        96
      ],
      "parameters": {
        "color": 5,
        "width": 464,
        "height": 192,
        "content": "## Requirements\n\n- An **Stripe** account and API key credentials enabled. n8n docs: https://docs.n8n.io/integrations/builtin/credentials/stripe/ \n- An **[OpenRouter](https://openrouter.ai)** account and API credentials enabled. Set up an API key at https://openrouter.ai/settings/keys "
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "58807a0c-a099-4d5f-9722-3bfce4363f80",
  "connections": {
    "8f520f8d-5085-420a-907f-65958f4ca843": {
      "ai_memory": [
        [
          {
            "node": "fc80d268-934e-4bb7-a854-0483732bfb34",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "0dc1fc15-7958-4f01-be6d-bed3946d60c9": {
      "ai_languageModel": [
        [
          {
            "node": "fc80d268-934e-4bb7-a854-0483732bfb34",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "c37f6b38-638b-46f6-a8d9-3ff526a7599b": {
      "ai_tool": [
        [
          {
            "node": "fc80d268-934e-4bb7-a854-0483732bfb34",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "08695c48-3f6d-404d-acca-d799708f101b": {
      "ai_tool": [
        [
          {
            "node": "fc80d268-934e-4bb7-a854-0483732bfb34",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "1adee53c-0f39-44cb-b2c6-83779340bb0b": {
      "ai_tool": [
        [
          {
            "node": "fc80d268-934e-4bb7-a854-0483732bfb34",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "b9c48bc6-a79a-4e2b-bb2f-23837bd936af": {
      "ai_tool": [
        [
          {
            "node": "fc80d268-934e-4bb7-a854-0483732bfb34",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "6edc5f19-be6c-4842-b69d-efc7bb46ad7f": {
      "main": [
        [
          {
            "node": "fc80d268-934e-4bb7-a854-0483732bfb34",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4f9598f9-3e48-4979-a1f5-8c64b5c7b44c": {
      "ai_tool": [
        [
          {
            "node": "fc80d268-934e-4bb7-a854-0483732bfb34",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}
Foire aux questions

Comment utiliser ce workflow ?

Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.

Dans quelles scénarios ce workflow est-il adapté ?

Intermédiaire - CRM, Chatbot IA

Est-ce payant ?

Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.

Informations sur le workflow
Niveau de difficulté
Intermédiaire
Nombre de nœuds12
Catégorie2
Types de nœuds6
Description de la difficulté

Adapté aux utilisateurs expérimentés, avec des workflows de complexité moyenne contenant 6-15 nœuds

Auteur
Aitor | 1Node

Aitor | 1Node

@aitoralonso

Hi, I’m Aitor. At 1Node we deploy private AI infrastructure that saves teams above 5 figures annually switching from cloud Enterprise solutions. Guaranteed. We also enjoy playing around with n8n workflows. Need help integrating AI or have questions that need answers and guidance? Feel free to send us a message.

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34