An open API service indexing awesome lists of open source software.

https://github.com/yannisalexiou/appstore-webhook-proxy

App Store Webhook Proxy for Slack & MS Teams
https://github.com/yannisalexiou/appstore-webhook-proxy

app-store-connect ios microsoft-teams nodejs productivity slack slack-api webhook

Last synced: 12 months ago
JSON representation

App Store Webhook Proxy for Slack & MS Teams

Awesome Lists containing this project

README

          

# App Store Webhook Proxy for Microsoft Teams & Slack

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
![Node.js](https://img.shields.io/badge/node-%3E%3D18.x-brightgreen)

[![Docker Ready](https://img.shields.io/badge/docker-ready-blue)](https://hub.docker.com/r/yannisalexiou/appstore-webhook-proxy)
[![Render Ready](https://img.shields.io/badge/Render-Ready-8A06FF?style=flat&logo=render&logoSize=auto)](https://render.com/deploy)
[![Unraid Ready](https://img.shields.io/badge/Unraid-Ready-f15a2c?style=flat&logo=unraid&logoSize=auto)](https://forums.unraid.net/topic/191280-support-yannisalexiou-app-store-webhook-proxy/)

![Slack Integration](https://img.shields.io/badge/slack-supported-4A154B?logo=slack&logoColor=white)
![MS Teams Integration](https://img.shields.io/badge/teams-supported-6264A7?logo=microsoft-teams&logoColor=white)

[![Buy Me a Coffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-%E2%98%95-blue)](https://coff.ee/alexiou)

This project provides a simple, secure Node.js proxy to forward webhook events from **App Store Connect** to **Microsoft Teams** and/or **Slack**, including signature verification and platform-specific formatting.
---

## ๐Ÿš€ Features

- โœ… Verifies App Store webhook signatures using HMAC SHA-256
- โœ… Forwards formatted messages to Microsoft Teams and Slack
- โœ… Custom message templates per platform
- โœ… Supports custom timezones for event timestamps
- โœ… Error handling and logging
- โœ… Dockerized and ready for deployment (e.g. Render, Railway)
- โœ… One-click deployable to Render

---

## ๐Ÿ“‹ Prerequisites
1. App Store Connect access with one of the following roles: **Account Holder**, **Admin**, or **App Manager** to create a webhook.
2. A configured workspace in either: Microsoft Teams and/or Slack

---

## ๐Ÿ“ฆ Installation Guides
End-to-end simple installation guides, from installing the proxy to get the test message to MS Teams / Slack

### ๐Ÿ’ฌ Microsoft Teams
![MS Teams Notification Screenshot](documentation/assets/TeamsAppStoreUpdateResponse.png)

**๐Ÿ“˜ Step-by-step setup guide**: [Integrate App Store Webhooks with Microsoft Teams (Medium)](https://medium.com/p/af3c8c840c15)

### ๐Ÿ’ฌ Slack
![Slack Notification Screenshot](documentation/assets/SlackAppStoreUpdateResponse.png)

**๐Ÿ“˜ Step-by-step setup guide**: [Integrate App Store Webhooks with Slack (Medium)](https://medium.com/p/4785b8306c81)

---

## โœ… Supported Webhook Events
- `appStoreVersionAppVersionStateUpdated`
- `webhookPingCreated`

Unknown events will still be delivered in raw JSON.

---

## ๐Ÿ”ง Proxy Setup Options
Here you can find all the available options to run the proxy.

โš ๏ธ To make the proxy work, it must be accessible from the internet. In my Unraid setup, I use an NGINX reverse proxy. If you're not familiar with this, it's easier to use the [1. One-Click Render Deployment](#1-one-click-render-deployment) option, which provides a public domain automatically.

**The incoming webhook should be sent to the path: `/appstore-webhook`.**

### 1. One-Click Render Deployment
Click below to deploy instantly to Render:

[![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy)

Make sure to set the environment variables during setup [(Read the Environment Variables table below)](#%EF%B8%8F-environment-variables).
> Render automatically sets `NODE_ENV=production`

### 2. Unraid Setup
To install via Unraid:

1. Open the **Apps** tab in your Unraid dashboard.
2. Search for:
**`AppStore-Webhook-Proxy`**
3. Click **Install** and configure the required environment variables.

๐Ÿ’ฌ **Need help or want to leave feedback?**
Join the support thread in the [Unraid Community Forum](https://forums.unraid.net/topic/191280-support-yannisalexiou-app-store-webhook-proxy/).

๐ŸŽฅ **Watch the setup walkthrough:**
[![Watch the video](https://img.youtube.com/vi/g_EBC1CdblE/0.jpg)](https://www.youtube.com/watch?v=g_EBC1CdblE)

### 3. Docker Setup
Build and run using Docker:

```bash
docker build -t appstore-webhook-proxy .
docker run -p 3000:3000 --env-file .env appstore-webhook-proxy
```

### 4. Manual Setup (Node.js)
If you'd like to run the app directly with Node.js:

```bash
git clone https://github.com/yourusername/appstore-webhook-proxy.git
cd appstore-webhook-proxy
npm install
```

---

## โš™๏ธ Environment Variables

Create a `.env` file (or set variables directly in your cloud environment):

| Variable | Explanation | Default Value |
|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|
| `SHARED_SECRET` | **Required.** Secret used to verify incoming App Store Webhook requests. You define it when creating the webhook in App Store Connect, then set the same value here.
Set it here: [App Store Webhooks Setup](https://appstoreconnect.apple.com/access/integrations/webhooks) | *(empty)* |
| `TEAMS_WEBHOOK_URL` | **Required if integrating with Microsoft Teams.** Webhook URL for sending notifications to Microsoft Teams. Leave empty if not used.
Example: `https://your-teams.webhook.url`
Create it here: [Microsoft Teams Incoming Webhook Guide](https://learn.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook?tabs=newteams%2Cdotnet) | *(empty)* |
| `SLACK_WEBHOOK_URL` | **Required if integrating with Slack.** Webhook URL for sending notifications to Slack. Leave empty if not used.
Example: `https://hooks.slack.com/services/XXX/YYY/ZZZ`
Create it here: [Slack Webhook Guide](https://api.slack.com/messaging/webhooks) | *(empty)* |
| `APP_STORE_URL` | *(Optional)* Public URL of your app on the App Store. Included in notifications to make it easier to access the appโ€™s page.
Example: `https://apps.apple.com/app/id123456789` | *(empty)* |
| `TIMEZONE` | *(Optional)* Timezone used to format timestamps in messages. Use a valid [IANA timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), e.g. `Europe/Athens`. | `UTC` |

You can also copy from the example:
```bash
cp .env.example .env
```

---

## ๐Ÿงช Running Locally

```bash
npm start
```
Then send a webhook POST to:
```
http://localhost:3000/appstore-webhook
```

---

## ๐Ÿ” Usefull App Store Connect info:
- When setting up the webhook in App Store Connect, Apple will ask for a **secret**. Use a string of your choice and set it in `SHARED_SECRET`.
- Official docs:
- [Apple Webhook Notification Overview]()https://developer.apple.com/documentation/AppStoreConnectAPI/webhook-notifications
- [Configuring Webhook Notifications](https://developer.apple.com/documentation/appstoreconnectapi/configuring-webhook-notifications)
- [Webhook Permissions Guide](https://developer.apple.com/help/app-store-connect/manage-your-team/manage-webhooks)

---

## ๐Ÿ“‚ Project Structure

```
.
โ”œโ”€โ”€ app.js # Entry point
โ”œโ”€โ”€ routes/
โ”‚ โ””โ”€โ”€ webhook.js # Webhook handler
โ”œโ”€โ”€ utils/
โ”‚ โ”œโ”€โ”€ eventTemplates.js # Teams formatter
โ”‚ โ”œโ”€โ”€ slackTemplates.js # Slack formatter
โ”‚ โ””โ”€โ”€ stateDescriptions.js
โ”œโ”€โ”€ services/
โ”‚ โ”œโ”€โ”€ signatureVerifier.js
โ”‚ โ”œโ”€โ”€ teamsNotifier.js
โ”‚ โ””โ”€โ”€ slackNotifier.js
โ”œโ”€โ”€ middleware/
โ”‚ โ”œโ”€โ”€ errorHandler.js
โ”‚ โ””โ”€โ”€ logging.js
โ”œโ”€โ”€ Dockerfile
โ”œโ”€โ”€ render.yaml # Render deploy spec
โ”œโ”€โ”€ .env.example
โ”œโ”€โ”€ .dockerignore
โ”œโ”€โ”€ .gitignore
โ””โ”€โ”€ README.md
```

---

## ๐Ÿ’ก Contributing

PRs and feedback welcome! You can help with:
- More supported event types
- Custom Slack/Teams formatting
- Delivery logs and retry support

---

## ๐Ÿ“ License
MIT