`sib-api-v3-sdk` package not identified in Auth0 Rules

I am trying to write a rule which uses a package sib-api-v3-sdk but when I do save and try option. It provides me with this console output.

ERROR: Cannot find module 'sib-api-v3-sdk'
Require stack:
- /data/io/node12/3a09334b-381a-40a9-b838-c2ef97dbd6c4/webtask.js

Can someone provide a workaround for this ??
How I can import this library and use it in Auth0 rules.

Aim is to create a contact in SendInBlue as soon as a new user is created either by Signup or Social Logins.

Hi @abhijeet

Thanks for getting in touch with us at Auth0 Community.

This error will occur if you are trying to use an unsupported node module within your rule. You can find supported modules here https://auth0-extensions.github.io/canirequire/

Perhaps as an alternative you may create your own API endpoint that does use the required package and host the endpoint on your own infrastructure. The endpoint could receive the new user details and POST the data to SendInBlue’s API.

To get the new user details to your endpoint you could use a Post User Registration Action indeed this particular Action is designed to do just that.

Not completely related but there’s an example here of how you might use axios to post data to a third party API within an Action.

Hope this helps
Regards.

2 Likes

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