For the following code examples to work, you will need to add Fliplet’s Data Sources API to your app. To add it follow the steps referenced here.

You may want to know if some data exists or if it doesn’t, take certain actions to fill it in. Assuming the data was stored on a Fliplet data source you could use the following code.

var dataSourceConnection;

  .then(function (connection) {
    dataSourceConnection = connection;

    return connection.findOne({
      where: {
        'Email': ''
  }).then(function (entry) {
    // If no entry found with the email
    if (!entry) {
        'Email': '',
        'Created at': new Date().toISOString();

The code connects with a data source, then looks for an entry with an email address of ‘’. If it exists no further action is taken. If it doesn’t, then a new entry is created with the email address and the date at which the entry was created is stored.