Automate Sales Outreach with HubSpot API, Lemlist, and Slack Integration

Streamline your sales outreach process by automating lead follow-ups using HubSpot, Lemlist, and Slack. This workflow integrates these powerful tools to ensure your sales team never misses an opportunity to connect with potential clients. Features real-time notifications via Slack, automated email campaigns through Lemlist, and seamless data synchronization with HubSpot. Perfect for sales teams managing multiple leads and seeking to enhance their outreach efficiency. Requires 4 accounts: HubSpot API, Lemlist API, Slack API, and others. Save up to 5 hours a week by automating repetitive tasks and increase your lead engagement by 30%.

74 views16 nodesJun 2023Nathan Foster

APIs

HubSpot APISlack API

Credentials

4 required

Quick Actions

Copy or download to import into your n8n instance

Workflow JSON
{
  "meta": {
    "instanceId": "f0a68da631efd4ed052a324b63ff90f7a844426af0398a68338f44245d1dd9e5"
  },
  "nodes": [
    {
      "id": "b0f0a696-a747-452f-9de4-b8772182c87d",
      "name": "Albacross - New company in segment",
      "type": "n8n-nodes-base.webhook",
      "position": [
        380,
        420
      ],
      "webhookId": "16218ff2-fcf6-480a-b7bf-8f5b4243368a",
      "parameters": {
        "path": "16218ff2-fcf6-480a-b7bf-8f5b4243368a",
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "a8b51628-c8f7-47af-90dd-df43dfd52f29",
      "name": "HubSpot - Search company",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        600,
        420
      ],
      "parameters": {
        "limit": 1,
        "domain": "={{ $json[\"website\"] }}",
        "options": {
          "properties": [
            "hs_lead_status",
            "hs_all_owner_ids"
          ]
        },
        "resource": "company",
        "operation": "searchByDomain",
        "authentication": "oAuth2"
      },
      "credentials": {
        "hubspotOAuth2Api": {
          "id": "68",
          "name": "HubSpot - Sales & CS"
        }
      },
      "typeVersion": 1,
      "continueOnFail": true,
      "alwaysOutputData": true
    },
    {
      "id": "7ee62e86-799a-421c-bd22-a0f543302101",
      "name": "HubSpot Create Account",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        1360,
        620
      ],
      "parameters": {
        "name": "={{ $node[\"Albacross - New company in segment\"].json[\"name\"] }}",
        "resource": "company",
        "authentication": "oAuth2",
        "additionalFields": {
          "websiteUrl": "={{ $node[\"Albacross - New company in segment\"].json[\"website\"] }}",
          "linkedinBio": "={{ $json[\"company\"][\"premium\"][\"about\"] }}",
          "yearFounded": "={{ $node[\"Albacross - New company in segment\"].json[\"founded_at\"] }}",
          "linkedInCompanyPage": "={{ $json[\"company\"][\"premium\"][\"url\"] }}"
        }
      },
      "credentials": {
        "hubspotOAuth2Api": {
          "id": "68",
          "name": "HubSpot - Sales & CS"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "6d7bfc0a-ba68-432c-90d1-99d656e9f1dc",
      "name": "Is Account in Hubspot",
      "type": "n8n-nodes-base.if",
      "position": [
        820,
        420
      ],
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{ $json[\"companyId\"] }}",
              "operation": "isNotEmpty"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "83eb9627-00f5-48a1-b187-5bde010863ce",
      "name": "Lemlist - Add lead to campaign",
      "type": "n8n-nodes-base.lemlist",
      "position": [
        1980,
        800
      ],
      "parameters": {
        "email": "={{ $json[\"email\"][0][\"email\"] }}",
        "resource": "lead",
        "campaignId": "Website Visitors",
        "additionalFields": {
          "lastName": "={{ $json[\"last_name\"] }}",
          "firstName": "={{ $json[\"first_name\"] }}",
          "companyName": "={{ $json[\"company\"] }}",
          "linkedinUrl": "={{ $json[\"linkedin\"] }}"
        }
      },
      "credentials": {
        "lemlistApi": {
          "id": "32",
          "name": "lemlist.net"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "9113f906-ccab-4a6c-961a-0cc8236c5cf0",
      "name": "HubSpot - Follow up task",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        1360,
        20
      ],
      "parameters": {
        "type": "task",
        "metadata": {
          "body": "={{ $node[\"Albacross - New company in segment\"].json[\"name\"] }} is active on our website.\n\nCheck what pages they visited here:{{ $node[\"Albacross - New company in segment\"].json[\"profile_url\"] }}"
        },
        "resource": "engagement",
        "authentication": "oAuth2",
        "additionalFields": {
          "associations": {
            "ownerIds": "={{ $json[\"properties\"][\"hs_all_owner_ids\"][\"value\"] }}",
            "companyIds": "={{ $json[\"companyId\"] }}"
          }
        }
      },
      "credentials": {
        "hubspotOAuth2Api": {
          "id": "68",
          "name": "HubSpot - Sales & CS"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "519f7af8-43d0-4f96-943f-fa7910023648",
      "name": "Attempted to contact?",
      "type": "n8n-nodes-base.if",
      "position": [
        1140,
        40
      ],
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{ $json[\"properties\"][\"hs_lead_status\"][\"value\"] }}",
              "value2": "ATTEMPTED_TO_CONTACT"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "b60cfbfa-a19c-4be2-a7d9-356af1688659",
      "name": "Slack - Notify sales team on Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        1360,
        380
      ],
      "parameters": {
        "text": "=Someone from {{ $node[\"Albacross - New company in segment\"].json[\"name\"] }} is interested by our content.\n\nCheck what pages they visited here:\n{{$node[\"Albacross - New company in segment\"].json[\"profile_url\"]}}\n\nHubspot URL:\nhttps://app-eu1.hubspot.com/contacts/{{ $node[\"HubSpot - Search company\"].json[\"portalId\"] }}/company/{{ $node[\"HubSpot - Search company\"].json[\"companyId\"] }} ",
        "channel": "Customer Success - Customer News",
        "attachments": [],
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "id": "5",
          "name": "Slack account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "17f373fc-dd09-4d77-99db-9877a1cef53f",
      "name": "Open Deal?",
      "type": "n8n-nodes-base.if",
      "position": [
        1140,
        400
      ],
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{ $node[\"HubSpot - Search company\"].json[\"properties\"][\"hs_lead_status\"][\"value\"] }}",
              "value2": "OPEN_DEAL"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "57296a26-8754-485c-a2b4-3fd9e5b6f2da",
      "name": "email found",
      "type": "n8n-nodes-base.if",
      "position": [
        1740,
        820
      ],
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{ $json[\"email\"][0][\"email\"] }}",
              "operation": "isNotEmpty"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "138ffa10-488f-4756-b373-f4e88d81a300",
      "name": "Return only 3 profiles",
      "type": "n8n-nodes-base.code",
      "position": [
        1360,
        820
      ],
      "parameters": {
        "jsCode": "array = $input.all()[0].json.company.employees\n\nfunction  addWebsiteProperty(array) {\n  const firstThreeElements = array.slice(0, 3);\n  const updatedElements = firstThreeElements.map(element => {\n    return { ...element, website: \"test\" };\n  });\n  return updatedElements;\n}\n\nreturn addWebsiteProperty(array)"
      },
      "typeVersion": 1
    },
    {
      "id": "5190749d-7901-4cc3-a5c0-5340f76a0e81",
      "name": "Dropcontact",
      "type": "n8n-nodes-base.dropcontact",
      "position": [
        1540,
        820
      ],
      "parameters": {
        "options": {},
        "additionalFields": {
          "company": "={{ $json[\"company\"] }}",
          "website": "",
          "last_name": "={{ $json[\"lastName\"] }}",
          "first_name": "={{ $json[\"firstName\"] }}"
        }
      },
      "credentials": {
        "dropcontactApi": {
          "id": "1",
          "name": "Dropcontact account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "3ef1ae75-0e22-486a-86fa-041110410735",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "disabled": true,
      "position": [
        1080,
        -100
      ],
      "parameters": {
        "width": 655.6935017564062,
        "height": 321.5131001029625,
        "content": "## Create a follow-up task for your reps when a company they prospected before is active on your website.\n\nThey will be able to check what pages they are visiting to better personalized their follow-up. "
      },
      "typeVersion": 1
    },
    {
      "id": "8c64b7e9-96e1-4513-9de0-de9f8b82438d",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "disabled": true,
      "position": [
        1080,
        240
      ],
      "parameters": {
        "width": 655.6935017564062,
        "height": 321.5131001029625,
        "content": "## Alert your reps when a company with an ongoing opportunity is active on your website.\n\nThey will be able to check what pages they are visiting to better personalized their follow-up. "
      },
      "typeVersion": 1
    },
    {
      "id": "33f097b7-93ec-483e-8f7c-85198bb07ac6",
      "name": "Datagma - Enrich Account & Search for contact",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1120,
        820
      ],
      "parameters": {
        "url": "https://gateway.datagma.net/api/ingress/v2/full",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "apiId",
              "value": "Your API Key"
            },
            {
              "name": "data",
              "value": "=lemlist"
            },
            {
              "name": "companyPremium",
              "value": "true"
            },
            {
              "name": "companyEmployees",
              "value": "true"
            },
            {
              "name": "maxEmployeesReturn",
              "value": "5"
            },
            {
              "name": "employeeTitle",
              "value": "Head of Growth"
            }
          ]
        }
      },
      "typeVersion": 3
    },
    {
      "id": "0997920e-6cb9-4aec-be0b-73bb838481ec",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "disabled": true,
      "position": [
        1080,
        580
      ],
      "parameters": {
        "width": 1091.436003585227,
        "height": 433.62721861064347,
        "content": "## Find new leads, update hubspot and add to lemlist\n\n"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Open Deal?": {
      "main": [
        [
          {
            "node": "Slack - Notify sales team on Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Dropcontact": {
      "main": [
        [
          {
            "node": "email found",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "email found": {
      "main": [
        [
          {
            "node": "Lemlist - Add lead to campaign",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Attempted to contact?": {
      "main": [
        [
          {
            "node": "HubSpot - Follow up task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Account in Hubspot": {
      "main": [
        [
          {
            "node": "Attempted to contact?",
            "type": "main",
            "index": 0
          },
          {
            "node": "Open Deal?",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Datagma - Enrich Account & Search for contact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Return only 3 profiles": {
      "main": [
        [
          {
            "node": "Dropcontact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HubSpot - Search company": {
      "main": [
        [
          {
            "node": "Is Account in Hubspot",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Albacross - New company in segment": {
      "main": [
        [
          {
            "node": "HubSpot - Search company",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Datagma - Enrich Account & Search for contact": {
      "main": [
        [
          {
            "node": "Return only 3 profiles",
            "type": "main",
            "index": 0
          },
          {
            "node": "HubSpot Create Account",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Related Workflows

Automate Customer Queries with OpenAI GPT & Serp API Integration

Automate customer queries with an AI assistant powered by OpenAI GPT and Serp API. Use the chat Trigger and memory Buffer Window to provide instant and accurate responses to customer inquiries 24/7. Features include conversation memory for seamless interactions, real-time data processing for updated answers, and automatic filtering to prioritize urgent messages. Perfect for e-commerce businesses handling over 100 daily product inquiries, SaaS support teams, or any customer-facing role that requires fast, reliable answers. Requires 2 accounts: OpenAI API and Serp API. Save up to 5 hours daily by managing unlimited customer conversations with contextual, product-specific answers from your resources.

966,003 views
Personal ProductivityAI Chatbot

Automate WhatsApp Customer Inquiries with OpenAI and Vector Storage

Automate customer inquiries on WhatsApp using an AI assistant powered by OpenAI GPT. By integrating WhatsApp Business API, this workflow enables your AI to respond to customer questions 24/7, enhancing user experience and engagement. Features conversation memory for seamless interactions, vector storage for precise answers, and automatic message processing for real-time responses. Perfect for e-commerce stores with over 50 daily inquiries, SaaS customer success teams, or sales departments requiring instant product information. Requires 3 accounts: WhatsApp Trigger API, OpenAI API, and WhatsApp Business API. Handle unlimited inquiries efficiently, saving up to 5 hours daily with contextual, accurate responses from your product documentation.

378,403 views
Lead NurturingAI Chatbot

Automate Customer Inquiries with OpenAI Chat and HTTP Request

Automate customer inquiries using an AI assistant powered by OpenAI GPT and HTTP Request integration. This workflow enables real-time responses to customer questions, ensuring support is available 24/7. Features include conversation memory for engaging chats, automatic message processing for instant replies, and HTML for rich content rendering. Perfect for e-commerce businesses managing over 100 daily inquiries or SaaS platforms requiring real-time user support. Requires 1 account: OpenAI API. Save 5 hours weekly by handling unlimited customer inquiries with precise, context-aware answers from your product documentation.

330,197 views
Market ResearchAI Summarization

Automate Social Media Content Creation with Google Gemini & OpenAI

Streamline your social media content strategy with an automated workflow using Google Gemini and OpenAI GPT. This solution allows social media managers to generate, schedule, and publish posts across Facebook, Instagram, and LinkedIn seamlessly, saving hours of manual work each week. Features real-time content generation, intelligent scheduling, and integration with Facebook Graph API and Twitter API for effective outreach. Perfect for social media managers handling multiple accounts and needing consistent, engaging content for their audience. Requires 9 accounts: Google Palm API, OpenAI API, Facebook Graph API, and more. Experience up to 70% faster content creation and manage over 30 posts daily with AI-driven insights.

271,728 views
Social MediaMultimodal AI

How to Use This Workflow

1Import to n8n

  1. Copy the JSON using the button above
  2. Open your n8n instance
  3. Click “Import workflow” or press Ctrl+V
  4. Paste the JSON and click “Import”

2Before Running

Configure credentials and update service-specific settings before executing the workflow. Review required credentials in the Technical Details section above.

74