I have a few data which i have stored in Oracle Database. Now i need to update the data from Database table to ServiceNow by using API in UiPath Studio.
Please help me how to make the workflow for this requirement.
<!-- Prepare Data for API -->
<Assign activity here to create/update data to be sent to ServiceNow in "requestBody" variable -->
<!-- Send Request to ServiceNow API -->
<HTTP Request>
<RequestUrl>ServiceNow API endpoint URL</RequestUrl>
<RequestMethod>PUT</RequestMethod>
<RequestHeaders>
<!-- Add necessary headers, e.g., Authorization header -->
</RequestHeaders>
<RequestBody>requestBody</RequestBody>
<ContentType>application/json</ContentType>
<ResponseStatusCode>responseStatusCode</ResponseStatusCode>
<ResponseBody>responseBody</ResponseBody>
</HTTP Request>
<!-- Handle API Response -->
<Assign>
<!-- Parse and handle the API response, e.g., check for success or error -->
</Assign>
<!-- Error Handling (Try Catch) -->
<TryCatch>
<Try>
<!-- Main workflow activities -->
</Try>
<Catch>
<!-- Handle errors, log or perform error-handling tasks -->
</Catch>
</TryCatch>
<!-- Logging and Reporting (Log Message) -->
<LogMessage Text="Update to ServiceNow completed with response: responseStatusCode" />
<!-- Cleanup and Close -->
<Disconnect activity here to close the database connection if needed -->