# Workflows: Trigger 'User Updated' Should Include 'Custom Fields'

**URL:** <https://meta.discourse.org/t/workflows-trigger-user-updated-should-include-custom-fields/418219>\
**Category:** Feature\
**Tags:** workflows\
**Created:** [November 24, 2026, 3:43pm UTC](https://meta.discourse.org/t/workflows-trigger-user-updated-should-include-custom-fields/418219 "2026-11-24T15:43:10Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![gassim](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gassim/32/220910_2.png) [@gassim](https://meta.discourse.org/u/gassim)\
**Post date:** [November 24, 2026, 3:43pm UTC](https://meta.discourse.org/t/workflows-trigger-user-updated-should-include-custom-fields/418219/1 "2026-11-24T15:43:11Z")

</div>

Hi there!

I am trying to use the ‘User Updated’ trigger when a user updates a custom field; however, the fields are limited to the standard default Discourse fields. I think it would be helpful if we can select custom fields as well.

 ![image](https://global.discourse-cdn.com/meta/original/4X/f/f/c/ffcbdc29a8271944b9a1e450ad051e81cfc9d2b4.png)

I thought about creating the traditional webhook that listens for ‘user updated’ and sending the request to the a workflow webhook; unfortunately, using a webhook doesn’t specify which field was changed so that didn’t work.

The trigger does work when the custom field is updated but it returns an empty array, so maybe the workaround is using a [data explorer](https://meta.discourse.org/t/32566?silent=true) query to figure out what changed when the array is blank. 🤔 (Thanks @Frully for all the previous [Data Explorer](https://meta.discourse.org/t/32566?silent=true) query suggestions, I think it might just be part of the solution).

`Update:`  
Technically this should work:

- Trigger ‘User Updated’
- Condition: if change is empty array i.e. ‘custom field’
- Use SQL Query to figure out what was the latest change:

```plaintext
-- [params]
-- user_id :target_user_id

WITH latest_save AS (
  SELECT MAX(updated_at) AS max_updated_at
  FROM user_custom_fields
  WHERE user_id = :target_user_id
    AND name LIKE 'user_field_%'
)
SELECT
  ucf.user_id,
  COALESCE(uf.name, ucf.name) AS field_name,
  ucf.name AS raw_field_key,
  ucf.value AS current_value,
  ucf.created_at,
  ucf.updated_at AS changed_at
FROM user_custom_fields ucf
CROSS JOIN latest_save ls
LEFT JOIN user_fields uf
  ON ucf.name = CONCAT('user_field_', uf.id)
WHERE ucf.user_id = :target_user_id
  AND ucf.name LIKE 'user_field_%'
  AND ucf.updated_at >= ls.max_updated_at - INTERVAL '5 seconds'
ORDER BY ucf.updated_at DESC, uf.position ASC

```

[AI Generated SQL that seems to work]

* * *

Thank you!

I hope that this trigger could be improved because it will be a great help.

---

_[View the full topic](https://meta.discourse.org/t/workflows-trigger-user-updated-should-include-custom-fields/418219)._
