Use the Log to Server action to forward the runtime and custom logs to an external SIEM server for centralized monitoring and compliance. You can add necessary headers, log levels and data source tags to custom log.
About this task
Before you begin
- Permissions to create and run API Tasks.
- Permissions to configure the SIEM server.
- Active OAuth connections to the ServiceNow instance. For more information about setting up a ServiceNow OAuth connection, see Create OAuth connection.
- A Pipedream account with a source named Logging. In the Pipedream portal, go to to create a source. When you create a source, the portal creates a custom HTTP endpoint. Use this endpoint as the SIEM server to collect the logs.
Procedure
- Log in to your Control Room.
-
Perform the following actions to add the Pipedream HTTP
endpoint as the SIEM server for logging.
-
Perform the following steps to create an API Task.
-
Perform the following steps to add and configure ServiceNow
Authentication action.
-
Perform the following steps to add and configure ServiceNow
Get Record action.
-
Perform the following steps to add and configure Log to
Server action.
- Select Save to save the automation.
Results
What to do next
{
"method": "POST",
"path": "/",
"query": {},
"client_ip": "35.155.28.36",
"url": "https://04038b46964107d148cfdd251d89c826.m.pipedream.net/",
"headers": {
"host": "04038b46964107d148cfdd251d89c826.m.pipedream.net",
"content-length": "459",
"accept-encoding": "gzip;q=1.0,deflate;q=0.6,identity;q=0.3",
"accept": "*/*",
"user-agent": "Ruby",
"content-type": "application/x-ndjson"
},
"bodyRaw": "{\"logMessage\":{\"logContent\":\"servicenow incident logs\",\"variableValues\":{\"incident_state\":\"1\",\"incident_sys_id\":\"57af7aec73d423002728660c4cf6a71c\",\"incident_short_description\":\"API call issue\"}},\"executionId\":\"b2e45a6d-186b-4b96-a2a2-3509808909f9_88f3a7ff9e646cc7\",\"logLevel\":\"INFO\",\"sysLogSource\":\"incident_record\",\"botName\":\"servicenow-logging\",\"botId\":\"45\",\"logCreatedTime\":\"2025-10-24T18:13:41.267798Z\",\"_tenantId\":\"dc170ff6-42d0-4f3d-8e9f-1904278d77f8\"}\n",
"body": {
"logMessage": {
"logContent": "servicenow incident logs",
"variableValues": {
"incident_state": "1",
"incident_sys_id": "57af7aec73d423002728660c4cf6a71c",
"incident_short_description": "API call issue"
}
},
"executionId": "b2e45a6d-186b-4b96-a2a2-3509808909f9_88f3a7ff9e646cc7",
"logLevel": "INFO",
"sysLogSource": "incident_record",
"botName": "servicenow-logging",
"botId": "45",
"logCreatedTime": "2025-10-24T18:13:41.267798Z",
"_tenantId": "dc170ff6-42d0-4f3d-8e9f-1904278d77f8"
}
}