Morning (GreenInvoice) 集成:自动化会计 - Openclaw Skills

作者:互联网

2026-03-30

AI教程

什么是 Morning (GreenInvoice) 财务会计?

Morning (GreenInvoice) 技能通过直接对接 GreenInvoice 平台,赋予您的 AI 代理处理复杂会计任务的能力。此集成可实现客户、库存项目以及包括发票、收据和报价单在内的各种财务单据的无缝创建与管理。通过将 Openclaw Skills 整合到您的工作流中,您可以实现从潜在客户生成到付款确认的整个计费生命周期的自动化,无需人工干预。

该技能专为需要可靠财务自动化的开发人员构建,通过 JWT 处理安全身份验证,并通过严格的验证规则确保数据完整性。无论您是在构建自动计费机器人还是定制 ERP 集成,该技能都提供了以编程方式维护准确财务记录所需的工具。

下载入口:https://github.com/openclaw/skills/tree/main/skills/k0renn/morning-green-invoice

安装与下载

1. ClawHub CLI

从源直接安装技能的最快方式。

npx clawhub@latest install morning-green-invoice

2. 手动安装

将技能文件夹复制到以下位置之一

全局模式 ~/.openclaw/skills/ 工作区 /skills/

优先级:工作区 > 本地 > 内置

3. 提示词安装

将此提示词复制到 OpenClaw 即可自动安装。

请帮我使用 Clawhub 安装 morning-green-invoice。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。

Morning (GreenInvoice) 财务会计 应用场景

  • 为订阅制服务自动生成每月发票。
  • 在外部 CRM 和 Morning (GreenInvoice) 之间同步客户数据库。
  • 在交易成功后立即向客户开具电子收据。
  • 在 AI 驱动的销售互动中创建专业的报价单和采购订单。
  • 管理具有标准化定价和货币的集中式项目目录。
Morning (GreenInvoice) 财务会计 工作原理
  1. AI 代理通过使用用户的 API 凭据调用 getToken 操作进行身份验证,以获取安全的 JWT。
  2. 代理检查现有的客户或项目记录以避免重复,或使用 createClientcreateItem 创建新记录。
  3. 构建单据请求,指定 documentType(如发票、收据)并将其关联至相关的 clientId
  4. 该技能通过 Morning API 处理交易,除非另有说明,否则将应用货币(ILS)和语言(希伯来语)的默认设置。
  5. 系统返回生成的单据 ID 和相关的 PDF 链接以供立即使用。

Morning (GreenInvoice) 财务会计 配置指南

要在 Openclaw Skills 生态系统中使用此技能,您必须首先从 Morning (GreenInvoice) 账户仪表板获取您的 API 凭据。

# 为代理设置凭据的示例
# 确保这些信息被安全存储,而非硬编码
export MORNING_API_KEY_ID="your_api_key_id"
export MORNING_API_KEY_SECRET="your_api_key_secret"

配置完成后,代理将使用 getToken 操作来发起所有后续的 API 请求。

Morning (GreenInvoice) 财务会计 数据架构与分类体系

该技能围绕四个主要实体组织数据,以符合会计标准:

实体 关键属性 用途
认证 (Auth) apiKeyId, apiKeySecret 生成用于安全访问的短期 JWT。
客户 (Client) name, taxId, email, address 存储个人或公司的账单信息。
项目 (Item) name, price, description 定义用于明细条目录入的产品或服务。
单据 (Document) type, lines, currency 最终输出(发票、报价单、收据等)。
name: morning
description: Use to authenticate with Morning (GreenInvoice) and create/manage clients, items, and accounting documents (invoice/receipt/quote/order/credit).

Morning (GreenInvoice)

When to use

Use this skill when you need to interact with Morning / GreenInvoice to:

  • Get an auth token (JWT) using API key credentials
  • Create/update clients
  • Create/update items
  • Create documents (invoice / receipt / quote / order / credit / debit)
  • Retrieve document outputs (e.g., IDs / links) if the tool supports it

What you need from the user

Collect only what’s required for the action:

Authentication

  • apiKeyId
  • apiKeySecret

Client (if creating or searching)

  • name
  • Optional: taxId, email, phone, address, city, country

Item (if creating)

  • name
  • price
  • Optional: description, currency

Document (if creating)

  • documentType (Invoice / Receipt / Quote / Order / CreditInvoice / DebitInvoice)
  • clientId (or enough info to create the client)
  • lines[] (each line: description or itemId, quantity, unitPrice)
  • Optional: currency, language, description, discount

Tool contract

Use the morning tool with an action field.

Supported actions

  • getToken
  • createClient
  • createItem
  • createDocument
  • (Optional, if implemented in your tool): findClient, findItem, getDocument, listDocuments

Guardrails

  • Never log or echo apiKeySecret or JWTs back to the user.
  • Prefer reusing existing clientId / itemId when available.
  • Validate document lines:
    • quantity > 0
    • unitPrice >= 0
  • Currency: default to "ILS" unless the user specifies otherwise.
  • Language: default to "Hebrew" unless the user specifies otherwise.

Examples

1) Authenticate (JWT)

{
  "action": "getToken",
  "apiKeyId": "YOUR_API_KEY_ID",
  "apiKeySecret": "YOUR_API_KEY_SECRET"
}

2) Create a client

{
  "action": "createClient",
  "jwt": "JWT_FROM_getToken",
  "client": {
    "name": "Acme Ltd",
    "taxId": "515555555",
    "email": "billing@acme.com",
    "phone": "+972-50-000-0000",
    "address": "1 Rothschild Blvd",
    "city": "Tel Aviv",
    "country": "Israel"
  }
}

3) Create an item

{
  "action": "createItem",
  "jwt": "JWT_FROM_getToken",
  "item": {
    "name": "Consulting hour",
    "description": "Senior engineering consulting",
    "price": 500,
    "currency": "ILS"
  }
}

4) Create a document (Invoice)

{
  "action": "createDocument",
  "jwt": "JWT_FROM_getToken",
  "document": {
    "documentType": "Invoice",
    "language": "English",
    "currency": "ILS",
    "clientId": "CLIENT_ID",
    "description": "Invoice for January services",
    "lines": [
      {
        "description": "Consulting hour",
        "quantity": 10,
        "unitPrice": 500
      }
    ]
  }
}

5) Create a document (Receipt) using itemId

{
  "action": "createDocument",
  "jwt": "JWT_FROM_getToken",
  "document": {
    "documentType": "Receipt",
    "language": "Hebrew",
    "currency": "ILS",
    "clientId": "CLIENT_ID",
    "lines": [
      {
        "itemId": "ITEM_ID",
        "quantity": 1,
        "unitPrice": 1200
      }
    ]
  }
}

Error handling

  • If token is rejected (401/403): call getToken again and retry the request once.
  • If client/item already exists:
    • Prefer returning the existing ID (if tool supports lookup),
    • Otherwise surface a clear message: “Client already exists; provide clientId or unique identifier.”
  • If validation fails: ask for the missing/invalid fields only (e.g., “quantity must be > 0”).

Output expectations

Return minimally:

  • Created resource IDs (clientId, itemId, documentId)
  • Any relevant URLs (PDF / view links) if the API/tool provides them