AI-Powered Lead Distribution: Harnessing GPT4o and Google BigQuery

Опубликовано: 21 Март 2026
на канале: Analytics with Adam
247
12

Generative AI enables us to use natural language instructions to perform automations that were previously very difficult or impossible to code. In this video, we demonstrate a Sales Lead Allocation Automation using codified intelligence stored in a database. Our example focuses on incoming sales leads that need to be allocated considering multiple rules, such as workers' specialisations and balancing workloads.

We use two database tables from Google BigQuery, querying them using magic commands. We then pass that input through GPT-4 via the OpenAI API and write the results back to the BigQuery Database.

*You will learn:*

How to query Google BigQuery Database directly from Python
How to parse output from a Large Language Model (LLM)
How to use an LLM as part of an integrated workflow

The code used in this video is available at the following link - https://github.com/analyticswithadam/....

All you need is an OpenAI API Key and Google BigQuery Sandbox.