Portal Community
Irreversible: Deleted attachments cannot be recovered via the API. Always archive the file to an external store (S3, Google Drive) before calling attachment/remove if there is any chance the file will be needed again.

When to Use

Configuration

Connection

FieldRequiredDescription
HostRequiredJira instance base URL. Example: https://acmecorp.atlassian.net
EmailRequiredAtlassian account email. Example: automation@acmecorp.com
ApiTokenRequiredAPI token from Atlassian security settings. Store in Credentials Manager.

Operation Fields

FieldRequiredDescription
AttachmentIdRequiredThe numeric Jira attachment ID to delete. Example: "10044". Verify this ID with attachment/get before deleting to confirm it targets the correct file.

Sample Configuration

{
  "resource": "attachment",
  "operation": "remove",
  "Host": "https://acmecorp.atlassian.net",
  "Email": "automation@acmecorp.com",
  "ApiToken": "{{ $credentials.jiraApiToken }}",
  "AttachmentId": "{{ $json.attachmentId }}"
}

Validation Errors

Error CodeCause
VAL_MISSING_ATTACHMENT_IDAttachmentId is empty or null.
ATTACHMENT_NOT_FOUNDNo attachment exists with the given ID, or the user lacks access.
PERMISSION_DENIEDThe authenticated user does not have delete attachment permission.
AUTH_FAILEDInvalid credentials or expired API token.

Output Fields

FieldTypeDescription
statusstring"success" or "error"
attachmentIdstringID of the deleted attachment.
deletedbooleantrue if the attachment was successfully removed from Jira storage.
resourcestringAlways "attachment"
operationstringAlways "remove"

Sample Output

{
  "status": "success",
  "attachmentId": "10044",
  "deleted": true,
  "resource": "attachment",
  "operation": "remove"
}

Expression Reference

ExpressionTypeExample ValueUse
{{ $output.removeAttachment.deleted }}booleantrueConfirm deletion before updating audit record
{{ $output.removeAttachment.attachmentId }}string"10044"Record deleted ID in the archival log

Node Policies & GuardRails

Workflow Example — Archive and Remove Old Attachments

// Step 1: issue/getAll — find closed issues older than 90 days
{
  "Jql": "project = OPS AND status = Done AND resolved <= -90d",
  "Limit": 50
}
// Step 2: Loop over issues
// Step 3 per issue: attachment/getAll
// Step 4: Loop over attachments
// Step 5 per attachment: HttpRequest — download file to S3
// Step 6: S3/putObject — archive file
// Step 7: attachment/get — verify ID before deletion
// Step 8: attachment/remove
{
  "resource": "attachment",
  "operation": "remove",
  "AttachmentId": "{{ $loopItem.attachmentId }}"
}
// Step 9: MongoDB/insert — log archival record
// Step 10: comment/add — note archival on issue