marjory-logo

Slack

Table of Contents


Contexts

botToken

Type Description isCrypt
string The token of the bot installed on your Slack server true

url

Type Description isCrypt
string base url of slack false

Actions

Send Message

Send a message to recipients

Inputs

{
  "from": "John Doe", /*(required)*/
  "subject": "Test", /*(required)*/
  "body": "Hello World ! This is a _test_ *message*",
  "attachments": [
    {
      "marjoryFile": { /*(required)*/
        "id": "813a5aff-103b-4fa2-aa0b-ee03f960b040",
        "name": "image.png", /*(required)*/
        "contentType": "image/png",
        "link": "https://fileserver.marjory.io/files/6bcf55f7-0f05-406a-83db-e54e6cc50017", /*(required)*/
        "size": 16362,
        "lastModified": "2023-02-27T15:32:06.982Z",
      }
    }
  ]
  "headers": {
    "elem1": "value1",
    "elem2": "value2",
  }
  "recipients": [ /*(required)*/
    {
      "to": "John Doe", /*(required)*/
      "type": "user", /*user || channel - default = channel*/
    }
  ]
}

Outputs

Http Code 200
{
  "recipientsNotFound": [
    "string"
  ]
}

Make API Call

Perform a custom API call.

Inputs

{
  "method": "string", /*PUT|GET|POST|PATCH|DELETE|HEAD|OPTIONS|TRACE(required)*/
  "path": "string", /*/conversations.list?limit=10(required)*/
  "body": "string", /*can be any type you need*/
}

Outputs

Http Code 200
{
  "response": {
    "anyField": "string"
  },
  "responseCode": "number"
}

Events

Message Received

Be notified when a message is received.

Payload

{
  "from": "John Doe", /*(required)*/
  "body": "Hello World !", /*(required)*/
  "attachments": [
    {
      "marjoryFile": { /*(required)*/
        "id": "813a5aff-103b-4fa2-aa0b-ee03f960b040", /*(required)*/
        "name": "image.png", /*(required)*/
        "contentType": "image/png", /*(required)*/
        "link": "https://fileserver.marjory.io/files/6bcf55f7-0f05-406a-83db-e54e6cc50017", /*(required)*/
        "size": 16362, /*(required)*/
        "lastModified": "2023-02-27T15:32:06.982Z", /*(required)*/
      }
    }
  ]
  "headers": {
    "elem1": "value1",
  }
  "recipients": [ /*(required)*/
    {
      "to": "John Doe", /*(required)*/
      "type": "user", /*(required)*/
    }
  ]
}
Version(s)
4.2.3