REST API send mail with attachments

Sumit25
Tera Contributor

Hello All,

I would like to send email with attachments using REST API.

Here's what's working:

  1. Adding attachment and getting its sys_id
  2. Sending email associated with specific record.

But how to send mail with attachment, Currently I don't see option to specify attachment sys_id in EMAIL API request.

This is what I have right now:

{
    "to": [
        "exammple@gmail.com"
    ],
    "subject": "API Message",
    "text": "Test Message",
    "html": "<b>Test Message</b>",
    "table_name": "incident",
    "table_record_id": "db8875d6db9a7850411893c8f4961951"

}

 

Is there any other way to achieve this, if not possible through available REST API ?

1 REPLY 1

Anil Lande
Kilo Patron

Hi,

I see no way to send attachments in email using REST API.

Please check below question they had same requirement.

https://community.servicenow.com/community?id=community_question&sys_id=f5b65ccfdb5c7b4ca39a0b55ca96...

 

Thanks,
Anil Lande

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande