PII Redaction

If you are using the Dashbot NPM for integration, and you wish to remove personally identifiable information from the text, you may set a flag when you include the dashbot NPM. This will enable the redact-pii library prior to sending messages to Dashbot.

Install Dashbot via NPM

npm install --save dashbot

Include Dashbot

Change the inclusion of Dashbot from:

const dashbot = require('dashbot')(process.env.DASHBOT_API_KEY).facebook;


const dashbot = require('dashbot')(process.env.DASHBOT_API_KEY, {"redact":true}).facebook;

The example above is for Facebook bots, make sure to use the appropriate platform call when invoking the Dashbot npm.

Custom Redactor

Starting with the dashbot npm version 11.0.0, you may use your own, custom, redactor or configure your own options for the redact-pii library. For example, by default, the dashbot implementation of pii-redact does not redact ALL digits, but you may choose to do so by using the following custom redactor:



const { AsyncRedactor } = require('redact-pii');
const customRedactor = new AsyncRedactor();

const dashbot = require("dashbot")(process.env.DASHBOT_API_KEY, {
redact: customRedactor
Close Menu