08-12-2021 14:46 PM
In this video we are going to continue on from our previous implementation of building a Service Now chat bot using Power Virtual Agents. Last time we created incident tickets and today we are going to learn how we can retrieve the status of those tickets. To help with this task we are going to leverage Power Automate (Microsoft Flow) and Microsoft Graph to do the heavy lifting for us.
References in video:
002 - Connecting Power Virtual Agents to ServiceNow using Power Automate
https://www.youtube.com/watch?v=8FoLOI7Pz-Q&list=PLmqRsTshEmekFt8GWG9DZ6dIc72dpZ9en
watch?v=ggUtWgDdADc
Which query do I need to use to update the record in servicenow? When I enter the incident number it is not found, because it looks for the SysID of the incident.
Thanks
Return error:
glide_session_store = 4B1D11BF1BBDFC105985C806624BCBD1; Max-Age = 1800; Expira = quinta-feira, 12 de agosto de 2021, 22:15:49 GMT; Caminho = /; HttpOnly; SameSite = Nenhum; Seguro, BIGipServerpool_tkshelptest = 2726779402.46654.0000; caminho = /; Httponly; Seguro; SameSite = Nenhum; Seguro "," Strict-Transport-Security ":" max-age = 63072000; includeSubDomains "," Timing-Allow-Origin ":" * "," x-ms-apihub-cached-response ":" false "," Date ":" Thu, 12 Aug 2021 21:45:49 GMT "," Content-Type ":" application / json "," Expires ":" 0 "," Content-Length ":" 158 "}," body ": {" error ": {" detail ":" O registro não existe ou ACL restringe a recuperação de registro "," mensagem ":" Nenhum registro encontrado "}," status ":" falha "}} Max-Age = 1800; Expira = quinta-feira, 12 de agosto de 2021, 22:15:49 GMT; Caminho = /; HttpOnly; SameSite = Nenhum; Seguro, BIGipServerpool_tkshelptest = 2726779402.46654.0000; caminho = /; Httponly; Seguro; SameSite = Nenhum; Seguro "," Strict-Transport-Security ":" max-age = 63072000; includeSubDomains "," Timing-Allow-Origin ":" * "," x-ms-apihub-cached-response ":" false "," Date ":" Thu, 12 Aug 2021 21:45:49 GMT "," Content-Type ":" application / json "," Expires ":" 0 "," Content-Length ":" 158 "}," body ": {" error ": {" detail ":" O registro não existe ou ACL restringe a recuperação de registro "," mensagem ":" Nenhum registro encontrado "}," status ":" falha "}} Max-Age = 1800; Expira = quinta-feira, 12 de agosto de 2021, 22:15:49 GMT; Caminho = /; HttpOnly; SameSite = Nenhum; Seguro, BIGipServerpool_tkshelptest = 2726779402.46654.0000; caminho = /; Httponly; Seguro; SameSite = Nenhum; Seguro "," Strict-Transport-Security ":" max-age = 63072000; includeSubDomains "," Timing-Allow-Origin ":" * "," x-ms-apihub-cached-response ":" false "," Date ":" Thu, 12 Aug 2021 21:45:49 GMT "," Content-Type ":" application / json "," Expires ":" 0 "," Content-Length ":" 158 "}," body ": {" error ": {" detail ":" O registro não existe ou ACL restringe a recuperação de registro "," mensagem ":" Nenhum registro encontrado "}," status ":" falha "}} HttpOnly; SameSite = Nenhum; Seguro, BIGipServerpool_tkshelptest = 2726779402.46654.0000; caminho = /; Httponly; Seguro; SameSite = Nenhum; Seguro "," Strict-Transport-Security ":" max-age = 63072000; includeSubDomains "," Timing-Allow-Origin ":" * "," x-ms-apihub-cached-response ":" false "," Date ":" Thu, 12 Aug 2021 21:45:49 GMT "," Content-Type ":" application / json "," Expires ":" 0 "," Content-Length ":" 158 "}," body ": {" error ": {" detail ":" O registro não existe ou ACL restringe a recuperação de registro "," mensagem ":" Nenhum registro encontrado "}," status ":" falha "}} HttpOnly; SameSite = Nenhum; Seguro, BIGipServerpool_tkshelptest = 2726779402.46654.0000; caminho = /; Httponly; Seguro; SameSite = Nenhum; Seguro "," Strict-Transport-Security ":" max-age = 63072000; includeSubDomains "," Timing-Allow-Origin ":" * "," x-ms-apihub-cached-response ":" false "," Date ":" Thu, 12 Aug 2021 21:45:49 GMT "," Content-Type ":" application / json "," Expires ":" 0 "," Content-Length ":" 158 "}," body ": {" error ": {" detail ":" O registro não existe ou ACL restringe a recuperação de registro "," mensagem ":" Nenhum registro encontrado "}," status ":" falha "}} SameSite = Nenhum; Seguro "," Strict-Transport-Security ":" max-age = 63072000; includeSubDomains "," Timing-Allow-Origin ":" * "," x-ms-apihub-cached-response ":" false "," Date ":" Thu, 12 Aug 2021 21:45:49 GMT "," Content-Type ":" application / json "," Expires ":" 0 "," Content-Length ":" 158 "}," body ": {" error ": {" detail ":" O registro não existe ou ACL restringe a recuperação do registro "," mensagem ":" Nenhum registro encontrado "}," status ":" falha "}} SameSite = Nenhum; Seguro "," Strict-Transport-Security ":" max-age = 63072000; includeSubDomains "," Timing-Allow-Origin ":" * "," x-ms-apihub-cached-response ":" false "," Date ":" Thu, 12 Aug 2021 21:45:49 GMT "," Content-Type ":" application / json "," Expires ":" 0 "," Content-Length ":" 158 "}," body ": {" error ": {" detail ":" O registro não existe ou ACL restringe a recuperação de registro "," mensagem ":" Nenhum registro encontrado "}," status ":" falha "}}
The sysid should get returned when you create the record. You can then use that in your update action
But in this case, my flow will not generate a new record, I want to change a record that already exists in Servicenow. So I don't have the SysID inside the flow to use, I need to get it from ServiceNow from an already created "INC" incident number
Ok you can then query for this Using List Records action and then filter on the INC number. See this part of video: https://youtu.be/8FoLOI7Pz-Q?t=1042
It isn't exact scenario but similarly. List the records on incident table. See what the internal name of the ticket number is (i think it is number) and then use it in a List Records action to retrieve the record.
Yes, I performed a test by initially getting the record by incident number having the SysID in the stream, but when processing the Change Record connector an error occurs, as evidenced below:
Get Registered
glide_session_store = 02A77DF31B3530505985C806624BCB56; Max-Age = 1800; Expira = Sex, 13-Ago-2021 00:11:47 GMT; Caminho = /; HttpOnly; SameSite = Nenhum; Seguro, BIGipServerpool_tkshelptest = 2726779402.46654.0000; caminho = /; Httponly; Seguro; SameSite = Nenhum; Seguro "," Strict-Transport-Security ":" max-age = 63072000; includeSubDomains "," Timing-Allow-Origin ":" * "," x-ms-apihub-cached-response ":" true "," Date ":" Thu, 12 Aug 2021 23:41:47 GMT "," Content-Type ":" application / json "," Expires ":" 0 "," Content-Length ":" 4695 "}," body ": {" result ": [{" Promot_by ":" "," parent ":" "," u_computer_name ":" "," u_time_worked ":" "," u_iswaitingacknowledge ":
update registration:
Error:
ActionFailed. An action failed. No dependent action was successful.
glide_session_store = 92A739331BB170502EDF99F91D4BCBBE; Max-Age = 1800; Expira = Sex, 13-Ago-2021 00:11:48 GMT; Caminho = /; HttpOnly; SameSite = Nenhum; Seguro, BIGipServerpool_tkshelptest = 528767498.46910.0000; caminho = /; Httponly; Seguro; SameSite = Nenhum; Seguro "," Strict-Transport-Security ":" max-age = 63072000; includeSubDomains "," Timing-Allow-Origin ":" * "," x-ms-apihub-cached-response ":" true "," Date ":" Thu, 12 Aug 2021 23:41:49 GMT "," Content-Type ":" application / json "," Expires ":" 0 "," Content-Length ":" 156 "}," body ": {" error ": {" message ":" Falha na operação "," detalhe ":" Falha na atualização da exceção ACL devido a restrições de segurança "}," status ":" falha "}} Max-Age = 1800; Expira = Sex, 13-Ago-2021 00:11:48 GMT; Caminho = /; HttpOnly; SameSite = Nenhum; Seguro, BIGipServerpool_tkshelptest = 528767498.46910.0000; caminho = /; Httponly; Seguro; SameSite = Nenhum; Seguro "," Strict-Transport-Security ":" max-age = 63072000; includeSubDomains "," Timing-Allow-Origin ":" * "," x-ms-apihub-cached-response ":" true "," Date ":" Thu, 12 Aug 2021 23:41:49 GMT "," Content-Type ":" application / json "," Expires ":" 0 "," Content-Length ":" 156 "}," body ": {" error ": {" message ":" Falha na operação "," detalhe ":" Falha na atualização da exceção ACL devido a restrições de segurança "}," status ":" falha "}} Max-Age = 1800; Expira = Sex, 13-Ago-2021 00:11:48 GMT; Caminho = /; HttpOnly; SameSite = Nenhum; Seguro, BIGipServerpool_tkshelptest = 528767498.46910.0000; caminho = /; Httponly; Seguro; SameSite = Nenhum; Seguro "," Strict-Transport-Security ":" max-age = 63072000; includeSubDomains "," Timing-Allow-Origin ":" * "," x-ms-apihub-cached-response ":" true "," Date ":" Thu, 12 Aug 2021 23:41:49 GMT "," Content-Type ":" application / json "," Expires ":" 0 "," Content-Length ":" 156 "}," body ": {" error ": {" message ":" Falha na operação "," detalhe ":" Falha na atualização da exceção ACL devido a restrições de segurança "}," status ":" falha "}} SameSite = Nenhum; Seguro, BIGipServerpool_tkshelptest = 528767498.46910.0000; caminho = /; Httponly; Seguro; SameSite = Nenhum; Seguro "," Strict-Transport-Security ":" max-age = 63072000; includeSubDomains "," Timing-Allow-Origin ":" * "," x-ms-apihub-cached-response ":" true "," Date ":" Thu, 12 Aug 2021 23:41:49 GMT "," Content-Type ":" application / json "," Expires ":" 0 "," Content-Length ":" 156 "}," body ": {" error ": {" message ":" Falha na operação "," detalhe ":" Falha na atualização da exceção ACL devido a restrições de segurança "}," status ":" falha "}} SameSite = Nenhum; Seguro, BIGipServerpool_tkshelptest = 528767498.46910.0000; caminho = /; Httponly; Seguro; SameSite = Nenhum; Seguro "," Strict-Transport-Security ":" max-age = 63072000; includeSubDomains "," Timing-Allow-Origin ":" * "," x-ms-apihub-cached-response ":" true "," Date ":" Thu, 12 Aug 2021 23:41:49 GMT "," Content-Type ":" application / json "," Expires ":" 0 "," Content-Length ":" 156 "}," body ": {" error ": {" message ":" Falha na operação "," detalhe ":" Falha na atualização da exceção ACL devido a restrições de segurança "}," status ":" falha "}} Strict-Transport-Security ":" max-age = 63072000; includeSubDomains "," Timing-Allow-Origin ":" * "," x-ms-apihub-cached-response ":" true "," Date ":" Thu, 12 Aug 2021 23:41:49 GMT "," Content-Type ":" application / json "," Expires ":" 0 "," Content-Length ":" 156 "}," body ": {" error ": {" message ":" Falha na operação "," detalhe ":" Falha na atualização da exceção ACL devido a restrições de segurança "}," status ":" falha "}} Strict-Transport-Security ":" max-age = 63072000; includeSubDomains "," Timing-Allow-Origin ":" * "," x-ms-apihub-cached-response ":" true "," Date ":" Thu, 12 Aug 2021 23:41:49 GMT "," Content-Type ":" application / json "," Expires ":" 0 "," Content-Length ":" 156 "}," body ": {" error ": {" message ":" Falha na operação "," detalhe ":" Falha na atualização da exceção ACL devido a restrições de segurança "}," status ":" falha "}}
I tried to do the process by getting the record with the "INC" number, but when passing the obtained SysId to the Update Registry function the error message occurs:
ActionFailed. An action failed. No dependent action was successful.
Forbidden
glide_session_store = 92A739331BB170502EDF99F91D4BCBBE; Max-Age = 1800; Expira = Sex, 13-Ago-2021 00:11:48 GMT; Caminho = /; HttpOnly; SameSite = Nenhum; Seguro, BIGipServerpool_tkshelptest = 528767498.46910.0000; caminho = /; Httponly; Seguro; SameSite = Nenhum; Seguro "," Strict-Transport-Security ":" max-age = 63072000; includeSubDomains "," Timing-Allow-Origin ":" * "," x-ms-apihub-cached-response ":" true "," Date ":" Thu, 12 Aug 2021 23:41:49 GMT "," Content-Type ":" application / json "," Expires ":" 0 "," Content-Length ":" 156 "}," body ": {" error ": {" message ":" Falha na operação "," detalhe ":" Falha na atualização da exceção ACL devido a restrições de segurança "}," status ":" falha "}} Max-Age = 1800; Expira = Sex, 13-Ago-2021 00:11:48 GMT; Caminho = /; HttpOnly; SameSite = Nenhum; Seguro, BIGipServerpool_tkshelptest = 528767498.46910.0000; caminho = /; Httponly; Seguro; SameSite = Nenhum; Seguro "," Strict-Transport-Security ":" max-age = 63072000; includeSubDomains "," Timing-Allow-Origin ":" * "," x-ms-apihub-cached-response ":" true "," Date ":" Thu, 12 Aug 2021 23:41:49 GMT "," Content-Type ":" application / json "," Expires ":" 0 "," Content-Length ":" 156 "}," body ": {" error ": {" message ":" Falha na operação "," detalhe ":" Falha na atualização da exceção ACL devido a restrições de segurança "}," status ":" falha "}} Max-Age = 1800; Expira = Sex, 13-Ago-2021 00:11:48 GMT; Caminho = /; HttpOnly; SameSite = Nenhum; Seguro, BIGipServerpool_tkshelptest = 528767498.46910.0000; caminho = /; Httponly; Seguro; SameSite = Nenhum; Seguro "," Strict-Transport-Security ":" max-age = 63072000; includeSubDomains "," Timing-Allow-Origin ":" * "," x-ms-apihub-cached-response ":" true "," Date ":" Thu, 12 Aug 2021 23:41:49 GMT "," Content-Type ":" application / json "," Expires ":" 0 "," Content-Length ":" 156 "}," body ": {" error ": {" message ":" Falha na operação "," detalhe ":" Falha na atualização da exceção ACL devido a restrições de segurança "}," status ":" falha "}} SameSite = Nenhum; Seguro, BIGipServerpool_tkshelptest = 528767498.46910.0000; caminho = /; Httponly; Seguro; SameSite = Nenhum; Seguro "," Strict-Transport-Security ":" max-age = 63072000; includeSubDomains "," Timing-Allow-Origin ":" * "," x-ms-apihub-cached-response ":" true "," Date ":" Thu, 12 Aug 2021 23:41:49 GMT "," Content-Type ":" application / json "," Expires ":" 0 "," Content-Length ":" 156 "}," body ": {" error ": {" message ":" Falha na operação "," detalhe ":" Falha na atualização da exceção ACL devido a restrições de segurança "}," status ":" falha "}} SameSite = Nenhum; Seguro, BIGipServerpool_tkshelptest = 528767498.46910.0000; caminho = /; Httponly; Seguro; SameSite = Nenhum; Seguro "," Strict-Transport-Security ":" max-age = 63072000; includeSubDomains "," Timing-Allow-Origin ":" * "," x-ms-apihub-cached-response ":" true "," Date ":" Thu, 12 Aug 2021 23:41:49 GMT "," Content-Type ":" application / json "," Expires ":" 0 "," Content-Length ":" 156 "}," body ": {" error ": {" message ":" Falha na operação "," detalhe ":" Falha na atualização da exceção ACL devido a restrições de segurança "}," status ":" falha "}} Strict-Transport-Security ":" max-age = 63072000; includeSubDomains "," Timing-Allow-Origin ":" * "," x-ms-apihub-cached-response ":" true "," Date ":" Thu, 12 Aug 2021 23:41:49 GMT "," Content-Type ":" application / json "," Expires ":" 0 "," Content-Length ":" 156 "}," body ": {" error ": {" message ":" Falha na operação "," detalhe ":" Falha na atualização da exceção ACL devido a restrições de segurança "}," status ":" falha "}} Strict-Transport-Security ":" max-age = 63072000; includeSubDomains "," Timing-Allow-Origin ":" * "," x-ms-apihub-cached-response ":" true "," Date ":" Thu, 12 Aug 2021 23:41:49 GMT "," Content-Type ":" application / json "," Expires ":" 0 "," Content-Length ":" 156 "}," body ": {" error ": {" message ":" Falha na operação "," detalhe ":" Falha na atualização da exceção ACL devido a restrições de segurança "}," status ":" falha "}}
Thanks, I was able to solve the problem
Hi ,
Can you please provide the clear document for creating the incident and get the status of the incident which explains from scratch.
Thank you in advance