Copera Action
ActionsTags
(2)A GitHub Action for sending messages to Copera.ai channels using the official Copera API.
- Send custom messages to Copera.ai channels
- Seamless integration with your GitHub workflow
- Support for custom sender names
- Built on the official Copera Public API
Note on Versioning: You can use
@v2.0.0for a specific version, or@v2to automatically get the latest v2.x updates. We recommend using@v2.0.0for production stability.
name: Copera Notification
on: [push]
jobs:
notification:
runs-on: ubuntu-latest
steps:
- name: Send Copera Message
uses: copera-ai/copera-action@v2.0.0
with:
api_token: ${{ secrets.COPERA_API_TOKEN }}
channel_id: ${{ secrets.COPERA_CHANNEL_ID }}
message: "New ${{ github.event_name }} event in ${{ github.repository }}!"| Variable | Description | Required | Default |
|---|---|---|---|
api_token |
Copera API Token (Bearer token) | Yes | - |
channel_id |
Copera Channel ID (24-character ObjectId) | Yes | - |
message |
Message content to send (1-10,000 characters) | Yes | - |
sender_name |
Optional sender name to display | No | - |
debug |
Enable debug mode for detailed logging | No | false |
- name: Send Copera Notification
uses: copera-ai/copera-action@v2.0.0
with:
api_token: ${{ secrets.COPERA_API_TOKEN }}
channel_id: ${{ secrets.COPERA_CHANNEL_ID }}
message: "🎉 New deployment to production!"- name: Send Copera Notification
uses: copera-ai/copera-action@v2.0.0
with:
api_token: ${{ secrets.COPERA_API_TOKEN }}
channel_id: ${{ secrets.COPERA_CHANNEL_ID }}
message: "Build completed successfully!"
sender_name: "GitHub Actions Bot"- name: Send Copera Notification
uses: copera-ai/copera-action@v2.0.0
with:
api_token: ${{ secrets.COPERA_API_TOKEN }}
channel_id: ${{ secrets.COPERA_CHANNEL_ID }}
message: "Deployment started"
debug: "true"name: PR Notification
on:
pull_request:
types: [opened, closed]
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Notify Copera
uses: copera-ai/copera-action@v2.0.0
with:
api_token: ${{ secrets.COPERA_API_TOKEN }}
channel_id: ${{ secrets.COPERA_CHANNEL_ID }}
message: "PR #${{ github.event.pull_request.number }}: ${{ github.event.pull_request.title }}"
sender_name: "PR Bot"- Log in to your Copera.ai account
- Open Workspace Settings
- Navigate to Integrations
- Click Create new API key
- Give your integration a name
- Assign a bot name (this becomes the integration's identity in channels)
- Choose the required permissions (at minimum, enable chat permissions)
⚠️ Copy the API key immediately — it appears only once and cannot be retrieved later
📚 For a detailed walkthrough, see the Integration Creation guide.
Developer Mode allows you to copy Channel IDs easily:
- Go to Workspace Settings → Account → Advanced → Developer Mode
- Toggle Developer Mode to enable it
- Navigate to the channel where you want to send messages
- Right-click on the channel name
- Select Copy Channel ID from the context menu (similar to Discord)
- The Channel ID is a 24-character hexadecimal string (ObjectId format)
Example: 507f1f77bcf86cd799439011
- Go to your repository Settings → Secrets and variables → Actions
- Click "New repository secret"
- Add
COPERA_API_TOKENwith your API token - Add
COPERA_CHANNEL_IDwith your channel ID
This action uses the Copera Public API. Specifically, it calls the /public/v1/chat/channel/{channelId}/send-message endpoint.
For more information about the API, visit the official documentation.
❌ Error: 401 Unauthorized
- Check that your
COPERA_API_TOKENis correct - Ensure the API key hasn't been revoked
- Verify the token is properly set in GitHub Secrets
❌ Error: 403 Forbidden
- Make sure your integration has the required permissions (chat)
- Verify the integration has been added to the channel
❌ Error: 404 Not Found
- Double-check your
COPERA_CHANNEL_IDis correct - Ensure Developer Mode is enabled to copy the correct Channel ID
- Verify the channel exists and hasn't been deleted
❌ Message not appearing in channel
- Confirm the integration has been added to the target channel
- Check that the channel ID matches the intended channel
- Enable
debug: "true"to see detailed logs
To get more detailed information about requests and responses:
- uses: copera-ai/copera-action@v2.0.0
with:
api_token: ${{ secrets.COPERA_API_TOKEN }}
channel_id: ${{ secrets.COPERA_CHANNEL_ID }}
message: "Test message"
debug: "true" # Enable detailed loggingThis project is licensed under the MIT License - see the LICENSE file for details.
- 📧 Email: support@copera.ai
- 🐛 Issues: GitHub Issues
- 📖 Documentation: developers.copera.ai
Made with ❤️ by the Copera.ai team
Copera Action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.