Latenode

Automate lead generation, sync data to your CRM seamlessly

This template builds a lead list and sends first-touch email. A webhook receives industry, location, and how many companies to fetch. Apify runs your scraper actor.

JavaScript picks the best email from each row. Google Sheets appends the company, then Gmail sends a templated message when an email exists. Connect Apify, Google Sheets, and Gmail. Put the Apify API key on the Apify connection.

Updated Sep 16, 2026Est. run: 16sEst. cost: $0.001
How Latenode estimates time and cost

Latenode bills workflow runtime in CPU seconds. The first 10,000 CPU seconds are free each month, then usage follows pay-as-you-go CPU-second pricing. Plug-and-Play (PnP) AI nodes are billed separately—each PnP token is $1 USD, charged pay-as-you-go at vendor cost plus a small processing fee, with no API keys required.

Full pricing — how CPU seconds work →

Workflow preview

What this template does

  • Builds a company list from Apify and stores it in Google Sheets
  • Picks a contact email in JavaScript
  • Sends a templated Gmail message when an email exists
  • Updates the sheet with send status so you can see what went out

How it works

1
Trigger

Receive the search

The scenario starts when you post industry, location, and a lead count to the webhook.

2
Action

Scrape companies

Apify runs the actor you choose and returns company name, website, phone, address, and category. Put the Apify API key on the Apify connection.

3
Logic

Find the email

JavaScript picks or parses the best email from each scraped row.

4
Action

Save the lead

Google Sheets appends company, website, phone, address, and email.

5
Action

Send outreach

When an email was found, Gmail sends a templated message using the company name. The sheet row is updated with send status and time.

Setup guide

1

Add the webhook

Add a webhook trigger. POST industry, location, and how many leads to fetch.

2

Connect Apify

Add an Apify connection and paste your Apify API key there. Pick the actor that scrapes companies for the industry and location you send.

3

Connect Google Sheets

Add a Google Sheets connection. Use a sheet with columns for company, website, phone, address, email, and send status.

4

Connect Gmail and wire the send

Add a Gmail connection. After JavaScript returns an email, append the Sheets row, send the templated Gmail message, then update that row with sent-at. Skip the send when no email was found.

Requirements

An Apify account, actor, and API key stored on the Apify connection
A Google Sheet Latenode can append to and update
A Gmail account that can send the outreach template
A webhook client that can POST industry, location, and lead count

FAQ

Common questions about this template

Each run uses credits on your Latenode plan. We charge for processing time (1 credit = 30 seconds). Your actual cost depends on your plan and how long the run takes. See pricing plans for plans and how credits work.

More templates

You might also like

Browse all templates →

Create a Pipeline deal from a new Discord channel message

Sales teams often miss leads buried in Discord conversations. This scenario captures every new message in a chosen Discord channel and creates a corresponding deal in Pipeline, using the message text as the deal description and the author's username as part of the deal name. Sales managers and business development reps can log inbound signals from team discussions directly into Pipeline CRM without manual data entry. The connection turns Discord into a lead source, so no opportunity slips through the cracks.

8s~$0.002

Create a Pipeline deal when a new HubSpot deal is added

Manually copying deal data from HubSpot to Pipeline wastes time and risks errors. This automation triggers on the New Deal event in HubSpot and then runs the Create Deal action in Pipeline, mapping the deal name, amount, and associated contact email and name. Sales operations teams and CRM administrators who use both HubSpot and Pipeline can eliminate duplicate data entry. HubSpot captures the initial deal, and Pipeline receives a matching record immediately, so both systems stay aligned without manual work.

8s~$0.002

Send a Gmail welcome email when ClickFunnels identifies a new contact

Manually sending welcome emails to new leads is slow and risks missed follow-ups. This scenario triggers on the New Contact Identified event in ClickFunnels and immediately sends a Send Email action in Gmail, using the contact's name and email address to personalize the message. Sales and marketing professionals who use ClickFunnels to capture leads can automate their first touchpoint. Gmail sends a custom welcome email with the contact's name in the body, so every new lead gets a timely, personal reply without manual work.

8s~$0.002