rocketchat.json•8.65 kB
{
"nodeType": "n8n-nodes-base.rocketchat",
"displayName": "RocketChat",
"description": "Consume RocketChat API",
"version": 1,
"properties": [
{
"name": "resource",
"displayName": "Resource",
"type": "options",
"default": "chat",
"options": [
{
"name": "Chat",
"value": "chat"
}
]
},
{
"name": "operation",
"displayName": "Operation",
"type": "options",
"default": "postMessage",
"description": "Post a message to a channel or a direct message",
"options": [
{
"name": "Post Message",
"value": "postMessage",
"description": "Post a message to a channel or a direct message"
}
],
"displayOptions": {
"show": {
"resource": [
"chat"
]
}
}
},
{
"name": "channel",
"displayName": "Channel",
"type": "string",
"default": "",
"description": "The channel name with the prefix in front of it",
"required": true,
"displayOptions": {
"show": {
"resource": [
"chat"
],
"operation": [
"postMessage"
]
}
}
},
{
"name": "text",
"displayName": "Text",
"type": "string",
"default": "",
"description": "The text of the message to send, is optional because of attachments",
"displayOptions": {
"show": {
"resource": [
"chat"
],
"operation": [
"postMessage"
]
}
}
},
{
"name": "jsonParameters",
"displayName": "JSON Parameters",
"type": "boolean",
"default": false,
"displayOptions": {
"show": {
"resource": [
"chat"
],
"operation": [
"postMessage"
]
}
}
},
{
"name": "options",
"displayName": "Options",
"type": "collection",
"default": {},
"description": "This will cause the message’s name to appear as the given alias, but your username will still display",
"placeholder": "Add option",
"options": [
{
"name": "alias",
"displayName": "Alias",
"type": "string",
"default": "",
"description": "This will cause the message’s name to appear as the given alias, but your username will still display"
},
{
"name": "avatar",
"displayName": "Avatar",
"type": "string",
"default": "",
"description": "If provided, this will make the avatar use the provided image URL"
},
{
"name": "emoji",
"displayName": "Emoji",
"type": "string",
"default": "",
"description": "This will cause the message’s name to appear as the given alias, but your username will still display"
}
],
"displayOptions": {
"show": {
"resource": [
"chat"
],
"operation": [
"postMessage"
]
}
}
},
{
"name": "attachments",
"displayName": "Attachments",
"type": "collection",
"default": {},
"description": "The color you want the order on the left side to be, any value background-css supports",
"placeholder": "Add Attachment Item",
"options": [
{
"name": "color",
"displayName": "Color",
"type": "color",
"default": "#ff0000",
"description": "The color you want the order on the left side to be, any value background-css supports"
},
{
"name": "text",
"displayName": "Text",
"type": "string",
"default": "",
"description": "The text to display for this attachment, it is different than the message’s text"
},
{
"name": "ts",
"displayName": "Timestamp",
"type": "dateTime",
"default": "",
"description": "Displays the time next to the text portion"
},
{
"name": "thumbUrl",
"displayName": "Thumb URL",
"type": "string",
"default": "",
"description": "An image that displays to the left of the text, looks better when this is relatively small"
},
{
"name": "messageLink",
"displayName": "Message Link",
"type": "string",
"default": "",
"description": "Only applicable if the timestamp is provided, as it makes the time clickable to this link"
},
{
"name": "collapsed",
"displayName": "Collapsed",
"type": "boolean",
"default": false,
"description": "Causes the image, audio, and video sections to be hiding when collapsed is true"
},
{
"name": "authorName",
"displayName": "Author Name",
"type": "string",
"default": "",
"description": "Name of the author"
},
{
"name": "authorLink",
"displayName": "Author Link",
"type": "string",
"default": "",
"description": "Providing this makes the author name clickable and points to this link"
},
{
"name": "authorIcon",
"displayName": "Author Icon",
"type": "string",
"default": "",
"description": "Displays a tiny icon to the left of the Author’s name",
"placeholder": "https://site.com/img.png"
},
{
"name": "title",
"displayName": "Title",
"type": "string",
"default": "",
"description": "Title to display for this attachment, displays under the author"
},
{
"name": "titleLink",
"displayName": "Title Link",
"type": "string",
"default": "",
"description": "Providing this makes the title clickable, pointing to this link"
},
{
"name": "titleLinkDownload",
"displayName": "Title Link Download",
"type": "boolean",
"default": false,
"description": "When this is true, a download icon appears and clicking this saves the link to file"
},
{
"name": "imageUrl",
"displayName": "Image URL",
"type": "string",
"default": "",
"description": "The image to display, will be “big” and easy to see"
},
{
"name": "audioUrl",
"displayName": "Audio URL",
"type": "string",
"default": "",
"description": "Audio file to play, only supports what html audio does",
"placeholder": "https://site.com/aud.mp3"
},
{
"name": "videoUrl",
"displayName": "Video URL",
"type": "string",
"default": "",
"description": "Video file to play, only supports what html video does",
"placeholder": "https://site.com/vid.mp4"
}
],
"typeOptions": {
"multipleValues": true
},
"displayOptions": {
"show": {
"resource": [
"chat"
],
"operation": [
"postMessage"
],
"jsonParameters": [
false
]
}
}
},
{
"name": "attachmentsJson",
"displayName": "Attachments",
"type": "json",
"default": "",
"displayOptions": {
"show": {
"resource": [
"chat"
],
"operation": [
"postMessage"
],
"jsonParameters": [
true
]
}
}
}
],
"credentialsConfig": [
{
"name": "rocketchatApi",
"required": true
},
{
"name": "resource",
"required": false
},
{
"name": "operation",
"required": false
},
{
"name": "channel",
"required": true
},
{
"name": "attachments",
"required": false
},
{
"name": "attachmentsJson",
"required": false
}
],
"io": {
"inputs": [
"Main"
],
"outputs": [
"Main"
],
"outputNames": [],
"hints": {}
},
"wiring": {
"role": "generic",
"requires": [],
"optional": [],
"consumedBy": [],
"consumes": [
"Main"
],
"produces": [
"Main"
]
}
}