> 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.drafts.UpdateDraft

- Component: `appmixer.front.drafts.UpdateDraft`
- 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.drafts.UpdateDraft>

Update an existing message draft. This allows you to modify draft messages before sending them.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Draft Message ID (`draftId`) | text | The ID of the draft to update |
| Channel ID (`channelId`) | text | ID of the channel from which the draft will be sent. Alternatively, you can supply the channel address as a resource alias |
| Version (`version`) | text | Version of the draft |
| Body (`body`) | textarea | The body of the draft message (plain text or HTML) |
| To (Recipients) (`to`) | text | Comma-separated list of recipient email addresses |
| Author ID (`authorId`) | text | The teammate ID of the message author |
| Subject (`subject`) | text | The subject line of the message |
| CC (`cc`) | text | Comma-separated list of CC email addresses |
| BCC (`bcc`) | text | Comma-separated list of BCC email addresses |

## Output ports

### Port `out`

_No fields defined for this port._

## Full metadata (component.json)

```json
{
  "name": "appmixer.front.drafts.UpdateDraft",
  "description": "Update an existing message draft. This allows you to modify draft messages before sending them.",
  "author": "Appmixer <info@appmixer.com>",
  "version": "1.0.0",
  "auth": {
    "service": "appmixer:front"
  },
  "quota": {
    "manager": "appmixer:front",
    "resources": "requests"
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "draftId": {
            "type": "string"
          },
          "channelId": {
            "type": "string"
          },
          "to": {
            "type": "string"
          },
          "authorId": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "cc": {
            "type": "string"
          },
          "bcc": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "draftId",
          "channelId",
          "version"
        ]
      },
      "inspector": {
        "inputs": {
          "draftId": {
            "type": "text",
            "label": "Draft Message ID",
            "index": 0,
            "tooltip": "The ID of the draft to update"
          },
          "channelId": {
            "type": "text",
            "label": "Channel ID",
            "index": 1,
            "tooltip": "ID of the channel from which the draft will be sent. Alternatively, you can supply the channel address as a resource alias"
          },
          "version": {
            "type": "text",
            "label": "Version",
            "index": 2,
            "tooltip": "Version of the draft"
          },
          "body": {
            "type": "textarea",
            "label": "Body",
            "index": 3,
            "tooltip": "The body of the draft message (plain text or HTML)"
          },
          "to": {
            "type": "text",
            "label": "To (Recipients)",
            "index": 4,
            "tooltip": "Comma-separated list of recipient email addresses"
          },
          "authorId": {
            "type": "text",
            "label": "Author ID",
            "index": 5,
            "tooltip": "The teammate ID of the message author",
            "source": {
              "url": "/component/appmixer/front/teammates/ListTeammates?outPort=out",
              "data": {
                "message": {
                  "in/outputType": "array"
                },
                "properties": {
                  "isSource": true
                },
                "transform": "./ListTeammates#toSelectArray"
              }
            }
          },
          "subject": {
            "type": "text",
            "label": "Subject",
            "index": 6,
            "tooltip": "The subject line of the message"
          },
          "cc": {
            "type": "text",
            "label": "CC",
            "index": 7,
            "tooltip": "Comma-separated list of CC email addresses"
          },
          "bcc": {
            "type": "text",
            "label": "BCC",
            "index": 8,
            "tooltip": "Comma-separated list of BCC email addresses"
          }
        }
      }
    }
  ],
  "outPorts": [
    "out"
  ],
  "icon": "(data URI omitted)"
}
```
