There is a issue about Auth0 and Mailchimp

Hi everyone, new to here to Auth0. Looking to create a rule for a User that signs up on Auth0 to then add the user to Mailchimp.
When I use mailchimp marketing SDK to Test, the log shows that:

  "code": "ENOTFOUND",
  "message": "getaddrinfo ENOTFOUND",
  "name": "Error",
  "stack": "Error: getaddrinfo ENOTFOUND\n    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:71:26)\n    at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17)"

And the action code is below:

exports.onExecutePostUserRegistration = async (event, api) => {
  const client = require('@mailchimp/mailchimp_marketing');

    apiKey: event.secrets.MC_API_KEY,
    server: event.secrets.MC_SERVER_PREFIX

  const response = await client.lists.addListMember(event.secrets.MC_LIST_ID, {
    email_address: "",
    status: "subscribed",


Can someone help show me how to fix it? Thanks!

Hey there!

When looking at the context you provided, I’m not sure if it is actually related to our stack but rather Mailchimp as you are getting an error from hitting their API. Are you sure you are using their SDK properly?