Skip to main content

Slack Integration Setup

Connect Cube2 to your Slack workspace for real-time collaboration during MetrePay integration projects.

Overview​

The Cube2 Slack bot allows your team to:

  • Ask questions about the MetrePay API directly in Slack
  • Generate mapping code and type definitions
  • Get integration checklists and examples
  • Collaborate on integration issues in real-time

Prerequisites​

Before you begin, ensure you have:

  • A Slack workspace (MetrePay or partner workspace)
  • A running Cube2 MCP server configured with the MetrePay project
  • Admin access to create Slack apps in your workspace

Step 1: Create a Slack App​

  1. Go to api.slack.com/apps
  2. Click Create New App
  3. Choose From scratch
  4. Name your app (e.g., "Cube2 MetrePay Bot")
  5. Select your workspace

Step 2: Configure Bot Permissions​

Navigate to OAuth & Permissions and add these Bot Token Scopes:

ScopePurpose
app_mentions:readReceive notifications when the bot is mentioned
chat:writeSend messages in channels and conversations
groups:historyRead message history in private channels
im:historyRead message history in direct message conversations
im:writeSend messages in direct message conversations
channels:historyRead message history in public channels
channels:readView basic information about public channels
chat:write.customizeCustomize message appearance and formatting
groups:readView basic information about private channels
im:readView basic information about direct message conversations
links:readView links shared in conversations
mpim:readView basic information about multi-person direct messages
mpim:writeSend messages in multi-person direct messages

Socket Mode allows your bot to receive events without a public URL.

  1. Go to Socket Mode in your app settings
  2. Enable Socket Mode
  3. Create an App-Level Token with connections:write scope
  4. Save the token as SLACK_APP_LEVEL_TOKEN

Step 4: Subscribe to Events​

Navigate to Event Subscriptions:

  1. Enable Events
  2. Subscribe to bot events:
    • app_mention
    • message.im
    • message.channels

Step 5: Install to Workspace​

  1. Go to Install App
  2. Click Install to Workspace
  3. Authorize the permissions
  4. Copy the Bot User OAuth Token

Step 6: Configure Environment Variables​

Share the following with Palomonte Labs technical team:

VariableLocation
SLACK_BOT_TOKENOAuth & Permissions → Bot User OAuth Token
SLACK_SIGNING_SECRETBasic Information → App Credentials → Signing Secret
SLACK_APP_LEVEL_TOKENBasic Information → App-Level Tokens

Step 7: Start the Bot​

This step is done by Palomonte Labs.

Usage​

Once configured, interact with Cube2 in Slack:

You can mention the bot in a channel or talk directly with it in the App chat (as a direct message)

@Cube2 Map a payment link with amount, customer email and name
@Cube2 How do I configure a STATIC subscription?

Example Interactions​

QuestionCube2 Response
"Map a single payment link"Shows attribute mapping for payment link creation
"What's needed for STATIC subscriptions?"Explains recurrentPayment=true and recurrentPaymentType=STATIC configuration
"Generate mapping for subscription modification"Provides field mapping table for modify endpoints
"How do I cancel subscription installments?"Shows cancel-by-amount and cancel-by-invoice mappings