Cannot create Smart Action

I’m trying to set up a Smart actions following the doc but it doesn’t work.
I’ve created the /forest folder and create an event.ts file where I create my action

collection("event", {
  actions: [
      name: "Mark as Live",

After reloading the action doesn’t exist in the .forestadmin-schema.json file neither in the UI.

I’ve tried many solutions but nothing works.

I’m working on localhost with:

  • "typescript": "^5.1.3"
  • "express": "^4.18.2",
  • node : v19.7.0
  • "forest-express-mongoose": "^9.3.0",

Thanks in advance

Hello @Nico ! Welcome to our community. :slight_smile:

Are you sure that you are using forest-express-mongoose? Or our latest version of forest Node.js agent @forestadmin/agent + @forestadmin/datasource-mongoose?

In this case, I invite you to read this wonderful documentation explaining how you can simply create Custom Action (equivalent to Smart Action).

Let me know if it helps.

Kind regards,

Hello @morganperre ! Thank you for your quick reply !

I’ve just seen that I’ve all 3 in my package.json. I’ll remove the forest-express-mongoose and follow the doc you sent me.

I’ll let you know if that works.
Just to confirm, the agent they use for creating the action is the one return by the createAgent() function from @forestadmin/agent” right ?

Best regards,

1 Like

Exactly. :muscle: I will make a clear feedback to our team about this subject.

forest-express-mongoose and forest-express-sequelize are older packages used for projects generated months (even years) ago.

Kind regards,