当前位置: 首页 > Skill >

Self-Integration

Self-Integration

Self-Integration

连接外部应用并执行操作,用于与Slack、Linear、HubSpot、Salesforce、Jira、GitHub、Google Sheets等服务交互,如发送消息、创建任务、同步数据、管理联系人或执行API操作。

1.1.2 2026.11.25 844
获取Skill文件查看使用说明
作 者:顾景 许可证: 更新时间:2026.11.25
本文目录展开

Self-Integration

Connect to any external app and perform actions on it. Uses the Membrane API.

Making API Requests

All requests go to ${MEMBRANE_API_URL:-https://api.getmembrane.com} with a Bearer token:

Authorization: Bearer $MEMBRANE_TOKEN
Content-Type: application/json

Get the API token from the Membrane dashboard.

Workflow

Step 1: Get a Connection

A connection is an authenticated link to an external app (e.g. a user's Slack workspace, a HubSpot account). You need one before you can run actions.

1a. Check for existing connections

GET /connections

Look for a connection matching the target app. Key fields: id, name, connectorId, disconnected.

If a matching connection exists and disconnected is false, skip to Step 2.

1b. Find a connector

A connector is a pre-built adapter for an external app. Search by app name:

GET /search?q=slack

Look for results with elementType: "connector". Use element.id as connectorId in step 1d.

If nothing is found, go to step 1c to build a connector.

1c. Build a connector (if none exists)

Create a Membrane Agent session to build a connector:

POST /agent/sessions with body {"prompt": "Build a connector for Slack (https://slack.com)"}

Adjust the prompt to describe the actual app you need. Poll GET /agent/sessions/{sessionId}?wait=true&timeout=30 until state is "idle" or status is "completed".

You can send follow-up instructions via POST /agent/sessions/{sessionId}/message or abort via POST /agent/sessions/{sessionId}/interrupt.

After the connector is built, search for it again (step 1b).

1d. Request a connection

Create a connection request so the user can authenticate with the external app:

POST /connection-requests with body {"connectorId": "cnt_abc123"}

The response includes a url. Tell the user to open the url to complete authentication (OAuth, API key, etc.).

1e. Check connection result

Poll until the user completes authentication:

GET /connection-requests/{requestId}

  • status: "pending" — user hasn't completed yet, poll again.
  • status: "success" — done. Use resultConnectionId as the connection ID going forward.
  • status: "error" — failed. Check resultError for details.

Step 2: Get an Action

An action is an operation you can perform on a connected app (e.g. "Create task", "Send message", "List contacts").

2a. Search for actions

Search using a natural language description of what you want to do:

GET /actions?connectionId=con_abc123&intent=send+a+message&limit=10

Each result includes id, name, description, inputSchema (what parameters the action accepts), and outputSchema (what it returns).

If no suitable action exists, go to step 2b.

2b. Build an action (if none exists)

Use Membrane Agent. ALWAYS include the connection ID in the prompt:

POST /agent/sessions with body {"prompt": "Create a tool to send a message in a channel for connection con_abc123"}

Adjust the prompt to describe the actual action you need. Poll for completion the same way as step 1c. After the action is built, search for it again (step 2a).

Step 3: Run an Action

Execute the action using the action ID from step 2 and the connection ID from step 1:

POST /actions/{actionId}/run?connectionId=con_abc123 with body {"input": {"channel": "#general", "text": "Hello!"}}

Provide input matching the action's inputSchema.

The result is in the output field of the response.

API Reference

Base URL: ${MEMBRANE_API_URL:-https://api.getmembrane.com} Auth header: Authorization: Bearer $MEMBRANE_TOKEN

GET /connections

List all connections.

Response:

{
  "items": [
    {
      "id": "string",
      "name": "string",
      "connectorId": "string",
      "integrationId": "string (optional)",
      "disconnected": "boolean",
      "state": "NOT_CONFIGURED | SETUP_IN_PROGRESS | SETUP_FAILED | READY",
      "error": "object (optional)",
      "createdAt": "datetime",
      "updatedAt": "datetime"
    }
  ]
}

GET /search

Search workspace elements by keyword.

Query parameters:

Param Type Description
q string (required) Search query (1-200 chars)
elementType string (optional) Filter by type: Connector, Integration, Action, etc.
limit number (optional) Max results (1-100)

Response:

{
  "items": [
    {
      "elementType": "Connector",
      "element": {
        "id": "string",
        "name": "string",
        "logoUri": "string (optional)"
      }
    }
  ]
}

POST /connection-requests

Create a connection request for user authentication.

Request body (at least one identifier required):

Field Type Description
connectorId string Connector ID
integrationId string Integration ID (alternative)
integrationKey string Integration key (alternative)
connectionId string Existing connection ID (for reconnecting)
name string Custom connection name
connectorVersion string Connector version
connectorParameters object Connector-specific parameters

Response:

{
  "requestId": "string",
  "url": "string",
  "status": "pending | success | cancelled | error",
  "connectorId": "string (optional)",
  "integrationId": "string (optional)",
  "resultConnectionId": "string (optional, set on success)",
  "resultError": "object (optional, set on error)",
  "createdAt": "datetime"
}

GET /connection-requests/:requestId

Check connection request status. Same response schema as POST.

GET /actions

List or search actions.

Query parameters:

Param Type Description
connectionId string Filter by connection
integrationId string Filter by integration
intent string Natural language search (max 200 chars)
limit number Max results (default 10)

Response:

{
  "items": [
    {
      "id": "string",
      "name": "string",
      "key": "string",
      "description": "string (optional)",
      "type": "string",
      "inputSchema": "JSON Schema (optional)",
      "outputSchema": "JSON Schema (optional)",
      "integrationId": "string (optional)",
      "connectionId": "string (optional)"
    }
  ]
}

POST /actions/:actionId/run

Run an action.

Query parameters:

Param Type Description
connectionId string Connection to run the action on

Request body:

Field Type Description
input any Parameters matching the action's inputSchema

Response:

{
  "output": "any"
}

POST /agent/sessions

Create an agent session to build connectors or actions.

Request body:

Field Type Description
prompt string (required) Task description

Response:

{
  "id": "string",
  "status": "queued | starting | running | completed | failed | cancelled",
  "state": "busy | idle",
  "prompt": "string",
  "createdAt": "datetime",
  "updatedAt": "datetime"
}

GET /agent/sessions/:id

Get agent session status.

Query parameters:

Param Type Description
wait boolean If true, long-poll until session is idle or timeout
timeout number Max wait in seconds (1-60, default 30)

Response: same schema as POST /agent/sessions.

POST /agent/sessions/:id/message

Send a follow-up message to an active agent session.

Request body:

Field Type Description
input string (required) Message to send

Response: same schema as POST /agent/sessions.

POST /agent/sessions/:id/interrupt

Abort an agent session.

Response:

{
  "interrupted": "boolean"
}

External Endpoints

All requests go to the Membrane API. No other external services are contacted directly by this skill.

Endpoint Data Sent
${MEMBRANE_API_URL:-https://api.getmembrane.com}/* API token, connection parameters, action inputs, agent prompts

Security & Privacy

  • All data is sent to the Membrane API over HTTPS.
  • MEMBRANE_TOKEN is a high-privilege credential that can create connections and run actions across external apps. Treat it as a secret.
  • Connection authentication (OAuth, API keys) is handled by Membrane — credentials for external apps are stored by the Membrane service, not locally.
  • Action inputs and outputs pass through the Membrane API to the connected external app.

By using this skill, data is sent to Membrane. Only install if you trust Membrane with access to your connected apps.

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,016
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,004
PHP集成RabbitMQ实现消息队列的完整步骤

使用 php-amqplib 库,通过建立连接、声明交换机与队列并绑定,即可在 PHP 中实现消息的发送与消费。

2026.05.24 1,001
Apache开启.htaccess及使用方法详解

本文介绍如何在本地Apache环境中启用.htaccess文件,主要涉及修改httpd.conf中的AllowOverride参数。同时详细解析.htaccess的多种实用功能,包括自定义错误页面、目录密码保护、IP访问限制、URL自动转向、默认首页设置以及防止图片盗链等配置方法,并分析了使用.htaccess对服务器性能和安全性的潜在影响。

2026.05.09 1,001
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,001
Linux内核提权风险待核实,先查版本与补丁

CVE-2026-78901在摘要中被称为Linux内核ext4本地提权漏洞,CVSS评分7.8,但上游正文暂未核实。本文提供通用只读排查命令,帮运维和开发者核对当前运行内核、发行版补丁及升级生效状态。

2026.12.02 1,000
Skill 文件
  • SKILL.md
    • Self-Integration
    • Making API Requests
    • Workflow
      • Step 1: Get a Connection
        • 1a. Check for existing connections
        • 1b. Find a connector
        • 1c. Build a connector (if none exists)
        • 1d. Request a connection
        • 1e. Check connection result
      • Step 2: Get an Action
        • 2a. Search for actions
        • 2b. Build an action (if none exists)
      • Step 3: Run an Action
    • API Reference
      • GET /connections
      • GET /search
      • POST /connection-requests
      • GET /connection-requests/:requestId
      • GET /actions
      • POST /actions/:actionId/run
      • POST /agent/sessions
      • GET /agent/sessions/:id
      • POST /agent/sessions/:id/message
      • POST /agent/sessions/:id/interrupt
    • External Endpoints
    • Security & Privacy
  • 项目或源文件

相关 Skill

更多
gspread-sheets gspread-sheets 使用 gspread Python 库通过服务帐号批量读取/写入 Google Sheets,适用于需要读取、写入、更新、清除等操作。
客服数据一体化看板 客服数据一体化看板 客服数据一体化看板生成技能。支持每日/每周自动更新看板,是本技能的核心优势。当用户需要生成客服数据看板、绩效看板、每日数据看板,或将Excel/CSV/Google Sheets/腾讯文档/API数据整合成可视化Dashboard时使用。触发词包括:客服数据看板、数据看板、绩效看板、每日看板、每周看板、Dashboard、dashboard、数据可视化、客服报表。支持输出为HTML网页看板(可配置自动刷新数据源)、Excel报表(含图表)、PPT汇报 slides、腾讯文档智能表格四种格式。
Gws Sheets Gws Sheets Google Sheets:读取和写入电子表格
Spreadsheet & Data Wrangling Master Spreadsheet & Data Wrangling Master 完整的电子表格方法论——涵盖数据清洗、转换、分析、仪表板、自动化与报告,支持 CSV、Excel、Google Sheets 等格式。
Multi-API Data Pipeline to Google Sheets Multi-API Data Pipeline to Google Sheets 连接多个 REST API,获取并转换数据,推送至实时 Google Sheets 仪表盘,自动定时更新。