• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
dervondenbergen

dervondenbergen

xcodeCloudToDiscord

Forwards Xcode Cloud webhooks to Discord
Public
Like
xcodeCloudToDiscord
Home
Code
2
README.md
H
main.ts
Branches
1
Pull requests
Remixes
History
Environment variables
1
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
/
README.md
Code
/
README.md
Search
12/22/2025
README.md

Xcode Cloud to Discord Webhook Forwarder

Forward your Xcode Cloud build notifications to Discord with beautifully formatted embed messages.

Xcode Cloud

Features

  • πŸ“± Product name - The app being built
  • βš™οΈ Workflow name - Which workflow was triggered
  • πŸ”’ Build number - The build identifier
  • 🌿 Branch/Tag - Shows the git reference with appropriate emoji (🌿 for branches, 🏷️ for tags)
  • πŸ“¦ Repository name
  • ⏱️ Duration - How long the build took (for completed builds)
  • πŸ‘€ Author - Who made the commit
  • πŸ”— Commit SHA - Short hash of the commit
  • πŸ’¬ Commit message - The first line of the commit message

Status Colors

StatusColorEmoji
Succeeded🟒 Greenβœ…
FailedπŸ”΄ Red❌
ErroredπŸ”΄ RedπŸ’₯
Canceled⚫ Gray🚫
Skipped🟑 Yellow⏭️
RunningπŸ”΅ BlueπŸ”„
PendingπŸ”΅ Cyan⏳

Setup

1. Fork this Val

Fork this val to your own Val Town account.

2. Set Environment Variable

Add the DISCORD_WEBHOOK_URL environment variable in your Val Town settings with your Discord webhook URL.

To get a Discord webhook URL:

  1. Go to your Discord server settings
  2. Navigate to Integrations β†’ Webhooks
  3. Create a new webhook or use an existing one
  4. Copy the webhook URL

3. Configure Xcode Cloud

  1. Go to App Store Connect
  2. Select your app β†’ Xcode Cloud β†’ Settings β†’ Webhooks
  3. Click the "+" button to add a new webhook
  4. Name it something like "Discord Notifications"
  5. Paste your Val's HTTP endpoint URL
  6. Save

Your endpoint URL will look like:

https://[username]--[file-id].web.val.run

Usage

Once configured, Xcode Cloud will automatically send webhook notifications to this endpoint whenever:

  • A build is created
  • A build starts running
  • A build completes (success, failure, or other status)

The val will transform these into rich Discord embeds and post them to your configured channel.

API

POST /

Receives Xcode Cloud webhook payloads and forwards them to Discord.

Request Body: Xcode Cloud webhook JSON payload

Response:

  • 200 OK - {"success": true} - Webhook forwarded successfully
  • 405 Method Not Allowed - Only POST requests are accepted
  • 500 Internal Server Error - Configuration error (e.g., missing DISCORD_WEBHOOK_URL)
  • 502 Bad Gateway - Failed to send to Discord

πŸ€– AI-Generated Project

This entire project was created by Claude (Anthropic) using the Val Town MCP (Model Context Protocol) integration.

The Prompt

Please create a simple Val Town Val which receives a xcode cloud webhook (https://developer.apple.com/documentation/xcode/configuring-webhooks-in-xcode-cloud) and forwards this as a webhook request to discord, that way I get notification as if I would connect slack directly to the xcode cloud.

The discord webhook should be in a ENV Variable but is [REDACTED] if you want to test things

What Claude Did

  1. Searched for Xcode Cloud webhook documentation to understand the payload structure
  2. Created a Val Town HTTP handler that:
    • Receives POST requests from Xcode Cloud
    • Parses the webhook payload
    • Transforms it into a Discord embed format with colors, emojis, and structured fields
    • Forwards it to the configured Discord webhook URL
  3. Added the Discord webhook URL as an encrypted environment variable
  4. Tested the integration with simulated payloads for:
    • βœ… Successful builds
    • ❌ Failed builds
    • πŸ”„ Running builds

All done in a single conversation using Val Town's MCP tools!


License

MIT

FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
Β© 2025 Val Town, Inc.