# Querying DB in Actions

**URL:** <https://community.auth0.com/t/querying-db-in-actions/78236>\
**Category:** Get Help\
**Created:** [February 14, 2022, 10:42am UTC](https://community.auth0.com/t/querying-db-in-actions/78236 "2022-02-14T10:42:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kacper.czerniak](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kacper.czerniak/32/33596_2.png) [@kacper.czerniak](https://community.auth0.com/u/kacper.czerniak)\
**Post date:** [February 14, 2022, 10:42am UTC](https://community.auth0.com/t/querying-db-in-actions/78236/1 "2022-02-14T10:42:09Z")

</div>

Hi,

I’m trying to implement custom check through Actions which requires performing DB query.  
In Rules there is a global configuration object which stores some values.

Is there something similar available for Actions? Or should I go back to Rules and implement my logic in there?

Thanks in advance 😉

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [February 14, 2022, 5:58pm UTC](https://community.auth0.com/t/querying-db-in-actions/78236/3 "2022-02-14T17:58:06Z")

</div>

Hi @kacper.czerniak,

Welcome to the Auth0 Community!

> [@kacper.czerniak](#):
>
> Is there something similar available for Actions? Or should I go back to Rules and implement my logic in there?

Yes, this can be accomplished with Auth0 Actions. To do so, you will need to use the `events.secrets` object to save your Key, Value pairs. See below for an example.

 ![image](https://global.discourse-cdn.com/auth0/original/3X/1/f/1f183c8f0f0c920571fb1bf7f0f8159a14666a92.jpeg)

Please take a look at our Actions Doc [here](https://auth0.com/docs/customize/actions/write-your-first-action#add-a-secret) for more details.

Please let me know if you have any further questions.

Thank you.

---

<div class="post-metadata">

**Author:** ![kacper.czerniak](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kacper.czerniak/32/33596_2.png) [@kacper.czerniak](https://community.auth0.com/u/kacper.czerniak)\
**Post date:** [February 15, 2022, 11:02am UTC](https://community.auth0.com/t/querying-db-in-actions/78236/4 "2022-02-15T11:02:16Z")

</div>

@rueben.tiow thanks a lot, that’s exactly what I was searching for 😉

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2022, 11:02am UTC](https://community.auth0.com/t/querying-db-in-actions/78236/5 "2022-03-02T11:02:46Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
