AttachmentCreator

SOAP-based attachment creation without requiring target record

Last modified 2026-03-16

Jace Benson

Table of content
  1. Use Case
  2. How It Works
  3. Request Format
  4. Example
  5. REST Alternative
  6. Note

Docs

The AttachmentCreator SOAP service creates attachments via the ECC Queue. Unlike the REST Attachment API, this does not require the target record to exist beforehand.

Use Case

Attach files to records that haven't been created yet, or when you don't want to verify the target exists.

How It Works

  1. POST to ecc_queue.do?JSON (or JSONv2 on newer instances)
  2. ServiceNow processes the ECC Queue entry
  3. Attachment is created and linked to the target record

Request Format

{
  "agent": "AttachmentCreator",
  "topic": "AttachmentCreator",
  "name": "filename.ext:mime/type",
  "source": "table_name:sys_id",
  "payload": "base64_encoded_file_content"
}

Example

{
  "agent": "AttachmentCreator",
  "topic": "AttachmentCreator",
  "name": "report.pdf:application/pdf",
  "source": "incident:9c573169c611228700193229fff72400",
  "payload": "JVBERi0xLjQKJ..."
}

REST Alternative

This same SOAP service can be called via REST:

POST /ecc_queue.do?JSON&sysparm_action=insert

Note