How to trigger playbook using button from workspace?

Community Alums
Not applicable

Hi

I would like to know how can I trigger a playbook by pressing a button on workspace. I do not want it the normal way of submitting a record or updating. 

1 ACCEPTED SOLUTION

lpruit2
Kilo Sage

Greetings @Community Alums. I was able to achieve this in my PDI by creating a new UI Action that is specifically configured for Workspaces. I'll include the steps I performed below. As always, interested in what others have to suggest and feel free to modify these steps to suit your needs.

 

  1. Create a new UI Action
    1. Here I titled the UI Action "Playbook"
    2. I have this Playbook assigned to the Incident tablelpruit2_0-1763283856902.png
    3. In the Script field, I am utilizing the Playbook Experience API. I'll include the test Script I used calling on an existing out-of-the-box Playbook Experience in addition to ServiceNow documentation about the API itself in case you have any questions. 
      1. PlaybookExperience - Scoped - ServiceNow documentation on the API being used here 
      2. Here I have a simple Condition of "Is NOT a New Record" lpruit2_1-1763284100352.png
    4. Finally, at the bottom of the UI Action form, I checked "Workspace Form Button"
      1. lpruit2_2-1763284238939.png

         

  2. Next, for testing purposes, I modified the Service Operations Workspace to add a tab to show the Playbook after it is called. There is a great YouTube video on the ServiceNow Community channel that I'll include below that outlines how I completed this step. If you already have a Playbook activity added to your Workspace, then this step is not needed. 
    1. Embedding Playbooks in Next Experience - Workflow Academy Shorts #07 (Aug 8th, 2024)

 

And that should be all that is required. After I completed these two steps, I went into Service Operations Workspace, found an existing Incident, and verified I now see the new UI Action (button) called "Playbook". I clicked on the Playbook button and navigated to the Playbook tab that I created in Step 2 and verified I now see a recent Playbook execution. 

 

lpruit2_3-1763284704053.png

 

 

 

 

View solution in original post

2 REPLIES 2

lpruit2
Kilo Sage

Greetings @Community Alums. I was able to achieve this in my PDI by creating a new UI Action that is specifically configured for Workspaces. I'll include the steps I performed below. As always, interested in what others have to suggest and feel free to modify these steps to suit your needs.

 

  1. Create a new UI Action
    1. Here I titled the UI Action "Playbook"
    2. I have this Playbook assigned to the Incident tablelpruit2_0-1763283856902.png
    3. In the Script field, I am utilizing the Playbook Experience API. I'll include the test Script I used calling on an existing out-of-the-box Playbook Experience in addition to ServiceNow documentation about the API itself in case you have any questions. 
      1. PlaybookExperience - Scoped - ServiceNow documentation on the API being used here 
      2. Here I have a simple Condition of "Is NOT a New Record" lpruit2_1-1763284100352.png
    4. Finally, at the bottom of the UI Action form, I checked "Workspace Form Button"
      1. lpruit2_2-1763284238939.png

         

  2. Next, for testing purposes, I modified the Service Operations Workspace to add a tab to show the Playbook after it is called. There is a great YouTube video on the ServiceNow Community channel that I'll include below that outlines how I completed this step. If you already have a Playbook activity added to your Workspace, then this step is not needed. 
    1. Embedding Playbooks in Next Experience - Workflow Academy Shorts #07 (Aug 8th, 2024)

 

And that should be all that is required. After I completed these two steps, I went into Service Operations Workspace, found an existing Incident, and verified I now see the new UI Action (button) called "Playbook". I clicked on the Playbook button and navigated to the Playbook tab that I created in Step 2 and verified I now see a recent Playbook execution. 

 

lpruit2_3-1763284704053.png

 

 

 

 

Sarthak Kashyap
Mega Sage

Hi @Community Alums ,

 

Please check below URL's, they also have same issue as yours

 

https://www.servicenow.com/community/service-operations-workspace/playbook-tab-isn-t-visible-in-sow/td-p/2894360

https://www.servicenow.com/community/in-other-news/making-use-of-playbooks-in-the-service-operations-workspace/ba-p/2748478

 

Please mark my answer correct and helpful if this works for you

Thanks and Regards,

Sarthak