# Chatwork

> Read chats and task lists, send messages, and watch rooms for new activity.

App · 19 actions. Web page: https://docs.lodol.com/docs/integrations/chatwork

## Actions

### Create a task

Create a task in a selected Chatwork chat.

**Inputs**

- Room (`room_id`, number, required): The room id. At least 1.
- Task (`task`, text, required): What needs to be done.
- Assignees (`assignees`, list, required): Enter the Chatwork account IDs to assign.
- Due at (`due_at`, date and time): The due date and time.

**Outputs**

- `data` (object): The response from Chatwork.

**Example output**

```json
{
  "data": {
    "task_ids": [
      1
    ]
  }
}
```

### Delete a message

Delete a message in a selected Chatwork chat.

**Inputs**

- Room (`room_id`, number, required): The room id. At least 1.
- Message ID (`message_id`, text, required): The message id.

**Outputs**

- `data` (object): The response from Chatwork.

**Example output**

```json
{
  "data": {
    "message_id": "example"
  }
}
```

### Edit a message

Edit a message in a selected Chatwork chat.

**Inputs**

- Room (`room_id`, number, required): The room id. At least 1.
- Message ID (`message_id`, text, required): The message id.
- Message (`message`, text, required): The full replacement message.

**Outputs**

- `data` (object): The response from Chatwork.

**Example output**

```json
{
  "data": {
    "message_id": "example"
  }
}
```

### Get a chat

Get a chat in the selected chat.

**Inputs**

- Room (`room_id`, number, required): The room id. At least 1.

**Outputs**

- `data` (object): The response from Chatwork.

**Example output**

```json
{
  "data": {
    "last_update_time": 1,
    "name": "example",
    "room_id": 1,
    "type": "example"
  }
}
```

### Get a chat file

Get a chat file by ID.

**Inputs**

- Room (`room_id`, number, required): The room id. At least 1.
- File ID (`file_id`, number, required): The file id. At least 1.

**Outputs**

- `data` (object): The response from Chatwork.

**Example output**

```json
{
  "data": {
    "file_id": 1,
    "filename": "example",
    "filesize": 1,
    "upload_time": 1
  }
}
```

### Get a chat invite link

Get a chat invite link in the selected chat.

**Inputs**

- Room (`room_id`, number, required): The room id. At least 1.

**Outputs**

- `data` (object): The response from Chatwork.

**Example output**

```json
{
  "data": {
    "code": "example",
    "public": 1,
    "url": "example"
  }
}
```

### Get a message

Get a message by ID.

**Inputs**

- Room (`room_id`, number, required): The room id. At least 1.
- Message ID (`message_id`, text, required): The message id.

**Outputs**

- `data` (object): The response from Chatwork.

**Example output**

```json
{
  "data": {
    "account": {
      "account_id": 1,
      "avatar_image_url": "example",
      "chatwork_id": "example",
      "name": "example"
    },
    "body": "example",
    "message_id": "example",
    "send_time": 1,
    "update_time": 1
  }
}
```

### Get a task

Get a task by ID.

**Inputs**

- Room (`room_id`, number, required): The room id. At least 1.
- Task ID (`task_id`, number, required): The task id. At least 1.

**Outputs**

- `data` (object): The response from Chatwork.

**Example output**

```json
{
  "data": {
    "account": {
      "account_id": 1,
      "avatar_image_url": "example",
      "chatwork_id": "example",
      "name": "example"
    },
    "body": "example",
    "limit_time": 1,
    "status": "example",
    "task_id": 1
  }
}
```

### Get my Chatwork profile

Get my Chatwork profile for the connected account.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Chatwork.

**Example output**

```json
{
  "data": {
    "account_id": 1,
    "avatar_image_url": "example",
    "chatwork_id": "example",
    "name": "example"
  }
}
```

### Get my unread counts

Get my unread counts for the connected account.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Chatwork.

**Example output**

```json
{
  "data": {
    "mention_num": 1,
    "mytask_num": 1,
    "unread_num": 1
  }
}
```

### List chat files

List chat files in the selected chat.

**Inputs**

- Room (`room_id`, number, required): The room id. At least 1.

**Outputs**

- `data` (list): The response from Chatwork.

**Example output**

```json
{
  "data": [
    {
      "file_id": 1,
      "filename": "example",
      "filesize": 1,
      "upload_time": 1
    }
  ]
}
```

### List chat members

List chat members in the selected chat.

**Inputs**

- Room (`room_id`, number, required): The room id. At least 1.

**Outputs**

- `data` (list): The response from Chatwork.

**Example output**

```json
{
  "data": [
    {
      "account_id": 1,
      "avatar_image_url": "example",
      "chatwork_id": "example",
      "name": "example"
    }
  ]
}
```

### List chat tasks

List chat tasks in the selected chat.

**Inputs**

- Room (`room_id`, number, required): The room id. At least 1.

**Outputs**

- `data` (list): The response from Chatwork.

**Example output**

```json
{
  "data": [
    {
      "account": {
        "account_id": 1,
        "avatar_image_url": "example",
        "chatwork_id": "example",
        "name": "example"
      },
      "body": "example",
      "limit_time": 1,
      "status": "example",
      "task_id": 1
    }
  ]
}
```

### List chats

List chats for the connected account.

**Inputs**: None.

**Outputs**

- `data` (list): The response from Chatwork.

**Example output**

```json
{
  "data": [
    {
      "last_update_time": 1,
      "name": "example",
      "room_id": 1,
      "type": "example"
    }
  ]
}
```

### List contacts

List contacts for the connected account.

**Inputs**: None.

**Outputs**

- `data` (list): The response from Chatwork.

**Example output**

```json
{
  "data": [
    {
      "account_id": 1,
      "avatar_image_url": "example",
      "chatwork_id": "example",
      "name": "example"
    }
  ]
}
```

### List messages

List messages in the selected chat.

**Inputs**

- Room (`room_id`, number, required): The room id. At least 1.

**Outputs**

- `data` (list): The response from Chatwork.

**Example output**

```json
{
  "data": [
    {
      "account": {
        "account_id": 1,
        "avatar_image_url": "example",
        "chatwork_id": "example",
        "name": "example"
      },
      "body": "example",
      "message_id": "example",
      "send_time": 1,
      "update_time": 1
    }
  ]
}
```

### List my tasks

List my tasks for the connected account.

**Inputs**: None.

**Outputs**

- `data` (list): The response from Chatwork.

**Example output**

```json
{
  "data": [
    {
      "account": {
        "account_id": 1,
        "avatar_image_url": "example",
        "chatwork_id": "example",
        "name": "example"
      },
      "body": "example",
      "limit_time": 1,
      "status": "example",
      "task_id": 1
    }
  ]
}
```

### Send a message

Send a message in a selected Chatwork chat.

**Inputs**

- Room (`room_id`, number, required): The room id. At least 1.
- Message (`message`, text, required): The message to send.

**Outputs**

- `data` (object): The response from Chatwork.

**Example output**

```json
{
  "data": {
    "message_id": "example"
  }
}
```

### Set task status

Set task status in a selected Chatwork chat.

**Inputs**

- Room (`room_id`, number, required): The room id. At least 1.
- Task ID (`task_id`, number, required): The task id. At least 1.
- Status (`status`, text, required): Mark the task open or done. One of: `open`, `done`.

**Outputs**

- `data` (object): The response from Chatwork.

**Example output**

```json
{
  "data": {
    "task_id": 1
  }
}
```
