See llms.txt for all machine-readable content.

Back to Templates

Collect B2B leads with Dievio and Google Sheets

Quick overview

Search for B2B contacts with Dievio through an authenticated webhook, save matching work-contact fields to a fixed Google Sheets tab, and return a row count. Each call retrieves one bounded page of results.

How it works

  1. Receive a POST webhook request protected by a separate Header Auth credential, containing search filters and optional result settings.
  2. Validate the request, require a configured spreadsheet destination, and return an HTTP 400 JSON response when the input is invalid.
  3. Build one Dievio Search API request with a fixed endpoint, one result by default and a maximum of 100.
  4. Normalize the returned records into the configured columns: names, job title, company, location, available work email and phone, LinkedIn URL and status fields.
  5. Append matching rows to the fixed Google Sheets tab using RAW cell values, then return counts and the hasMore flag.
  6. When there are no matching records, skip Google Sheets and return writtenRows: 0. No automatic pagination or deduplication is performed.

Setup

  1. In Webhook In, configure a Header Auth credential with header name X-Webhook-Secret. Your calling client must send the private value you choose.
  2. In Run Dievio Search, select a DIFFERENT Header Auth credential with header name X-API-Key and your own Dievio API key. API calls use your Dievio API credit balance.
  3. In Prepare Request, replace REPLACE_WITH_SPREADSHEET_ID with your spreadsheet ID and set the tab name. Connect a Google Sheets credential in Append Rows To Google Sheets and add the column headers from the README.
  4. Listen for a TEST webhook event. POST a JSON body with maxResults: 1 and filters, with Content-Type: application/json and your webhook secret. Use includeEmails: true and emailStatus: work if you require a stored work email.
  5. Inspect the returned counts and the sheet. No matches should return writtenRows: 0 without a Sheets call. Once your test works, activate the workflow and switch your client to the production webhook URL.

Requirements

  • An n8n instance, a Dievio API key with API credits, and a Google account with edit access to the target Google Sheets document.

Customization

  • Change the supported Dievio search filters, maxResults from 1 to 100, includeEmails, includePhones and emailStatus. Configure the spreadsheet destination directly in Prepare Request.

Additional info

Setup and example request: https://dievio.com/integrations/n8n
Source and exact column headers: https://github.com/hundevmode/n8n-dievio-b2b-lead-collector-template

The template is free. Dievio API calls use API credits. Contact fields may be unavailable for some profiles; this workflow does not check email deliverability. Phone retrieval is opt-in. Repeating a webhook call can create duplicate sheet rows. If Google Sheets fails after a successful API search, inspect the n8n execution before retrying.