> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# appmixer.front.comments.CreateComment

- Component: `appmixer.front.comments.CreateComment`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.front 1.1.1](https://connectors.appmixer.com/connector/appmixer.front/1.1.1.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.front/1.1.1/component/appmixer.front.comments.CreateComment>

Add a comment to a conversation. Comments are internal notes that are not visible to customers.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Conversation ID (`conversationId`) | text | The unique identifier of the conversation |
| Comment Body (`body`) | textarea | The content of the comment |
| Author ID (`authorId`) | text | The ID of the teammate who is creating the comment |
| Pin Comment (`isPinned`) | toggle | Whether to pin this comment to the top of the conversation |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| Comment ID (`id`) | string | - |
| Body (`body`) | string | - |
| Posted At (`posted_at`) | number | - |
| Is Pinned (`is_pinned`) | boolean | - |
| Attachments (`attachments`) | array | - |
| Links (`_links`) | object | - |
| Links Self (`_links.self`) | string | - |
| Links Related (`_links.related`) | object | - |
| Links Related Conversation (`_links.related.conversation`) | string | - |
| Links Related Mentions (`_links.related.mentions`) | string | - |
| Author (`author`) | object | - |
| Author ID (`author.id`) | string | - |
| Author Email (`author.email`) | string | - |
| Author Username (`author.username`) | string | - |
| Author First Name (`author.first_name`) | string | - |
| Author Last Name (`author.last_name`) | string | - |
| Author Is Admin (`author.is_admin`) | boolean | - |
| Author Is Available (`author.is_available`) | boolean | - |
| Author Is Blocked (`author.is_blocked`) | boolean | - |
| Author Type (`author.type`) | string | - |
| Author Custom Fields (`author.custom_fields`) | object | - |
| Author Links (`author._links`) | object | - |
| Author Links Self (`author._links.self`) | string | - |
| Author Links Related (`author._links.related`) | object | - |
| Author Links Related Inboxes (`author._links.related.inboxes`) | string | - |
| Author Links Related Conversations (`author._links.related.conversations`) | string | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.front.comments.CreateComment",
  "author": "Appmixer <info@appmixer.com>",
  "description": "Add a comment to a conversation. Comments are internal notes that are not visible to customers.",
  "version": "1.0.0",
  "auth": {
    "service": "appmixer:front"
  },
  "quota": {
    "manager": "appmixer:front",
    "resources": "requests"
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "conversationId": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "authorId": {
            "type": "string"
          },
          "isPinned": {
            "type": "boolean"
          }
        },
        "required": [
          "conversationId",
          "body"
        ]
      },
      "inspector": {
        "inputs": {
          "conversationId": {
            "type": "text",
            "label": "Conversation ID",
            "index": 1,
            "tooltip": "The unique identifier of the conversation"
          },
          "body": {
            "type": "textarea",
            "label": "Comment Body",
            "index": 2,
            "tooltip": "The content of the comment"
          },
          "authorId": {
            "type": "text",
            "label": "Author ID",
            "index": 3,
            "tooltip": "The ID of the teammate who is creating the comment",
            "source": {
              "url": "/component/appmixer/front/teammates/ListTeammates?outPort=out",
              "data": {
                "message": {
                  "in/outputType": "array"
                },
                "properties": {
                  "isSource": true
                },
                "transform": "./ListTeammates#toSelectArray"
              }
            }
          },
          "isPinned": {
            "type": "toggle",
            "label": "Pin Comment",
            "index": 4,
            "defaultValue": false,
            "tooltip": "Whether to pin this comment to the top of the conversation"
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "options": [
        {
          "label": "Comment ID",
          "value": "id",
          "schema": {
            "type": "string",
            "example": "com_1ywg3f2"
          }
        },
        {
          "label": "Body",
          "value": "body",
          "schema": {
            "type": "string",
            "example": "Can you confirm the refund was processed before we reply?"
          }
        },
        {
          "label": "Posted At",
          "value": "posted_at",
          "schema": {
            "type": "number",
            "example": 1717430400.378
          }
        },
        {
          "label": "Is Pinned",
          "value": "is_pinned",
          "schema": {
            "type": "boolean",
            "example": false
          }
        },
        {
          "label": "Attachments",
          "value": "attachments",
          "schema": {
            "type": "array",
            "example": [
              {
                "id": "fil_3q8a7mby",
                "filename": "refund-receipt.pdf",
                "url": "https://api2.frontapp.com/download/fil_3q8a7mby",
                "content_type": "application/pdf",
                "size": 48213,
                "metadata": {
                  "is_inline": false
                }
              }
            ]
          }
        },
        {
          "label": "Links",
          "value": "_links",
          "schema": {
            "type": "object",
            "example": {
              "self": "https://api2.frontapp.com/comments/com_1ywg3f2",
              "related": {
                "conversation": "https://api2.frontapp.com/conversations/cnv_y4xb93i",
                "mentions": "https://api2.frontapp.com/comments/com_1ywg3f2/mentions"
              }
            }
          }
        },
        {
          "label": "Links Self",
          "value": "_links.self",
          "schema": {
            "type": "string",
            "example": "https://api2.frontapp.com/comments/com_1ywg3f2"
          }
        },
        {
          "label": "Links Related",
          "value": "_links.related",
          "schema": {
            "type": "object",
            "example": {
              "conversation": "https://api2.frontapp.com/conversations/cnv_y4xb93i",
              "mentions": "https://api2.frontapp.com/comments/com_1ywg3f2/mentions"
            }
          }
        },
        {
          "label": "Links Related Conversation",
          "value": "_links.related.conversation",
          "schema": {
            "type": "string",
            "example": "https://api2.frontapp.com/conversations/cnv_y4xb93i"
          }
        },
        {
          "label": "Links Related Mentions",
          "value": "_links.related.mentions",
          "schema": {
            "type": "string",
            "example": "https://api2.frontapp.com/comments/com_1ywg3f2/mentions"
          }
        },
        {
          "label": "Author",
          "value": "author",
          "schema": {
            "type": "object",
            "example": {
              "_links": {
                "self": "https://api2.frontapp.com/teammates/tea_6r55a",
                "related": {
                  "inboxes": "https://api2.frontapp.com/teammates/tea_6r55a/inboxes",
                  "conversations": "https://api2.frontapp.com/teammates/tea_6r55a/conversations"
                }
              },
              "id": "tea_6r55a",
              "email": "michael.scott@example.com",
              "username": "mscott",
              "first_name": "Michael",
              "last_name": "Scott",
              "is_admin": true,
              "is_available": false,
              "is_blocked": false,
              "type": "user",
              "custom_fields": {}
            }
          }
        },
        {
          "label": "Author ID",
          "value": "author.id",
          "schema": {
            "type": "string",
            "example": "tea_6r55a"
          }
        },
        {
          "label": "Author Email",
          "value": "author.email",
          "schema": {
            "type": "string",
            "example": "michael.scott@example.com"
          }
        },
        {
          "label": "Author Username",
          "value": "author.username",
          "schema": {
            "type": "string",
            "example": "mscott"
          }
        },
        {
          "label": "Author First Name",
          "value": "author.first_name",
          "schema": {
            "type": "string",
            "example": "Michael"
          }
        },
        {
          "label": "Author Last Name",
          "value": "author.last_name",
          "schema": {
            "type": "string",
            "example": "Scott"
          }
        },
        {
          "label": "Author Is Admin",
          "value": "author.is_admin",
          "schema": {
            "type": "boolean",
            "example": true
          }
        },
        {
          "label": "Author Is Available",
          "value": "author.is_available",
          "schema": {
            "type": "boolean",
            "example": false
          }
        },
        {
          "label": "Author Is Blocked",
          "value": "author.is_blocked",
          "schema": {
            "type": "boolean",
            "example": false
          }
        },
        {
          "label": "Author Type",
          "value": "author.type",
          "schema": {
            "type": "string",
            "example": "user"
          }
        },
        {
          "label": "Author Custom Fields",
          "value": "author.custom_fields",
          "schema": {
            "type": "object",
            "example": {}
          }
        },
        {
          "label": "Author Links",
          "value": "author._links",
          "schema": {
            "type": "object",
            "example": {
              "self": "https://api2.frontapp.com/teammates/tea_6r55a",
              "related": {
                "inboxes": "https://api2.frontapp.com/teammates/tea_6r55a/inboxes",
                "conversations": "https://api2.frontapp.com/teammates/tea_6r55a/conversations"
              }
            }
          }
        },
        {
          "label": "Author Links Self",
          "value": "author._links.self",
          "schema": {
            "type": "string",
            "example": "https://api2.frontapp.com/teammates/tea_6r55a"
          }
        },
        {
          "label": "Author Links Related",
          "value": "author._links.related",
          "schema": {
            "type": "object",
            "example": {
              "inboxes": "https://api2.frontapp.com/teammates/tea_6r55a/inboxes",
              "conversations": "https://api2.frontapp.com/teammates/tea_6r55a/conversations"
            }
          }
        },
        {
          "label": "Author Links Related Inboxes",
          "value": "author._links.related.inboxes",
          "schema": {
            "type": "string",
            "example": "https://api2.frontapp.com/teammates/tea_6r55a/inboxes"
          }
        },
        {
          "label": "Author Links Related Conversations",
          "value": "author._links.related.conversations",
          "schema": {
            "type": "string",
            "example": "https://api2.frontapp.com/teammates/tea_6r55a/conversations"
          }
        }
      ]
    }
  ],
  "icon": "(data URI omitted)"
}
```
