Bulk Delete HubSpot Contacts from Uploaded Excel/CSV File
Bulk Contact Deletion from HubSpot via Uploaded Excel / CSV File
This workflow allows you to automate the deletion of HubSpot contacts based on email addresses provided in an uploaded Excel (.xlsx) file. It's ideal for bulk-cleaning outdated or invalid contact data.
โ Prerequisites
Before using this workflow, ensure you have the following:
A valid HubSpot App Token with permissions to search and delete contacts. An Excel (.xlsx) file with a column labeled emails containing the contact emails to be deleted. n8n self-hosted or cloud environment with: Webhook node enabled and accessible. HubSpot node credentials configured. Basic familiarity with n8n node configuration for custom adjustments (optional).
๐Sample Document
Download ๐ง n8n Workflow: Delete HubSpot Contacts from an Uploaded Excel File
This n8n workflow allows you to upload an Excel file containing contact email addresses. It will check each one in HubSpot and delete the contact if it exists.
๐ Workflow Overview
๐ฅ 1. Trigger via Webhook (POST) The workflow starts when a .xlsx file is uploaded via an HTTP POST request to the webhook. This Excel file should contain a column with contact email addresses.
๐ 2. Extract Data from Excel The uploaded file is parsed, and its rows are converted into structured JSON items, making each email address available for further processing.
๐งน 3. Normalize Data The data is cleaned and normalized โ for example, mapping column headers (e.g., emails) into a standard email field, ensuring consistent downstream logic.
๐ 4. Loop Through Contacts Each row (contact) is processed individually using batch looping. This allows for fine-grained error handling and sequential processing.
๐ 5. Search for Contact in HubSpot For each contact, a search query is made in HubSpot based on the email address. The workflow only fetches the first result (if any).
๐งช 6. Check if Contact Exists An IF condition checks whether the contact was found (i.e., if a HubSpot contact ID exists): โ Yes โ proceed to delete the contact. โ No โ skip deletion and continue to the next.
๐๏ธ 7. Delete Contact If a contact exists, it is deleted from HubSpot using its internal contact ID.
๐ ๏ธ 8. Optional Placeholder for Post-Processing A placeholder node named โReplace Meโ is included for any custom logic you may want to add after the deletion step, such as: Logging Notifications Writing to external storage
โ Use Cases
Bulk delete old or bounced email addresses from HubSpot. Clean up contacts based on external suppression lists. Automate regular CRM hygiene processes.
๐ก Suggested Enhancements
โ๏ธ Log results to Google Sheets or a database ๐ฌ Send completion report via email or Slack ๐ Add retry logic for temporary API failures ๐ Validate email format before making requests
๐ Requirements
n8n (self-hosted or cloud) HubSpot App Token (set up in n8n credentials) Excel file (.xlsx) with a column for email
๐ฆ Files
No external files are required. All logic is contained within the n8n workflow.
๐ Getting Started
Deploy the workflow in n8n. Copy the webhook URL and use it in your app or API client (like Postman). Upload an Excel file containing contact emails via POST request. Watch as it searches and deletes matches in HubSpot.
Related Templates
Restore your workflows from GitHub
This workflow restores all n8n instance workflows from GitHub backups using the n8n API node. It complements the Backup ...
Verify Linkedin Company Page by Domain with Airtop
Automating LinkedIn Company URL Verification Use Case This automation verifies that a given LinkedIn URL actually belo...
USDT And TRC20 Wallet Tracker API Workflow for n8n
Overview This n8n workflow is specifically designed to monitor USDT TRC20 transactions within a specified wallet. It u...
๐ Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments