Forum Academy Marketplace Showcase Pricing Features

Accessing Email of Deleted User with New Database Trigger Event

Hi,

I have just discovered the “New Database Trigger Events” in backend workflows which is excellent. I am working to have boards in Monday.com automatically update by API via Integromat to reflect the data in our Bubble App. This functionality makes life much much easier as it will trigger whenever a the database changes for a Type whether that change is made by a user or even by admins in the back office. I wish I had known about this 6 montsh ago…

The question I have is for deletion. So for example for the User type I had hoped that User Before Change in this workflow would enable me to access the email address of the deleted record. It does not seems to work like this and when a record is deleted the Email address of User Before Change seems to be empty. I can understand why as the record is deleted.

Is there a best way to access the email address of a user just deleted in this work flow?

I can see a way to do this is when a user is deleted through the front office send the api before deletion to update Monday.com and then delete in Bubble. This will not work for deletions made through the back office which would need to be also then manually updated to reflect in Monday. This will take me quite a lot longer so wondered if any easy way through the Workflow to access the data that existed before deletion when this workflow is triggered.

Thanks in Advance!

Stephen

Hey @stephen.clegg

Maybe you can create a data type “deleted users” populated when delete users

Hi @Sarah_Esteve ,

I am going to revisit this with a fresh mind tomorrow. Your suggestion is one possibility and thanks but will require an extra step so that I cannot use the New Database Trigger Event workflow to capture deletions and can can only use it to capture changes in data.

Ideally I want a way to use that event so that deletions anywhere (even through the back office) will be captured to trigger the api firing to inegromat.

It would really be great if User Before Change could access the deleted data at the time this event is triggered…

So I am still not sure of a way to do this so that it would capture a deletion through the backoffice (as the New Database Trigger Event will do for a newly created database item or a modification). But where this is being done through the front office I will send the details through the api before it is deleted so this can be marked deleted in Monday.com.

hey @stephen.clegg I’ve tested something. You can access to deleted data.

What you should do : create a database trigger with the following condition :

When user before change is not empty and user now is empty
the action in this event can access to “user before change” data.

I tried an dit worked fine.

2 Likes

Hi @Sarah_Esteve

Thanks for this. I did do exactly that I thought a couple days back and seemed that the data going out via api had a blank for the before email which is why I assumed before change doesn’t work on deletion because it has ceased to exist.

It is nearly 1am here but I will try again in the morning and report back because it would certainly be better. I have gotten things working through the front office just by sending off the api before deletion but for any deletions made in the back office would need something like. above so I will check it out again tomorrow. Thanks!

What if you just add a tag to the user field “deactivated” as a Boolean? Instead of ever actually deleting the user.

1 Like

@Sarah_Esteve Thank you so much for confirming that does work and pointing me back in that direction. I had concluded Before Change cannot get the value of deleted item but as you say it can .

Long story short I had something in the workflow that was messing it up but working now :slight_smile:

Thanks @jared.gibb . That would work but as @Sarah_Esteve points out Before Change does enable us to capture the deleted data which I though it did not. So problem solved without having to set up this boolean! Thank you everyone. :slight_smile:

1 Like