# Rule not triggering

**URL:** <https://community.auth0.com/t/rule-not-triggering/48370>\
**Category:** Get Help\
**Tags:** rules, auth0\
**Created:** [August 20, 2020, 9:03am UTC](https://community.auth0.com/t/rule-not-triggering/48370 "2020-08-20T09:03:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![oliverlorenz](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/oliverlorenz/32/14673_2.png) [@oliverlorenz](https://community.auth0.com/u/oliverlorenz)\
**Post date:** [August 20, 2020, 9:03am UTC](https://community.auth0.com/t/rule-not-triggering/48370/1 "2020-08-20T09:03:28Z")

</div>

Hello, everyone,

I would like to persuade Auth0 to let me send the verification email myself. I have built a rule for this. This rule is enabled.

The rule itself is pretty much the same as described in the example. For testing I would like to make a request against pipedream. Code:

```
function (user, context, callback) {
  const request = require('request');

  user.user_metadata = user.user_metadata || {};
  if (user.email_verified || user.user_metadata.verification_email_sent) {
    return callback(null, user, context);
  }

  request.post({
    url: 'https:// ******************.m.pipedream.net',
    json: {
      user: user,
      context: context,
      secretToken: configuration.MY_SECRET_TOKEN,
    },
    timeout: 5000
  }, function(err, response, body){
    if (err)
      return callback(new Error(err));

    // Email sent flag persisted in the user's profile.
    user.user_metadata.verification_email_sent = true;
    auth0.users.updateUserMetadata(user.user_id, user.user_metadata)
      .then(function() {
        callback(null, user, context);
      })
      .catch(function(err) {
        callback(err);
      });
    return callback(null, user, context);
  });
}

```

Additionally I have set the status slider in the email templates to Disabled, as described in the docs [Customize Email and Ticket Handling with the Management API - Auth0 Docs](https://auth0.com/docs/auth0-email-services/manage-email-flow).

My code to create the user looks like this:

```
    await this.authenticationClient.database.signUp({
      connection: process.env.AUTH0_CONNECTION,
      username: user.email,
      email: user.email,
      password: user.password,
      email_verified: false
    });

```

When I manually trigger the rule in the web interface, I can see the call in Pipedream. At the SignUp itself I don’t get a call.

Can anyone help me?

---

<div class="post-metadata">

**Author:** ![john.gateley](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/john.gateley/32/10879_2.png) [@john.gateley](https://community.auth0.com/u/john.gateley)\
**Post date:** [August 20, 2020, 1:52pm UTC](https://community.auth0.com/t/rule-not-triggering/48370/2 "2020-08-20T13:52:15Z")

</div>

Use the realtime webtask logs extension, and put some console.logs in your rule to figure out what is going on.

John

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [January 8, 2024, 8:41am UTC](https://community.auth0.com/t/rule-not-triggering/48370/3 "2024-01-08T08:41:54Z")

</div>

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