# Deleting a User from the Backend Workflow

**URL:** <https://forum.bubble.io/t/deleting-a-user-from-the-backend-workflow/251320>\
**Category:** Need help\
**Created:** [March 12, 2023, 12:43pm UTC](https://forum.bubble.io/t/deleting-a-user-from-the-backend-workflow/251320 "2023-03-12T12:43:43Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![halmelaifi](https://avatars.discourse-cdn.com/v4/letter/h/8e7dd6/32.png) [@halmelaifi](https://forum.bubble.io/u/halmelaifi)\
**Post date:** [March 12, 2023, 12:43pm UTC](https://forum.bubble.io/t/deleting-a-user-from-the-backend-workflow/251320/1 "2023-03-12T12:43:43Z")

</div>

Hello Bubblers,

I’m trying to delete a user along with all its related data when the app receives a specific webhook event. As of now, I’m able to delete all the related data, such as its products, subscriptions, … etc.

However, the user itself is not deleted. Here are two screenshots of how I’m deleting the subscription, for example, which is working as expected, and how I’m trying to delete the user, which is not doing anything.

 ![11](https://us1.discourse-cdn.com/bubble/original/3X/0/9/09c8fdc8a2f92b99cd557dac0689a28ddd5a1289.png)  
 ![22](https://us1.discourse-cdn.com/bubble/original/3X/c/3/c380e7d9199eb5a3c094b39a78916eca91b123e8.png)

The merchant\_id is a number that is added to all the data types. So it’s there in the Subscription and in the User, and it’s the same.

What am I doing wrong here?

Thank you!!

---

<div class="post-metadata">

**Author:** ![adamhholmes](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/adamhholmes/32/100510_2.png) [@adamhholmes](https://forum.bubble.io/u/adamhholmes)\
**Post date:** [March 12, 2023, 12:47pm UTC](https://forum.bubble.io/t/deleting-a-user-from-the-backend-workflow/251320/2 "2023-03-12T12:47:18Z")

</div>

Have you checked your server logs to see what’s going on?

i.e. is the workflow action running, but not deleting the User? If so, why not?

Or is the workflow actin not running at all?

---

<div class="post-metadata">

**Author:** ![halmelaifi](https://avatars.discourse-cdn.com/v4/letter/h/8e7dd6/32.png) [@halmelaifi](https://forum.bubble.io/u/halmelaifi)\
**Post date:** [March 12, 2023, 1:00pm UTC](https://forum.bubble.io/t/deleting-a-user-from-the-backend-workflow/251320/3 "2023-03-12T13:00:36Z")

</div>

I just checked the Server Logs, which I didn’t know it exists until now.

All the delete actions worked as expected, except for the delete user. The message is “Action condition failed”.

However, all the delete actions had the same condition, so why deleting user has an issue?

---

<div class="post-metadata">

**Author:** ![mikeloc](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mikeloc/32/93001_2.png) [@mikeloc](https://forum.bubble.io/u/mikeloc)\
**Post date:** [March 12, 2023, 1:05pm UTC](https://forum.bubble.io/t/deleting-a-user-from-the-backend-workflow/251320/4 "2023-03-12T13:05:49Z")

</div>

Smart money says it’s the [default privacy rule](http://forum.bubble.io/t/new-ish-to-bubble-and-not-seeing-user-data-you-are-expecting-to-see/200842) on the `User` data type that is getting in the way because that’s almost always the case in a situation like the one you are describing.

---

<div class="post-metadata">

**Author:** ![halmelaifi](https://avatars.discourse-cdn.com/v4/letter/h/8e7dd6/32.png) [@halmelaifi](https://forum.bubble.io/u/halmelaifi)\
**Post date:** [March 12, 2023, 1:07pm UTC](https://forum.bubble.io/t/deleting-a-user-from-the-backend-workflow/251320/5 "2023-03-12T13:07:25Z")

</div>

Can I change the default privacy rule? And what are the consequences?

Thank you!

---

<div class="post-metadata">

**Author:** ![mikeloc](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mikeloc/32/93001_2.png) [@mikeloc](https://forum.bubble.io/u/mikeloc)\
**Post date:** [March 12, 2023, 1:10pm UTC](https://forum.bubble.io/t/deleting-a-user-from-the-backend-workflow/251320/6 "2023-03-12T13:10:51Z")

</div>

Of course you can change the default privacy rule, and the consequences are specific to the changes you make and the nature of your app. Instead of immediately firing back additional questions, you should learn about privacy rules and figure out how to use them correctly, and then apply what you learn to your app.

---

<div class="post-metadata">

**Author:** ![adamhholmes](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/adamhholmes/32/100510_2.png) [@adamhholmes](https://forum.bubble.io/u/adamhholmes)\
**Post date:** [March 12, 2023, 1:16pm UTC](https://forum.bubble.io/t/deleting-a-user-from-the-backend-workflow/251320/7 "2023-03-12T13:16:50Z")

</div>

> [@halmelaifi](#):
>
> The message is “Action condition failed”.

Well then, there you go… the Only When condition on the workflow is not being met (so that action doesn’t run).

I don’t know what the Condition is (aside from being Request Data’s event is Arbritray Text)…

So what is the Arbritrary text?

But if it’s anything to do with The User’s merchant\_ID field, then I expect @mikeloc is correct, and you have a privacy rule stopping that field (or the entire User object) from being accessible in the workflow.

So either change your privacy rules, or check the box to allow the workflow to Ignore Privacy Rules when running, depending of course on the specifics of your app, the data you need to protect, and the way your workflow is set up etc.

---

<div class="post-metadata">

**Author:** ![halmelaifi](https://avatars.discourse-cdn.com/v4/letter/h/8e7dd6/32.png) [@halmelaifi](https://forum.bubble.io/u/halmelaifi)\
**Post date:** [March 12, 2023, 3:46pm UTC](https://forum.bubble.io/t/deleting-a-user-from-the-backend-workflow/251320/8 "2023-03-12T15:46:38Z")

</div>

Thank you dear!

---

<div class="post-metadata">

**Author:** ![halmelaifi](https://avatars.discourse-cdn.com/v4/letter/h/8e7dd6/32.png) [@halmelaifi](https://forum.bubble.io/u/halmelaifi)\
**Post date:** [March 12, 2023, 3:50pm UTC](https://forum.bubble.io/t/deleting-a-user-from-the-backend-workflow/251320/9 "2023-03-12T15:50:01Z")

</div>

I’ll experiment with the privacy rules and let you know how it’s going.

Thanks Adam!

---

<div class="post-metadata">

**Author:** ![halmelaifi](https://avatars.discourse-cdn.com/v4/letter/h/8e7dd6/32.png) [@halmelaifi](https://forum.bubble.io/u/halmelaifi)\
**Post date:** [March 12, 2023, 5:33pm UTC](https://forum.bubble.io/t/deleting-a-user-from-the-backend-workflow/251320/10 "2023-03-12T17:33:56Z")

</div>

Ok, mission accomplished. Not sure about the consequences yet though.

I found two ways to work around this, one is to add a privacy rule to the User type, as shown in the attachment. The other is to allow everyone to find this in search.

 ![33](https://us1.discourse-cdn.com/bubble/original/3X/9/f/9f98fdb6b5985b884274316ce39d73dbb9792d15.png)

Thank you everyone!

---

<div class="post-metadata">

**Author:** ![oliviercoolen](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/oliviercoolen/32/70368_2.png) [@oliviercoolen](https://forum.bubble.io/u/oliviercoolen)\
**Post date:** [March 12, 2023, 6:03pm UTC](https://forum.bubble.io/t/deleting-a-user-from-the-backend-workflow/251320/11 "2023-03-12T18:03:59Z")

</div>

@halmelaifi I wouldn’t recommend that privacy rule. If your problem is related to privacy rules, it might be better to check the checkbox “ignore privacy rules” when running that backend workflow.

---

<div class="post-metadata">

**Author:** ![halmelaifi](https://avatars.discourse-cdn.com/v4/letter/h/8e7dd6/32.png) [@halmelaifi](https://forum.bubble.io/u/halmelaifi)\
**Post date:** [March 12, 2023, 6:20pm UTC](https://forum.bubble.io/t/deleting-a-user-from-the-backend-workflow/251320/12 "2023-03-12T18:20:00Z")

</div>

@oliviercoolen I just did that. I wasn’t sure that I wanted to play with the privacy rules honestly.  
Thank you for the recommendation.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [May 21, 2023, 12:44pm UTC](https://forum.bubble.io/t/deleting-a-user-from-the-backend-workflow/251320/13 "2023-05-21T12:44:23Z")

</div>

This topic was automatically closed after 70 days. New replies are no longer allowed.
