top of page
Search

Creating ServiceNow incidents by reading emails using the EWS (Exchange Web Services) API

  • Writer: ARUN .N.K
    ARUN .N.K
  • Dec 28, 2022
  • 1 min read

Updated: Feb 25, 2023


ree
ree

Creating ServiceNow incidents by reading emails using the EWS (Exchange Web Services) API. Bot run the PowerShell script that connects to an Exchange server using the Exchange Web Services (EWS) API and read the contents of the email and such as sender, recipient, subject, and body etc and insert value to a database table. the bot read those mail data from database and create incident through servicenow incident API and API response such as incident number, incident sys id , incident created date, short description will be inserted to a database table then bot will append incident number to a mail subject and attach the mail to the respective incident in servicenow. YouTube Link :: https://youtu.be/J7FbXQJ4C0M



bot run the PowerShell script that connects to an Exchange server using the Exchange Web Services (EWS) API and performs the following tasks:

1. Imports the required Exchange Web Services (EWS) module.

2. Connects to the Exchange server using OAuth credentials.

3. Specifies which folder in the mailbox EWS should connect to.

4. Searches for the specified subfolder within the Inbox folder and retrieves its ID.

5. Searches for items within the specified folder and returns their subject, body, sender, recipients, and received date.

6. Updates the retrieved email items by adding a specified category to them, updating their subject, and setting their priority.

7. Connects to a SQL database and inserts the email's subject, sender, recipients, and body into it.

ree

ree







 
 
 

Comments


Bots-Hub

  • Linkedin
  • PCpXdqvUWfCW1mXhH1Y_98yBpgsWxuTSTofy3NGMo9yBTATDyzVkqU580bfSln50bFU
  • Instagram
  • Facebook
bottom of page