FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
thirdsouth

thirdsouth

Mercury

Unlisted
Like
Mercury
Home
Code
4
backend
3
shared
1
README.md
SETUP.md
Branches
1
Pull requests
Remixes
History
Environment variables
3
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
SETUP.md
Code
/
SETUP.md
Search
5/14/2025
Viewing readonly version of main branch: v8
View latest version
SETUP.md

Setup Guide for Mercury Bank + Slack Integration

Follow these steps to set up your Mercury Bank and Slack integration:

1. Mercury API Setup

  1. Log in to your Mercury account at https://mercury.com
  2. Navigate to Developer Settings
  3. Create a new API key with the following permissions:
    • accounts:read - To read account information
    • transactions:read - To read transaction data
  4. Copy your API key for the next step

2. Val Town Environment Variables

Set up the following environment variables in Val Town:

  1. MERCURY_API_KEY - Your Mercury API key from step 1
  2. SLACK_SIGNING_SECRET - You'll get this in step 3

3. Slack App Setup

  1. Go to https://api.slack.com/apps and click "Create New App"
  2. Choose "From scratch" and give your app a name (e.g., "Mercury Bank")
  3. Select the workspace where you want to install the app
  4. Under "Basic Information", note your "Signing Secret" and add it to Val Town as SLACK_SIGNING_SECRET
  5. Under "Slash Commands", create a new command:
    • Command: /mercury
    • Request URL: Your Val Town HTTP endpoint URL (copy from the Val Town UI)
    • Short Description: "Interact with your Mercury bank account"
    • Usage Hint: "[balance|transactions|search] [args]"
  6. Under "OAuth & Permissions", add the following scopes:
    • commands - To create slash commands
    • chat:write - To post messages in channels
  7. Install the app to your workspace

4. Testing the Integration

  1. In Slack, try the command /mercury help to see available commands
  2. Try /mercury balance to see your account balances
  3. Try /mercury transactions 5 to see your 5 most recent transactions

Troubleshooting

  • If you see "An unexpected error occurred", check your Val Town logs for details
  • Ensure your Mercury API key has the correct permissions
  • Verify that your Slack app is properly configured with the correct URL

Security Considerations

  • Your Mercury API key has access to sensitive financial data. Keep it secure.
  • Consider implementing additional authentication if multiple users will access this integration.
  • For production use, implement proper request signature verification from Slack.
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
ExploreDocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareersBrandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
Ā© 2025 Val Town, Inc.