Skip to content

New-dev0/switch-post-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

New-dev0/switch-post-action@v1

This action allows you to send messages to a Switch community, group, or user using the Switch API.

Inputs

Name Description Required
token Switch's bot token Yes
message Message text to send No
document Path to file to send as document No
description Description for the document No
thumb Path to thumbnail image No
channel_id Switch channel ID (requires community_id) No
group_id Switch group ID (requires community_id) No
community_id Switch community ID No
user_id Switch user ID for direct messages No
button_text Text to display on the button No
button_url URL to open when the button is clicked No

Usage

Basic Example: Send a text message to a user

- name: Send a text message to a user
  uses: New-dev0/switch-post-action@v1
  with:
    token: ${{ secrets.SWITCH_BOT_TOKEN }}
    message: "Hello, this is a test message!"
    user_id: 1234

Send a document to a channel in a community

- name: Send a document to a channel in a community
  uses: New-dev0/switch-post-action@v1
  with:
    token: ${{ secrets.SWITCH_BOT_TOKEN }}
    message: "Hello, this is a test message!"
    document: "path/to/document.pdf"
    community_id: "123456"
    channel_id: "789012"

About

GitHub Workflow to send messages or files on Switch.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors