PopoOpenPlatformOA Api icon

PopoOpenPlatformOA Api

POPO OpenPlatform OA API

Overview

The "创建菜单" (Create Menu) operation for the "菜单" (Menu) resource in this custom n8n node allows users to programmatically create a menu structure, likely for a messaging or social platform that supports interactive menus. This is useful for automating the setup of complex menu hierarchies, such as those used in chatbots, official accounts, or enterprise communication tools.

Common scenarios:

  • Setting up or updating navigation menus for a public account or chatbot.
  • Automating deployment of menu changes across multiple environments.
  • Integrating menu creation into onboarding workflows for new services.

Practical example:
A company wants to update its customer service chatbot's main menu with new options and submenus. Using this node, they can define the entire menu structure in an automated workflow, ensuring consistency and reducing manual errors.

Properties

Name Type Meaning
Button Collection Defines the top-level buttons of the menu. Each button can have properties like type, name, key, etc., and may include sub-buttons.
└ Type Options The action type for the button (e.g., Click, Media ID, Scancode Push, View).
└ Name String The display name of the button shown to users.
└ Key String A unique identifier for the button, used for event handling.
└ Media Type Options Specifies the media type if applicable (Image, Pictext_collection, Text).
└ Content String The content associated with the button, such as a URL or message.
└ Sub Button Collection Allows defining nested sub-buttons under a main button, each with similar properties as above.
文件ID (fileId) String The file ID to download (not relevant for menu creation; ignore for this operation).
文件消息ID (msgId) String The message ID to recall (not relevant for menu creation; ignore for this operation).

Note: For the "创建菜单" operation, only the "Button" property and its nested fields are relevant.

Output

The output will be a JSON object reflecting the API response from the menu creation request. The exact structure depends on the external service, but typically includes:

  • Status code or success indicator
  • Any error messages if the creation failed
  • Details about the created menu (if provided by the API)

Example output:

[
  {
    "errcode": 0,
    "errmsg": "ok"
  }
]

If the API returns additional data about the created menu, it will also appear in the output.

Dependencies

  • External Service: Requires access to the POPO OpenPlatform OA API.
  • API Credentials: You must configure the popoOpenPlatformOAApi credentials in n8n.
  • Environment: No special environment variables are required beyond standard n8n credential configuration.

Troubleshooting

Common issues:

  • Missing or invalid credentials: Ensure the correct API credentials are set up in n8n.
  • Malformed menu structure: If required fields (like button names or types) are missing, the API may reject the request.
  • API limits or permissions: The user/account may lack permission to create menus, or there may be rate limits.

Error messages:

  • "errcode": 40013, "errmsg": "invalid appid": Check your API credentials.
  • "errcode": 40018, "errmsg": "menu name length error": Ensure button names meet length requirements.
  • "errcode": 40022, "errmsg": "menu level error": Check the nesting of buttons and sub-buttons.

Links and References

Discussion