---
title: Coolify Notifications to Gotify with n8n
summary: A production-ready guide for delivering Coolify deployment, backup, task, server, and container notifications to a Gotify phone notification channel.
publishedAt: "2026-08-07"
tags: [coolify, gotify, n8n, webhooks, notifications, self-hosting, automation]
language: "en"
type: "gist"
status: "published"
---

# Coolify Notifications to Gotify with n8n

This guide configures Coolify to send deployment, backup, scheduled-task,
server, and container events to the **Gotify Android app** through an importable
**n8n** workflow. Coolify sends webhook notifications to n8n, n8n formats the
payload, and Gotify delivers the result as a real-time Android notification.

It uses the released workflow JSON from
[sametcn99/n8n-automations](https://github.com/sametcn99/n8n-automations), not
a locally built or hand-edited workflow.

The workflow supports every event in Coolify's
[Webhook Payloads](https://coolify.io/docs/knowledge-base/webhook-payloads)
reference: application deployments and unexpected stops, database backups,
scheduled tasks, Docker cleanup, server health and patch alerts, Traefik update
alerts, container status changes, and test notifications. Failures and alerts
use Gotify priority `8`, warnings use `6`, and successful events use `3`.

---

## Architecture and Scope

The event path is:

```text
Coolify -> public n8n production webhook -> event formatter -> Gotify server -> Gotify Android app -> phone notification
```

In Gotify terminology, n8n is an **application** that can send messages. The
phone is a separate **client** that receives them. The Gotify application token
configures the sending side; it does not by itself connect a phone.

Coolify delivers webhook notifications as JSON `POST` requests. Every official
payload contains `success`, `event`, and `message`; additional fields describe
the associated application, database, task, server, or container. The workflow
turns those fields into concise messages and does not forward raw JSON payloads
to Gotify.

---

## Prerequisites

Before starting, make sure you have:

- A Coolify instance where you can configure notification channels and events.
- A public URL for an n8n instance that Coolify can reach. HTTPS is strongly
  recommended.
- An n8n instance where you can import and activate workflows and create Gotify
  credentials. n8n Cloud and Community Edition are both suitable.
- A running Gotify server, a user account, and permission to create an
  application token.
- An Android phone with the official Gotify app installed from
  [Google Play](https://play.google.com/store/apps/details?id=com.github.gotify),
  [F-Droid](https://f-droid.org/packages/com.github.gotify/), or the
  [latest GitHub release](https://github.com/gotify/android/releases/latest).

Do not put Gotify tokens, webhook URLs, or production workflow exports in a
public repository.

---

## Step 1 - Download the Released Workflow JSON

Open the [latest GitHub release](https://github.com/sametcn99/n8n-automations/releases/latest)
and download the `coolify-gotify.json` asset. The repository rebuilds this JSON
from its TypeScript source during release publication, so the release asset is
the supported import artifact.

You can also use this download URL:

```text
https://github.com/sametcn99/n8n-automations/releases/latest/download/coolify-gotify.json
```

Release assets intentionally contain this placeholder instead of a real secret:

```text
<long-random-secret>
```

Each installation must replace it with its own random value before importing
the workflow.

---

## Step 2 - Generate a Webhook URL Secret

This workflow protects its endpoint with an unguessable path. Generate a unique
64-character lowercase hexadecimal value, which provides 256 bits of random
entropy.

### Windows PowerShell

```powershell
[Convert]::ToHexString([System.Security.Cryptography.RandomNumberGenerator]::GetBytes(32)).ToLowerInvariant()
```

### macOS or Linux

```bash
openssl rand -hex 32
```

### Python 3

```bash
python3 -c "import secrets; print(secrets.token_hex(32))"
```

On Windows systems where `python3` is unavailable, use `python` instead.

Replace every occurrence of `<long-random-secret>` in the downloaded
`coolify-gotify.json` file with the generated value. The final n8n webhook path
must look like this:

```text
coolify-gotify-0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
```

The path is effectively a password. Never send it in chat, screenshots, logs,
or source control. Use a distinct value for each environment and rotate it
immediately if it is exposed.

---

## Step 3 - Create a Gotify Application and n8n Credential

1. Sign in to the Gotify server.
2. Create an application, for example **Coolify Notifications**.
3. Copy the application's generated token.
4. In n8n, create a **Gotify** credential.
5. Enter the Gotify server URL, without `/message`, and the **application
   token** in that credential.

Use the application token, not a Gotify client or user token. Keep it in n8n's
credential store; do not add it to the workflow JSON, the Code node, or
notification content. A dedicated Gotify application makes token rotation and
message management easier.

---

## Step 4 - Connect the Gotify Android App

The official Gotify Android app maintains a connection to the Gotify server and
displays a device notification whenever the server receives a message. Connect
it before testing the Coolify workflow:

1. Open the Gotify app on the Android phone.
2. Add the public HTTPS URL of the Gotify server.
3. Sign in with the Gotify user account that owns the **Coolify Notifications**
   application created in Step 3.
4. Allow Android notification permission when prompted.
5. Send a test message from the Gotify server's web interface and confirm that
   it appears immediately as an Android notification.

The phone needs network access to the Gotify server. For reliable background
delivery, exclude Gotify from the device's battery optimization. Some Android
vendors terminate background connections aggressively; see
[DontKillMyApp](https://dontkillmyapp.com/) for device-specific guidance.

---

## Step 5 - Import and Activate the n8n Workflow

1. In n8n, create a new workflow or open the import screen.
2. Import the edited `coolify-gotify.json` file from Step 2.
3. Open the **Send to Gotify** node and select the Gotify credential created in
   Step 3.
4. Open **Coolify Webhook Input** and verify its path contains the new
   64-character secret rather than `<long-random-secret>`.
5. Save the workflow.
6. Activate the workflow.
7. Open **Coolify Webhook Input** and copy its **Production URL**.

Use the production URL in Coolify. The n8n test URL only works while n8n is
listening for a manual test request and is not a durable webhook endpoint.

If n8n is behind a reverse proxy, configure its public webhook base URL before
copying the production URL. A typical configuration is:

```text
WEBHOOK_URL=https://n8n.example.com/
```

The final URL must be reachable from the Coolify instance and pass through the
proxy without rewriting its path.

---

## Step 6 - Configure Coolify Webhook Notifications

1. In Coolify, open **Notifications** > **Webhook**.
2. Paste the n8n production URL from Step 5 into **Webhook URL**.
3. Save the notification channel and enable it.
4. Enable these notification events for the webhook channel:
   - **Deployment Success** and **Deployment Failure**
   - **Container Status Changes**
   - **Backup Success** and **Backup Failure**
   - **Scheduled Task Success** and **Scheduled Task Failure**
   - **Docker Cleanup Success** and **Docker Cleanup Failure**
   - **Server Disk Usage**, **Server Reachable**, and **Server Unreachable**
   - **Server Patching** and **Traefik Proxy Outdated**
5. Save the notification event selection.

Coolify sends JSON `POST` requests to this endpoint. Different channels can
have different event selections, so confirm the webhook channel itself has each
event enabled rather than relying on another notification channel's settings.

---

## Step 7 - Verify the End-to-End Delivery

First, use **Send Test Notification** in Coolify's Webhook notification
settings. It should produce a Gotify message titled **Coolify Webhook Test**.

Then confirm real events:

1. Trigger a small application deployment.
2. Confirm n8n records a successful execution.
3. Confirm the Gotify Android app displays an immediate notification with the
   application name, project, environment, deployment link, and application
   URL where those fields are available.
4. Review a controlled failure, backup, scheduled task, or server event as
   appropriate for the environment and confirm it reaches Gotify with the
   expected priority.

Successful notifications use priority `3`. Failed deployments, failed backups,
failed tasks, server availability alerts, disk alerts, patch errors, Traefik
alerts, and stopped containers use priority `8`. A successful local backup with
an S3 upload warning uses priority `6`.

---

## Security and Operations

- Keep HTTPS enabled between Coolify and n8n when the endpoint crosses a
  network boundary.
- Treat the 64-character webhook path as an authentication secret. It is not
  included in Gotify messages.
- Limit access to the n8n workflow, workflow execution history, and Gotify
  application.
- Coolify webhook payloads can contain application, database, task, server,
  container, error, output, and URL information. Configure n8n execution-data
  retention according to your privacy and compliance requirements.
- Rotate the random webhook path if it may have leaked: generate a new value,
  update the n8n Webhook node, save and activate the workflow, then immediately
  update Coolify's Webhook URL.
- When updating the automation, download and review a new release asset, make
  the same secret replacement, import it into a non-production workflow first,
  then switch production after successful delivery tests.

---

## Troubleshooting

| Symptom                                                         | Likely cause                                                                                                           | Resolution                                                                                                                      |
| --------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| Coolify test request receives `404`                             | The configured URL differs from the active n8n production URL.                                                         | Copy the Production URL again from **Coolify Webhook Input**. Do not use the n8n test URL.                                      |
| No n8n execution appears                                        | The workflow is inactive or Coolify cannot reach the endpoint.                                                         | Confirm the workflow is active, the URL is reachable from the Coolify instance, and proxy or firewall rules permit the request. |
| A request reaches n8n unexpectedly                              | The random URL path was disclosed.                                                                                     | Rotate the path in n8n and update Coolify's Webhook URL immediately.                                                            |
| Gotify receives no message                                      | The Gotify server URL, application token, or selected credential is wrong.                                             | Test the Gotify credential in n8n and verify the token belongs to the intended application.                                     |
| The Gotify server receives a message but the phone stays silent | The Android app is disconnected, notifications are blocked, or battery optimization stopped its background connection. | Open the app, verify it is connected to the right server, allow notifications, and exempt it from battery optimization.         |
| Only some Coolify events arrive                                 | The event is not enabled for the Webhook notification channel.                                                         | Review the event selection in **Notifications** > **Webhook**, save it, and trigger the event again.                            |
| The copied URL is internal or invalid                           | n8n's public webhook URL is not configured behind the proxy.                                                           | Set the correct public `WEBHOOK_URL`, restart n8n if required, reactivate the workflow, and copy the Production URL again.      |

---

## What You Get

Once active, the workflow turns Coolify webhook deliveries into concise Gotify
messages. The Gotify Android app receives each new message in real time and
raises the device notification. Each message identifies the event and affected
resource, adds its relevant context, includes Coolify or application links when
available, and keeps large error or task-output values short enough for a
phone notification.
