I’m creating a new action to send messages to MS Teams, but the modules don’t seem to get installed.
This is the code:
And the dependencies installed
and this is the error message I’m getting
The error is generic, but it seems that the modules are not getting installed.
Let me know if you need additional info
Hey @amondlane , thanks for a detailed report.
Installing the latest node modules leads me to question, what node version you use for runtime of your pre user registration actions?
Node 18 would be recommended.
Please keep us posted!
Hey @marcelina.barycka, I’m using node 18 as well.
I have tried running this command to manually install it, but reports nothing
npm install express body-parser axios
Hey, thanks for letting us know @amondlane !
The issue with your script is that you are trying to build here an express app (not supported) and that the body of
exports.onExecutePostUserRegistration function is empty so the Action does nothing. The logic within the body can be build on the flow-specific methods and properties listed in the docs.
When attempting to POST something to an external service or as part of the flow, don’t forget to add relevant secretes.
In terms of NPM modules management and limitations I found this doc useful -
And for best practices for writing Actions script including error handling -
Hope this helps!
@marcelina.barycka The results are for where the code is inside the brackets
The dependencies are added. I’ve read the docs but wasn’t able to find how to install the modules other than adding dependencies.
Hi @amondlane ,
I don’t think the issue is with modules installation. In the link I’ve sent you the last time, there are errors codes you would receive for the missing dependencies.
You can not create a webhook server (or any server) on Auth0 infrastructure as part of Auth0’s actions.
You do can send registration transaction data to an external server by providing the full address of the server as well as including authorization data in the request if that is required by your webhook server.
There is a demo on a very similar Action to what your trying to do - https://www.youtube.com/watch?v=9fnWwyYLU6Q
Please let us know how it goes!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.