Stop playbooks bot

Summary
Stop the playbooks bot from pestering.

Steps to reproduce
I was curious what playbooks were and started the tutorial. Realized that while I am interested in learning this, I didn’t want this running on the team I was logged into. I dumped the playbook and cleaned up. Now every day I get pestered by the playbooks bot telling me “You have 1 run overdue for a status update:”

Grrrr! No I don’t! And when I click the link. “This channel is not running any playbook.” Duh!

Expected behavior
The bot stops pestering me when I stop and delete the playbooks.

Observed behavior
Incessant pestering.

I’ve tried everything I can think of to stop the playbooks bot from sending out notices. And I can’t find anything in my searching where others are trying to stop the bot. Anyone know how I can tell this bot to knock it off, please?
Thanks!

Hi stack and welcome back (that rhymes…),

Can you describe how you deleted the playbook? The playbook itself is just a template and it is being instantiated by every run you start, so when you click on run for a playbook, a new run is created based on the definition in the playbook.
Deleting the playbook should not have any influence on the active run - could it be that you only deleted the playbook, but not the run?

When you open the “playbooks” interface, you see two buttons in the top menu, “Runs” and “Playbooks”.
Can you confirm that no Runs are in progress anymore?
See my screenshot, I’m currently having two runs active - trying to reproduce the pestering bot here, but didn’t succeed so far, but maybe that’s just a daily reminder so I have to be patient.

Ahhhh… Previously when I went to playbooks it was defaulting ot the playbooks tab and I didn’t click the runs tab. There indeed is a run listed as in progress but I don’t see how to delete runs.

You cannot directly delete the run, but you can finish it.
When you click on the run in the overview in my screenshot, the detail page for this run will open and at the top right, you can click on “Go to channel” and you will be brought to the channel the playbook run is tied to.

Once you’re in the channel, you will see the run details in the rightmost column. If you cannot see the column, click the marked icon in my screenshot to toggle the run details.
Scroll down to the bottom and click on “Finish run” to complete it and muzzle the playbooks bot.

Thanks for helping me through this. I click on “Go to channel” and click that clipboard icon and get this:
No Run

In this case, the run seems to be finished. When you’re on the overview page, can you clear all the filters and make sure that there are no other runs active at the moment?

In the message you received from the playbooks bot, there should be clickable links that will also bring you directly to the active runs.
I assume this is the message you’re seeing, right?

grafik

I could click on both of those links and it directly brought me to the channels with the run tab open and there I could finish them off. What happens when you try to do that?

There are no other runs active.

It takes me to the channel, but does not open the run tab though. And when I open the run tab, I can start a new run, but I don’t want to start a new one. I want the old one gone. :-/

I suppose I could start a new one do all the stuff and see if it goes away.

Interesting - do you have access to your database? If so, could you please run the following command so I can see what your database is saying about the runs:

mm720=# select id,name,isactive,createat,endat,deleteat,activestage,currentstatus from ir_incident;
             id             |         name          | isactive |   createat    |     endat     | deleteat | activestage | currentstatus
----------------------------+-----------------------+----------+---------------+---------------+----------+-------------+---------------
 5ozdd5p7m38ym8zucp4xx8azpw | bofh's onboarding run | t        | 1661870345691 |             0 |        0 |           0 | InProgress
 96h3d6ks3fdjb87fnt9trz639h |                       | t        | 1661870133433 | 1661874781617 |        0 |           0 | Finished
(2 rows)

This is an example from my system, running PostgreSQL.
Table and column names will be different if you’re using MySQL - let me know if you can rewrite the query or if I should spin up a MySQL instance if that is what you’re using to provide the correct query.

I do have access to the database and it is mysql. Thanks again for sticking through this with me.
Edit. Here’s the output:

MariaDB [mattermost]> select id,name,isactive,createat,endat,deleteat,activestage,currentstatus from IR_Incident;
+----------------------------+----------------+----------+---------------+---------------+----------+-------------+---------------+
| id                         | name           | isactive | createat      | endat         | deleteat | activestage | currentstatus |
+----------------------------+----------------+----------+---------------+---------------+----------+-------------+---------------+
| mbt5qqzxajygtdqjmja5c74d3o |                |        1 | 1661875364146 | 1661875385853 |        0 |           0 | Finished      |
| yf4zwwpf5bb8jydao8zu9p78co | Onboarding Run |        1 | 1661457599044 |             0 |        0 |           0 | InProgress    |
+----------------------------+----------------+----------+---------------+---------------+----------+-------------+---------------+
2 rows in set (0.000 sec)

OK, so the onboarding run is definitely still active.
Can you run the /playbook list slash-command? It should open a menu to the right with a list of all active runs as well as all available playbooks.

Maybe this view helps, if it doesn’t, try to switch to the channel where the run should be active in and type /playbook finish.

Let me know if that works.

OK, so part of me trying to clean up this mess was I archived the channel it started (I’d forgotten I’d done that) and had tried to kick the playbooks bot out of the team. I had to unarchive the channel, run /playbook finish then rearchive it to get it to go away. Wow… that was annoying. But hopefully it stops sending me messages now. I’m still not sure what I’d use playbooks for but if I need something to pester my users I know where to start! :laughing:

Thank you for your help. I was really tempted to start editing the DB directly and I’m glad I asked before I really broke things! :grin:

In my opinion, it should not be possible to archive a channel if there’s still an active playbook run, or the archiving process should also finish the run then to avoid something like this from happening.

Thanks for the pointer, I’ll raise awareness with the developers regarding this issue so the behaviour can probably be adjusted.

Glad to hear that your emotional relationship with the playbooksbot has come to an end and that it will not message you anymore :slight_smile:

1 Like

Update: Right now, playbooks are tied to a channel and therefore the handling is also aligned to work with that limitation. There are currently plans ongoing to separate playbooks from channels, so you can also run channel-less playbooks and have people participate in a playbook who are not members of the channel used to start it (if any). So the behaviour will change soon, for now, please make sure to manually sync the two actions (finish playbook run and archive channel) if you need to.