ByteChef LogoByteChef

Rocket.Chat

Rocket.Chat is a communication platform that enables team collaboration through messaging, audio/video calls, and integrations, all customizable and self-hostable.

Categories: Communication

Type: rocketchat/v1


Connections

Version: 1

custom

Properties

NameLabelTypeDescriptionRequired
domainDomainSTRINGtrue
X-Auth-TokenAuth TokenSTRINGtrue
X-User-IdUser IDSTRINGtrue

Connection Setup

  1. Navigate to your dashboard.
  2. Go to your account and click on Profile.
  3. Click on Personal Access Tokens.
  4. Enter the token name and click Add.
  5. Copy the token and user Id and use it in ByteChef.

Actions

Send Direct Message

Name: sendDirectMessage

Send messages to users on your workspace.

Properties

NameLabelTypeDescriptionRequired
roomIdUsernameSTRINGUsername to send the direct message to.true
textMessageSTRINGThe message to send.true

Example JSON Structure

{
  "label" : "Send Direct Message",
  "name" : "sendDirectMessage",
  "parameters" : {
    "roomId" : "",
    "text" : ""
  },
  "type" : "rocketchat/v1/sendDirectMessage"
}

Output

Type: OBJECT

Properties

NameTypeDescription
tsINTEGER
channelSTRING
messageOBJECT
Properties {STRING(alias), STRING(msg), [](attachments), BOOLEAN(parseUrls), BOOLEAN(groupable), STRING(ts), {STRING(_id), STRING(username), STRING(name)}(u), STRING(rid), STRING(_id), STRING(_updateAt), [](urls), [](mentions), [](channels), [](md)}
successBOOLEAN
Options true, false

Output Example

{
  "ts" : 1,
  "channel" : "",
  "message" : {
    "alias" : "",
    "msg" : "",
    "attachments" : [ ],
    "parseUrls" : false,
    "groupable" : false,
    "ts" : "",
    "u" : {
      "_id" : "",
      "username" : "",
      "name" : ""
    },
    "rid" : "",
    "_id" : "",
    "_updateAt" : "",
    "urls" : [ ],
    "mentions" : [ ],
    "channels" : [ ],
    "md" : [ ]
  },
  "success" : false
}

Send Channel Message

Name: sendChannelMessage

Send messages to channel on your workspace.

Properties

NameLabelTypeDescriptionRequired
roomIdChannel NameSTRINGChannel name to send the message to. Must have the # prefix.true
textMessageSTRINGThe message to send.true

Example JSON Structure

{
  "label" : "Send Channel Message",
  "name" : "sendChannelMessage",
  "parameters" : {
    "roomId" : "",
    "text" : ""
  },
  "type" : "rocketchat/v1/sendChannelMessage"
}

Output

Type: OBJECT

Properties

NameTypeDescription
tsINTEGER
channelSTRING
messageOBJECT
Properties {STRING(alias), STRING(msg), [](attachments), BOOLEAN(parseUrls), BOOLEAN(groupable), STRING(ts), {STRING(_id), STRING(username), STRING(name)}(u), STRING(rid), STRING(_id), STRING(_updateAt), [](urls), [](mentions), [](channels), [](md)}
successBOOLEAN
Options true, false

Output Example

{
  "ts" : 1,
  "channel" : "",
  "message" : {
    "alias" : "",
    "msg" : "",
    "attachments" : [ ],
    "parseUrls" : false,
    "groupable" : false,
    "ts" : "",
    "u" : {
      "_id" : "",
      "username" : "",
      "name" : ""
    },
    "rid" : "",
    "_id" : "",
    "_updateAt" : "",
    "urls" : [ ],
    "mentions" : [ ],
    "channels" : [ ],
    "md" : [ ]
  },
  "success" : false
}

Create Channel

Name: createChannel

Create a public channel.

Properties

NameLabelTypeDescriptionRequired
nameChannel NameSTRINGThe name of the channel.true
membersMembersARRAY
Items [STRING]
An array of the users to be added to the channel when it is created.false
readOnlyRead OnlyBOOLEAN
Options true, false
Whether the channel is read only.false
excludeSelfExclude SelfBOOLEAN
Options true, false
If set to true, the user calling the endpoint is not automatically added as a member of the channel.false

Example JSON Structure

{
  "label" : "Create Channel",
  "name" : "createChannel",
  "parameters" : {
    "name" : "",
    "members" : [ "" ],
    "readOnly" : false,
    "excludeSelf" : false
  },
  "type" : "rocketchat/v1/createChannel"
}

Output

Type: OBJECT

Properties

NameTypeDescription
channelOBJECT
Properties {STRING(_id), STRING(fname), STRING(_updateAt), {}(customFields), STRING(name), STRING(t), INTEGER(msgs), INTEGER(usersCount), {STRING(_id), STRING(username), STRING(name)}(u), STRING(ts), BOOLEAN(ro), BOOLEAN(default), BOOLEAN(sysMes)}
successBOOLEAN
Options true, false

Output Example

{
  "channel" : {
    "_id" : "",
    "fname" : "",
    "_updateAt" : "",
    "customFields" : { },
    "name" : "",
    "t" : "",
    "msgs" : 1,
    "usersCount" : 1,
    "u" : {
      "_id" : "",
      "username" : "",
      "name" : ""
    },
    "ts" : "",
    "ro" : false,
    "default" : false,
    "sysMes" : false
  },
  "success" : false
}

Triggers

New Message

Name: newMessage

Trigger off whenever a new message is posted to any public channel, private group or direct messages.

Type: DYNAMIC_WEBHOOK

Output

The output for this action is dynamic and may vary depending on the input parameters. To determine the exact structure of the output, you need to execute the action.

JSON Example

{
  "label" : "New Message",
  "name" : "newMessage",
  "type" : "rocketchat/v1/newMessage"
}

What to do if your action is not listed here?

If this component doesn't have the action you need, you can use Custom Action to create your own. Custom Actions empower you to define HTTP requests tailored to your specific requirements, allowing for greater flexibility in integrating with external services or APIs.

To create a Custom Action, simply specify the desired HTTP method, path, and any necessary parameters. This way, you can extend the functionality of your component beyond the predefined actions, ensuring that you can meet all your integration needs effectively.

How is this guide?

Last updated on

On this page