How to use the pipedrive.Client function in pipedrive

To help you get started, we’ve selected a few pipedrive examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github thirdandgrove / thirdandgrove-com-gatsby / functions / submission-created.js View on Github external
exports.handler = function(event, _context, callback) {
  const pipedrive = new Pipedrive.Client(process.env.PIPEDRIVE_KEY, {
    strictMode: true,
  });
  // onlt allow post method
  if (event.httpMethod !== 'POST') {
    return callback(null, { statusCode: 403 });
  }

  const formData = JSON.parse(event.body);
  const { name, email, phone, website, comments } = formData;
  // check for required fields
  if (!name || !email) {
    return callback(null, { statusCode: 400 });
  }

  const names = name.split(' ');
  // eslint-disable-next-line prefer-const

pipedrive

Pipedrive REST client for NodeJS

MIT
Latest version published 1 day ago

Package Health Score

84 / 100
Full package analysis

Popular pipedrive functions