Can we create actions based on data of project?

Is any possibility to create an action based on project data comming from database. bcz i am trying to assign user_metadata to the logged in user based on his/her record present in the database i.e i want to assign the id to the loggedin user as his/herid on database .
Thanks

Hey there @mmdanish !

You should be able to call your own API from an action to get/set the metadata - The following may help:

Hey! thanks for providing this , but i am not getting the complete road map i want to call this from actions bcz i need long term support ,as Auth0 is depricationg the rules and hook in 2024 . is any helping material there from where i can get it all .
Thanks

Hey @mmdanish I apologize for the delayed response here.

I’m not sure I understand your question - There are a couple examples of what it might look to call an external API from an Action in the thread I shared. It’s more or less the same idea as calling an API from within a rule. The basics are:

  • Make sure your API is registered in Auth0.
  • Create a m2m app in Auth0 authorized to call your API.
  • Use these credentials to get an access token in the Action.
  • Use a library such as axios to interact with your API.
  • Assign user_metadata using the Actions API object - api.user.setUserMetadata(name, value)

Hope this helps!

1 Like

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