# Trouble setting Smart Actions

**URL:** <https://community.forestadmin.com/t/trouble-setting-smart-actions/1200>\
**Category:** Help me!\
**Created:** [October 22, 2020, 9:36am UTC](https://community.forestadmin.com/t/trouble-setting-smart-actions/1200 "2020-10-22T09:36:48Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jcastagne](https://avatars.discourse-cdn.com/v4/letter/j/977dab/32.png) [@jcastagne](https://community.forestadmin.com/u/jcastagne)\
**Post date:** [October 22, 2020, 9:36am UTC](https://community.forestadmin.com/t/trouble-setting-smart-actions/1200/1 "2020-10-22T09:36:48Z")

</div>

Hi, we are trying to setup our forest admin environment to manage the backoffice of an existing application.

So far, we deployed a prod version that is able to retrieve data from our DB, and we are trying to setup some smart actions. We followed the guidelines and added an empty action in one of our collections in the /forest folder

```javascript
collection('artists', {                                                                                                                                                                                 
    actions: [{ 
    name: 'Validate Artist'
     }],
    });

```

## Expected behavior

According to the documentation, the smart action should be visible in the UI under the collection settings tab

## Actual behavior

No smart action is displayed whatsoever.

## Context

After changing the /forest we successfully re-built our container, but still no change in the UI.  
We are new to Forest Admin, and we may have some deployment issues as far as I know (for instance, I read in similar posts to check for the forestadmin-schema.json file, but I can’t manage to find it in our solution)

- Express Version: 4.16.3
- Sequelize Version: 5.15.1
- Database Dialect: sql
- Project Name: Bookunartiste

---

<div class="post-metadata">

**Author:** ![anon62739609](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@anon62739609](https://community.forestadmin.com/u/anon62739609)\
**Post date:** [October 22, 2020, 9:51am UTC](https://community.forestadmin.com/t/trouble-setting-smart-actions/1200/2 "2020-10-22T09:51:08Z")

</div>

Hi @jcastagne and welcome in our community 🍾!

I think you forgot to make your action visible 😉, did you follow this [documentation](https://docs.forestadmin.com/documentation/reference-guide/actions/create-and-manage-smart-actions#creating-a-smart-action). You will see there is a step explaining how to make the action visible just after creating your action 😉.

Another reason could be that smart action by default are of type `bulk` if you read the documentation of smart actions it’s written in the parameters section. So if you do not select any record the action will not be available, so if you want another type of action make sure to update the `type` of your action.

Hope this will help you 🙂

---

<div class="post-metadata">

**Author:** ![jcastagne](https://avatars.discourse-cdn.com/v4/letter/j/977dab/32.png) [@jcastagne](https://community.forestadmin.com/u/jcastagne)\
**Post date:** [October 22, 2020, 10:09am UTC](https://community.forestadmin.com/t/trouble-setting-smart-actions/1200/3 "2020-10-22T10:09:11Z")

</div>

Hi Vince, thanks for the reply!  
I might have not been clear enough, actually I don’t even see the action in the settings pannel (where, from what I understand, I would have been able to make it visible)  
Here is a screenshot, maybe I don’t have the proper vocabulary to explain the situation clearly :

[Forest no smart action|690x354](https://community.forestadmin.com/uploads/short-url/ug5Gvd6G7vnZJinAbIVu4FvtUgR.png)

---

<div class="post-metadata">

**Author:** ![anon62739609](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@anon62739609](https://community.forestadmin.com/u/anon62739609)\
**Post date:** [October 22, 2020, 10:16am UTC](https://community.forestadmin.com/t/trouble-setting-smart-actions/1200/4 "2020-10-22T10:16:14Z")

</div>

Oh okey my bad !

So this certainly means that your **schema** is not up to date.  
Did you restart your server after adding the action ?  
You should see the new action in your `.forestadmin-schema.json`

---

<div class="post-metadata">

**Author:** ![jcastagne](https://avatars.discourse-cdn.com/v4/letter/j/977dab/32.png) [@jcastagne](https://community.forestadmin.com/u/jcastagne)\
**Post date:** [October 22, 2020, 10:41am UTC](https://community.forestadmin.com/t/trouble-setting-smart-actions/1200/5 "2020-10-22T10:41:29Z")

</div>

Yes I did restart the server.  
As I tried to explain, and I realise that might be the issue, I don’t see any .forestadmin-schema.json file. Is it something I should generate manually?

---

<div class="post-metadata">

**Author:** ![anon62739609](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@anon62739609](https://community.forestadmin.com/u/anon62739609)\
**Post date:** [October 22, 2020, 10:48am UTC](https://community.forestadmin.com/t/trouble-setting-smart-actions/1200/6 "2020-10-22T10:48:49Z")

</div>

No you should not. This file is automatically generated on `development` environment.  
Forest is expecting the first environment created to be a development environment, not a production or staging.  
Did you set `NODE_ENV` property somewhere ? If yes what is the value ?

---

<div class="post-metadata">

**Author:** ![jcastagne](https://avatars.discourse-cdn.com/v4/letter/j/977dab/32.png) [@jcastagne](https://community.forestadmin.com/u/jcastagne)\
**Post date:** [October 22, 2020, 11:06am UTC](https://community.forestadmin.com/t/trouble-setting-smart-actions/1200/7 "2020-10-22T11:06:31Z")

</div>

So I made a grep search on the whole server, I have a bunch of NODE\_ENV values in node modules, apart from that I don’t see such property anywhere

---

<div class="post-metadata">

**Author:** ![anon62739609](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@anon62739609](https://community.forestadmin.com/u/anon62739609)\
**Post date:** [October 22, 2020, 11:12am UTC](https://community.forestadmin.com/t/trouble-setting-smart-actions/1200/8 "2020-10-22T11:12:32Z")

</div>

Then in you `.env` file set `NODE_ENV=development` and try to restart 🤔

---

<div class="post-metadata">

**Author:** ![jcastagne](https://avatars.discourse-cdn.com/v4/letter/j/977dab/32.png) [@jcastagne](https://community.forestadmin.com/u/jcastagne)\
**Post date:** [October 22, 2020, 12:24pm UTC](https://community.forestadmin.com/t/trouble-setting-smart-actions/1200/9 "2020-10-22T12:24:52Z")

</div>

Thank you so much, doing so indeed generated the schema, and I can now see my smart action 🙂
