Notify LINE
Send a build status notification to LINE, Thailand-first messaging.
Reference: loha/notify-line@v1
Category: deploy
Runtime: curlimages/curl:8.5.0 (non-root, digest-pinned)
License: Apache-2.0
When to use
Use this step to push status updates into LINE, the dominant messaging platform in Thailand. Pair with STATUS: failure on a step that runs only when prior steps fail (using the pipeline's if: semantics) for an on-failure alert.
Parameters
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
LINE_CHANNEL_ACCESS_TOKEN | string | — | Yes | LINE Messaging API channel access token. |
LINE_USER_ID | string | "" | No | LINE user ID to send the message to. Provide either LINE_USER_ID or LINE_GROUP_ID. |
LINE_GROUP_ID | string | "" | No | LINE group ID to send the message to. Provide either LINE_USER_ID or LINE_GROUP_ID. |
MESSAGE | string | — | Yes | Message text to send. |
STATUS | enum: success, failure, info | success | No | Build status controlling the emoji prefix: success, failure, or info. |
BUILD_URL | string | "" | No | Build URL appended to the message as a link. |
Workspaces
No workspaces required. This task only makes outbound calls.
Results
| Result | Description |
|---|---|
NOTIFY_RESULT | Notification result (sent or failed) |
How it works
Calls the LINE Messaging API push endpoint with the configured LINE_CHANNEL_ACCESS_TOKEN. Prepends an emoji based on STATUS (✅ success, ❌ failure, ℹ info), then appends BUILD_URL as a clickable link if provided. Provide either LINE_USER_ID (1:1 message) or LINE_GROUP_ID (group push), not both.
Examples
Notify a user on success
steps:
- name: notify
uses: loha/notify-line@v1
with:
LINE_CHANNEL_ACCESS_TOKEN: '$(secrets.LINE_TOKEN)'
LINE_USER_ID: '$(secrets.LINE_USER_ID)'
MESSAGE: 'Build succeeded for $(context.pipelineRun.name)'
STATUS: 'success'
BUILD_URL: 'https://dashboard.loha.cloud/builds/$(context.pipelineRun.name)'
Notify a group
steps:
- name: notify-failure
uses: loha/notify-line@v1
with:
LINE_CHANNEL_ACCESS_TOKEN: '$(secrets.LINE_TOKEN)'
LINE_GROUP_ID: '$(secrets.LINE_GROUP_ID)'
MESSAGE: 'Build failed. Please check the logs.'
STATUS: 'failure'
Troubleshooting
Problem: HTTP 401 from the API.
Solution: Verify LINE_CHANNEL_ACCESS_TOKEN is a Messaging API channel access token, not a LINE Notify token (those are unrelated and being deprecated).
Problem: HTTP 400 with the property 'to' in the request body is invalid.
Solution: LINE_USER_ID must be the user's LINE internal ID (starts with U...), not their display name. The user must also have added your bot as a friend before messages can be pushed.