|
| 1 | +--- |
| 2 | +title: Convert ITSM actions that send events to ServiceNow to secure webhook actions |
| 3 | +description: Learn how to ccnvert ITSM actions that send events to ServiceNow to secure webhook actions. |
| 4 | +ms.topic: conceptual |
| 5 | +ms.date: 09/20/2022 |
| 6 | +ms.reviewer: nolavime |
| 7 | +ms.author: abbyweisberg |
| 8 | +author: AbbyMSFT |
| 9 | + |
| 10 | +--- |
| 11 | + |
| 12 | +# Convert ITSM actions that send events to ServiceNow to secure webhook actions |
| 13 | + |
| 14 | +> [!NOTE] |
| 15 | +> As of September 2022, we are starting the 3-year process of deprecating support of using ITSM actions to send events to ServiceNow. |
| 16 | +
|
| 17 | +To migrate your ITSM connector to the new secure webhook integration, follow the [secure webhook configuration instructions](itsmc-secure-webhook-connections-servicenow.md). |
| 18 | + |
| 19 | +If you are syncing work items between ServiceNow and an Azure Log Analytics workspace (bi-directional), follow the steps below to pull data from ServiceNow into your Log Analytics workspace. |
| 20 | + |
| 21 | +## Pull data from your ServiceNow instance into a Log Analytics workspace |
| 22 | + |
| 23 | +1. [Create a logic app](../../logic-apps/quickstart-create-first-logic-app-workflow.md) in the Azure portal. |
| 24 | +1. Create an HTTP GET request that uses the [ServiceNow **Table** API](https://developer.servicenow.com/dev.do#!/reference/api/sandiego/rest/c_TableAPI) to retrieve data from the ServiceNow instance. [See an example](https://docs.servicenow.com/bundle/sandiego-application-development/page/integrate/inbound-rest/concept/use-REST-API-Explorer.html#t_GetStartedRetrieveExisting) of how to use the Table call to retrieve incidents. |
| 25 | +1. To see a list of tables in your ServiceNow instance, in ServiceNow, go to **System definitions**, then **Tables**. Example table names include: `change_request`, `em_alert`, `incident`, `em_event`. |
| 26 | + |
| 27 | + :::image type="content" source="media/itsmc-convert-servicenow-to-webhook/alerts-itsmc-service-now-tables.png" alt-text="Screenshot of the Service Now tables."::: |
| 28 | + |
| 29 | +1. In Logic Apps, add a `Parse JSON` action on the results of the GET request you created in step 2. |
| 30 | +1. Add a schema for the retrieved payload. You can use the **Use sample payload to generate schema** feature. See a sample schema for a `change_request` table. |
| 31 | + |
| 32 | + :::image type="content" source="media/itsmc-convert-servicenow-to-webhook/alerts-itsmc-service-now-parse-json.png" alt-text="Screenshot of a sample schema. "::: |
| 33 | + |
| 34 | +1. Create a [Log Analytics workspace](../logs/quick-create-workspace.md#create-the-workspace). |
| 35 | +1. Create a `for each` loop to insert each row of the data returned from the API into the data in the Log Analytics workspace. |
| 36 | + - In the **Select an output from previous steps** section, enter the data set returned by the JSON parse action you created in step 4. |
| 37 | + - Construct each row from the set that enters the loop. |
| 38 | + - In the last step of the loop, use `Send data` to send the data to the Log Analytics workspace with these values. |
| 39 | + - **Custom log name**: the name of the custom log you are using to save the data to the Log Analytics workspace. |
| 40 | + - A connection to the LA workspace that you created in step 6. |
| 41 | + |
| 42 | + :::image type="content" source="media/itsmc-convert-servicenow-to-webhook/alerts-itsmc-service-now-for-loop.png" alt-text="Screenshot showing loop that imports data into a Log Analytics workspace."::: |
| 43 | + |
| 44 | +The data is visible in the **Custom logs** section of your Log Analytics workspace. |
| 45 | + |
| 46 | +## |
| 47 | + |
| 48 | +## Next steps |
| 49 | + |
| 50 | +* [ITSM Connector overview](itsmc-overview.md) |
| 51 | +* [Create ITSM work items from Azure alerts](./itsmc-definition.md#create-itsm-work-items-from-azure-alerts) |
| 52 | +* [Troubleshooting problems in the ITSM Connector](./itsmc-resync-servicenow.md) |
0 commit comments