Bot isn't working

Can anyone help me please? I don’t know what I am missing, but I am trying to do a simple bot and action but can’t seem to get it to work. I just want to change the status of a column from Pending to Active when an update is created by the user (vs an admin) and only if the status is Pending. I can’t get it to change from Pending though. If I run the action as an inline action, it works and updates fine, telling me that something is wrong with the bot/trigger.
For the Event, I have it set to the correct table and only for Updates. The event condition is: AND(
[Email] = USEREMAIL(),
[Status] = “Pending”
).
The Process is set to Run Action on Rows and the table is set to the same table as the other, which is the table I want to change. The FX for the Referenced Rows on the Process is this now (I changed it to this trying to make it work as LIST([_THISROW]) wasn’t working):
SELECT(
Profile[Agent_ID],
AND(
[Agent_ID] = [_THISROW].[Agent_ID],
[Status] = “Pending”,
USEREMAIL() = [Email]
)
)

I have selected the action that works when I manually run it, so that should be correct. I’m not sure if it is a timing issue or what is going on. I have followed Grok, ChatGPT, and Appster, all of which give me these same settings but I just can’t figure out the problem. I’m hoping someone here can help me please! Thanks!

1 Like

The problem you’re likely running into is the USEREMAIL() function in your condition.

  • Automation runs from the email perspective of your AppSheet account
  • So in automation: Useremail() = “AppSheet Account Email”

This can get in the way if you’re building something with multiple people using the system, because you run into an email miss-match:

So now, when the condition is checked, [Email] = USEREMAIL() is not longer true for your situation and the automation doesn’t fire off.

Is something like that happening you think?

It’s possible, but I tested it with numerous accounts and it didn’t work for any of them. I only use the same email in testing that is in the profile, so it should have been a match. I wondered the same thing and AI told me that useremail was better in this instance than index current user, so I stuck with it. It doesn’t seem to work for any email though, which seems like that probably wouldn’t be the issue. Not sure what else I can try.

1 Like

FYI - I got it working, not the bot, but the function. I’m not even sure what I did to make it work. The bot failed repeatedly and finally AI told me to attach the action to the form directly. I did that but it failed repeated. I went back through one more time, and it worked all of a sudden. I’m sure it was one little thing somewhere (it always is LOL), but it’s all good now. Thanks for taking the time to answer MultiTech!!!

1 Like