Use this n8n workflow to instantly look up HubSpot contact details (by email or ID) directly from a Slack slash command, boosting sales and support efficiency. Deploy this n8n template today.
Download this n8n workflow template and start using it instantly.
Sales Representatives who need immediate customer context without leaving Slack.
Support Agents requiring quick access to customer phone numbers and emails.
CRM Administrators looking to integrate HubSpot data directly into communication channels.
n8n users building real-time, interactive automation n8n templates.
In fast-paced sales and support environments, delays caused by switching between communication apps and the CRM (HubSpot) are costly. This specialized n8n workflow eliminates that friction by allowing users to initiate a contact lookup directly within Slack using a simple slash command. The custom n8n trigger immediately launches the automation, intelligently determines whether the input is an email address or a contact ID, performs the necessary HubSpot API call, and returns a cleanly formatted contact card to the Slack channel. This robust n8n node structure ensures rapid access to critical customer data, dramatically improving response times and operational efficiency. This entire n8n template is designed for ease of deployment and high performance.
This automation begins with an n8n trigger set up as a Slack Slash Command Webhook.
๐ Incoming Slash Command Webhook node receives the payload from Slack when a user executes the /hubspot-contact-lookup command.๐ Check if Message Exists n8n node uses an If condition to ensure the user provided a search term. If no text is found, the workflow stops and returns an error response.โ๏ธ Parse Search Input Code n8n node analyzes the input text. It uses regex to classify the input as either email or id. It also captures essential Slack context (like responseUrl).๐ Determine Search Type If n8n node directs the flow: the true branch executes a search by email, and the false branch executes a retrieval by contact ID.get operation by ID.๐ Format Contact Info) process the retrieved HubSpot data, extracting properties (name, email, phone) and compiling them into a Markdown-formatted message string suitable for Slack.๐ฌ Send Contact Info to Slack Slack n8n node sends the fully formatted contact message back to the channel or via the response URL provided by the initial n8n trigger.๐ Incoming Slash Command n8n trigger node (remember to set the path to hubspot-contact-lookup).๐ฌ Send Contact Info to Slack n8n node. ๐ Incoming Slash Command (Webhook)
Function: Serves as the primary n8n trigger, initiating the workflow upon receiving a POST request from Slack's slash command functionality.
Key Configuration: Configured to listen on the path /hubspot-contact-lookup.
โ๏ธ Parse Search Input (Code)
Function: Cleans the user input and uses a regular expression to dynamically determine if the search term is an email address (searchType: 'email') or a contact ID (searchType: 'id'). This custom n8n node logic dictates the downstream flow.
๐ Determine Search Type (If)
Function: Routes the n8n workflow execution based on the searchType determined by the Code n8n node, ensuring the correct HubSpot API call is made.
๐ง Search Contact by Email (HubSpot)
Function: Executes the contact search operation in HubSpot, specifically using the email property as a filter.
Key Configuration: Retrieves essential properties: firstname, lastname, email, and phone.
๐ Get Contact by ID (HubSpot)
Function: Retrieves a single HubSpot contact record when the input is classified as an ID.
๐ Format Contact Info (Code)
Function: These Code n8n node steps transform the raw data returned by the HubSpot n8n node into a user-friendly, Markdown-formatted message string for display in Slack.
๐ฌ Send Contact Info to Slack (Slack)
Function: The final action in this n8n workflow, posting the generated contact card message back to the specified Slack channel.
Automate complex data collection by integrating Bright Data MCP tools with an OpenAI-powered n8n agent. Use this powerful n8n workflow for dynamic, data-driven queries.

Query your n8n workflows using an AI SQL agent. Discover which n8n node dependencies (credentials) are used across all your n8n templates quickly and efficiently for better auditing.

Automate Shopify order monitoring using a Telegram bot. Use this robust n8n workflow to check open orders and details instantly via simple chat commands.

Use this n8n workflow to automatically send personalized welcome emails to new QuickBooks customers. This robust n8n template tracks processed customer IDs in Google Sheets to prevent duplicate emails and ensure reliable automation.

๐ Founder of iTechNotion โ we build custom AI-powered automation workflows for startups, agencies, and founders. ๐ก Specializing in agentic AI systems, content automation, sales funnels, and digital workers. ๐ง 14+ years in tech | Building scalable no-code/low-code solutions using n8n, OpenAI, and other API-first tools. ๐ฌ Letโs automate what slows you down.







































