# Use environment variables

The environment variables in the pipeline function are consistent with the concept of environment variables in the operating system, and developers can get them through the global variable env. Environment variables are visible to all Pipelien functions in the application pool.

You can configure environment variables on the Settings-Environment Variables page:

Environment variables are a set of Key-Value Pair values, which can be used to save data such as WebHook links and keys.

After entering Key and Value, click Add:

Here, we set an environment variable whose Key is LARK_WEBHOOK, and the corresponding Value value can be obtained through env.LARK_WEBHOOK in the Pipeline function. For example, the following example triggers Feishu group notification after user registration:

async function pipe(user, context, callback) {
  const webhook = env.LARK_WEBHOOK;
  await axios.post(webhook, {
    title: "New User Registered-From Authing Rules Pipeline",
    text: `
                User Info:
                ID: ${user.id}
                Nickname: ${user.username}
                Registration method: ${user.registerSource}
                Email: ${user.email}
                Phone number: ${user.phone}
                UA: ${user.device}
                User pool ID: ${user.userPoolId}
          `,
  });
  return callback(null, user, context);
}