Asked by
Mike Haye
PipedriveSheets Creator
PipedriveSheets
54
KARMA
Use these exact column headers (case-sensitive):
// Node.js example using Pipedrive API
const axios = require('axios');
const csv = require('csv-parser');
const fs = require('fs');
const API_TOKEN = 'YOUR_API_TOKEN';
const BATCH_SIZE = 100;
async function importContacts() {
const contacts = [];
fs.createReadStream('contacts.csv')
.pipe(csv())
.on('data', (row) => contacts.push(row))
.on('end', async () => {
for (let i = 0; i < contacts.length; i += BATCH_SIZE) {
const batch = contacts.slice(i, i + BATCH_SIZE);
await processBatch(batch);
// Wait 1 second between batches to respect rate limits
await new Promise(resolve => setTimeout(resolve, 1000));
}
});
}
async function processBatch(batch) {
for (const contact of batch) {
try {
await axios.post(
`https://api.pipedrive.com/v1/persons?api_token=${API_TOKEN}`,
{
name: contact['Person Name'],
email: contact['Email'],
phone: contact['Phone'],
org_name: contact['Organization Name']
}
);
} catch (error) {
console.error(`Failed to import: ${contact['Email']}`, error.message);
}
}
}
| Error | Cause | Solution |
|---|---|---|
| "Invalid email format" | Email column has non-email values | Validate all emails before import |
| "Owner not found" | Owner name doesn't match Pipedrive users | Use exact user names or leave blank |
| "Duplicate detected" | Contact already exists | Choose "Skip" or "Update" in import settings |
| "Timeout error" | File too large | Split into smaller batches |
Pro Tip: Always test with a small batch (100 rows) first! This helps you catch formatting issues before importing thousands of contacts.