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.
Before using this workflow, ensure you have the following:
.xlsx
) file with a column labeled emails
containing the contact emails to be deleted.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.
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.
The uploaded file is parsed, and its rows are converted into structured JSON items, making each email address available for further processing.
The data is cleaned and normalized — for example, mapping column headers (e.g., emails
) into a standard email
field, ensuring consistent downstream logic.
Each row (contact) is processed individually using batch looping. This allows for fine-grained error handling and sequential processing.
For each contact, a search query is made in HubSpot based on the email address. The workflow only fetches the first result (if any).
An IF condition checks whether the contact was found (i.e., if a HubSpot contact ID exists):
If a contact exists, it is deleted from HubSpot using its internal contact ID.
A placeholder node named “Replace Me” is included for any custom logic you may want to add after the deletion step, such as:
email
No external files are required. All logic is contained within the n8n workflow.