OpenRouterを介してKimi K2を使用してStripeデータに自然言語でアクセスする

中級

これはCRM, AI Chatbot分野の自動化ワークフローで、12個のノードを含みます。主にStripeTool, Agent, ChatTrigger, LmChatOpenRouter, MemoryBufferWindowなどのノードを使用。 OpenRouterを使用してKimi K2で自然言語管理によるStripeデータ管理

前提条件
  • Stripe API Key
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "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": "AIエージェント",
      "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": "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": "チャットメッセージ受信時",
      "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": "シンプルメモリ",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        80,
        112
      ],
      "parameters": {
        "contextWindowLength": 20
      },
      "typeVersion": 1.3
    },
    {
      "id": "08695c48-3f6d-404d-acca-d799708f101b",
      "name": "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": "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": "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": "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": "付箋",
      "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": "付箋1",
      "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": "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": "付箋2",
      "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
          }
        ]
      ]
    }
  }
}
よくある質問

このワークフローの使い方は?

上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。

このワークフローはどんな場面に適していますか?

中級 - 顧客管理, AIチャットボット

有料ですか?

このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。

ワークフロー情報
難易度
中級
ノード数12
カテゴリー2
ノードタイプ6
難易度説明

経験者向け、6-15ノードの中程度の複雑さのワークフロー

作成者
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.

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34