Skip to content

Commit 4acbc99

Browse files
authored
Create README.md
1 parent 06cbec9 commit 4acbc99

File tree

1 file changed

+19
-0
lines changed
  • Integration/RESTMessageV2/Create Email POST

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Send Email via API:
2+
3+
This is a ServiceNow script that uses the sn_ws.RESTMessageV2 API to send an email via a REST endpoint. It is configured to send an email for the "Hacktoberfest 2025" event, addressing two specific users and linking the email to an incident record in ServiceNow.
4+
5+
Prerequisites:
6+
7+
A ServiceNow instance with a REST API endpoint for sending emails (/api/now/v1/email).
8+
A valid user and password for basic authentication.
9+
The script should be executed within a ServiceNow context (e.g., in a Business Rule, Script Include, or background script).
10+
11+
Installation and Usage:
12+
13+
Navigate to your script location (e.g., a Business Rule or background script).
14+
Copy and paste the entire script into the script field.
15+
Modify the variables to match your instance and requirements:
16+
Endpoint URL: Replace instance_name.service-now.com with your actual instance name.
17+
Credentials: Provide a valid username and password for the setBasicAuth method.
18+
Recipient and Subject: Update the to array and subject in the body variable as needed.
19+
Table and Record ID: Ensure the table_name and table_record_id correspond to an existing record in your instance.

0 commit comments

Comments
 (0)