DEV Community

chinaabin
chinaabin

Posted on • Originally published at tutorial.gogoai.xin

Gemini 2.5 B2B Proposal Guide

Prompt Engineering for Proposal Generation in B2B Sales with Gemini 2.5 and CRM Data

What You'll Learn

  • How to extract structured data from CRM systems using Python.
  • Techniques for crafting effective prompts for Gemini 2.5.
  • Methods to generate personalized B2B sales proposals automatically.
  • Best practices for maintaining tone and accuracy in AI outputs.

This tutorial guides you through automating proposal generation. You will learn to leverage Gemini 2.5, Google's advanced multimodal model, to create high-quality business documents. We focus on integrating real-world Customer Relationship Management (CRM) data into your workflow. This approach ensures your proposals are data-driven and highly relevant. By the end, you will have a functional script that generates draft proposals. This saves time and increases conversion rates for your sales team.

Prerequisites

Before starting, ensure you have the following tools ready. These prerequisites are essential for running the code examples provided.

  • A Google Cloud Platform account with API access enabled.
  • Python 3.9 or higher installed on your local machine.
  • The google-generativeai library installed via pip.
  • Access to a sample CRM dataset (JSON or CSV format).
  • Basic understanding of REST APIs and JSON structures.

You do not need expert-level coding skills. However, familiarity with Python basics is required. You should know how to install packages and run scripts. If you are new to APIs, review basic authentication concepts first. This foundation will help you troubleshoot connection issues later.

Setting Up Your Development Environment

Begin by installing the necessary Python libraries. Open your terminal or command prompt. Run the following command to install the official Google Generative AI client. This library simplifies interactions with the Gemini 2.5 API endpoints.

pip install google-generativeai pandas python-dotenv
Enter fullscreen mode Exit fullscreen mode

Next, create a .env file in your project directory. Store your API key securely here. Never hardcode sensitive credentials directly in your source code. This practice prevents accidental exposure if you share your repository. Use the python-dotenv package to load these variables automatically.

Configuring API Credentials

Create a file named config.py. Import the os and dotenv modules. Load the environment variables from your .env file. Then, configure the google-generativeai library with your key. This setup ensures secure and consistent access to the model.

import os
from dotenv import load_dotenv
import google.generativeai as genai

# Load environment variables
load_dotenv()

# Configure the API key
api_key = os.getenv("GOOGLE_API_KEY")
genai.configure(api_key=api_key)
Enter fullscreen mode Exit fullscreen mode

Verify your setup by listing available models. Check if gemini-2.5-pro or similar variants appear. If you encounter errors, double-check your API key permissions. Ensure billing is enabled in yo


📖 Read the full tutorial on AI Tutorials →

🌐 GogoAI Network — Your AI Learning Hub:

Top comments (0)