当前位置: 首页 > Skill >

外贸开发信撰写

外贸开发信撰写

外贸开发信撰写

B2B cold email sequence generator with Intelligence Hierarchy System and Gmail API integration. Generates personalized 3-email sequences and sends directly via Gmail.

1.0.1 2026.11.15 384
获取Skill文件查看使用说明
作 者:苏安 许可证: 更新时间:2026.11.15
本文目录展开

Foreign Trade Email Writer (Professional Edition)

B2B cold email sequence generator with Intelligence Hierarchy System and Gmail API Integration for foreign trade professionals.

What's New in v2.1.0

  • Gmail API Integration: Send emails directly from your Gmail account
  • Reuse Existing Auth: Leverages foreign-trade-email-sorter credentials
  • One-Command Send: Generate and send emails in one step

Intelligence Hierarchy System

This tool implements a 3-tier intelligence system that adapts email content based on the information you have available:

Mode Trigger Approach
Precise -c <company> -p <painpoint> Full personalization with known company/pain point
Auto -u <url> Auto-research from company URL
Blind -mail-only Generic outreach with industry trends

Three-Email Strategy

  1. Email 1: Building Connection (low-pressure introduction)
  2. Email 2: Delivering Value (address pain points with certificates)
  3. Email 3: Call to Action (urgency + clear CTA)

Quick Start

Prerequisites

  1. Python 3.x installed
  2. Google API libraries: pip install google-api-python-client google-auth-httplib2 google-auth-oauthlib
  3. Tavily API Key: Set TAVILY_API_KEY environment variable for website research
  4. Gmail credentials: Copy credentials.json from foreign-trade-email-sorter or create new one
  5. First authorization: Run once to authorize Gmail, token will be saved

See SETUP.md for detailed setup instructions.

Complete Workflow (Recommended)

# Run the complete workflow script
.scriptsrun-workflow.ps1

This will guide you through:

  1. Select Mode: Choose Precise/Auto/Blind
  2. Input Customer Info: Website URL, company name, pain points, etc.
  3. Auto Research: (Auto mode) Analyze website using Tavily API
  4. Generate Emails: Create personalized 3-email sequence
  5. Send Email: Send via Gmail API

Manual Usage (PowerShell)

# Generate and display emails
.scriptsb2b-cold.ps1 sequence -mode precise -c "Tech Corp" -p "long lead times"

# Send email directly via Gmail
.scriptssend-email.ps1 -To "client@example.com" -Subject "Hello" -Body "Email content"

# Or use Python directly
python scripts/gmail_sender.py --to "client@example.com" --subject "Hello" --body "Email content"

Mac/Linux (Bash)

# Generate emails
bash scripts/b2b-cold.sh sequence -mode precise -c "Tech Corp" -p "long lead times"

# Send via Gmail API
python3 scripts/gmail_sender.py --to "client@example.com" --subject "Hello" --body "Email content"

Commands

Command Purpose
sequence Full 3-email sequence with intelligence mode
first Email 1: Connection
second Email 2: Value
third Email 3: Action
subject Subject lines only
followup Follow-up email
send Send queued emails via SMTP (PowerShell only)
queue Show pending emails
clear-queue Clear send queue

Gmail API Commands

Command Purpose
send-email.ps1 Send email via Gmail API (PowerShell)
gmail_sender.py Send email via Gmail API (Python)

Options

Option Description Example
-i Industry textile, electronics, packaging, machinery, consumer, general
-c Target company "Fashion Brand Inc"
-co Country "USA", "Germany"
-p Pain point "long lead time"
-v Value proposition "7-day fast delivery"
-s Sender name "Mike Zhang"
-sc Sender company "ABC Textile Co."
-u Target URL "www.targetclient.com" (auto mode)
--mail-only Blind mode No specific info needed

Gmail API Setup

Option 1: Reuse existing credentials (Recommended)

If you have foreign-trade-email-sorter configured:

# Copy credentials
copy "..foreign-trade-email-sortercredentials.json" "scripts"

# First run will authorize and save token
python scripts/gmail_sender.py --to "test@example.com" --subject "Test" --body "Hello"

Option 2: Create new credentials

  1. Visit Google Cloud Console
  2. Create a project or select existing
  3. Enable Gmail API
  4. Create OAuth 2.0 Client ID (Desktop app)
  5. Download credentials.json to scripts/ folder

First Authorization

On first run, the script will:

  1. Open browser for Gmail authorization
  2. Request permission to send emails
  3. Save token to scripts/token.json

Intelligence Modes

Precise Mode (Path A)

Full personalization when you know:

  • Customer name
  • Company name
  • Specific pain point

Uses reference-based hooks like "I've been following your company..."

Auto Mode (Path B)

Auto-research from URL when you only have:

  • Company website URL

The system will:

  1. Fetch and analyze the website
  2. Detect business type (manufacturer/distributor/retailer)
  3. Identify industry from keywords
  4. Match pain points from industry knowledge base

Blind Mode (Path C)

Generic outreach when you only have:

  • Email address
  • Industry/Country

Uses industry-wide hooks like "Recent regulatory changes in {country} are affecting how {industry} companies approach..."

Sending Emails

Method 1: PowerShell Wrapper (Recommended)

# Send single email
.scriptssend-email.ps1 -To "client@example.com" `
    -Subject "Quick question about your sourcing" `
    -Body "Email content here..."

# Send from file
.scriptssend-email.ps1 -To "client@example.com" `
    -Subject "Hello" `
    -BodyFile "email.txt"

Method 2: Python Direct

python scripts/gmail_sender.py 
    --to "client@example.com" 
    --subject "Quick question" 
    --body "Email content..."

Method 3: Complete Workflow

# 1. Generate email
.scriptsb2b-cold.ps1 first -mode precise -c "Tech Corp" -p "long lead times" > email.txt

# 2. Send email
.scriptssend-email.ps1 -To "client@example.com" -Subject "Hello" -BodyFile "email.txt"

Supported Industries

  • textile: Fabrics, fashion, sustainable materials
  • electronics: Components, quality control, stock management
  • packaging: Custom packaging, eco-friendly materials
  • machinery: Industrial parts, OEM/ODM services
  • consumer: Retail products, flexible MOQ
  • general: Universal template

Industry Knowledge Base

Each industry includes:

  • Pain points for targeted messaging
  • Relevant certifications (ISO 9001, CE, OEKO-TEX, etc.)
  • Trending topics for modern outreach

Full Examples

Generate and Send (Precise Mode)

# Generate
.scriptsb2b-cold.ps1 sequence `
  -mode precise `
  -i textile `
  -c "Fashion Brand Inc" `
  -co "USA" `
  -p "quality inconsistency" `
  -v "7-day fast delivery" `
  -s "Mike Zhang" `
  -sc "ABC Textile Co."

# Send first email
.scriptssend-email.ps1 `
  -To "client@fashionbrand.com" `
  -Subject "Quick question about your textile sourcing" `
  -Body "Hi there..."

Auto Mode with Gmail Send

# Generate
.scriptsb2b-cold.ps1 sequence -mode auto -u "www.targetclient.com" -co "Germany"

# Send
.scriptssend-email.ps1 -To "contact@targetclient.com" -Subject "Hello" -BodyFile "generated_email.txt"

Requirements

  • Windows: PowerShell 5.0+ or Python 3.x
  • Mac/Linux: Bash 4.0+ or Python 3.x
  • Python packages: google-api-python-client, google-auth-httplib2, google-auth-oauthlib
  • Gmail API credentials: credentials.json in scripts/ folder

File Structure

foreign-trade-email-writer/
├── scripts/
│   ├── b2b-cold.ps1          # PowerShell email generator
│   ├── b2b-cold.sh           # Bash email generator
│   ├── gmail_sender.py       # Gmail API sender (NEW)
│   ├── send-email.ps1        # PowerShell wrapper for Gmail (NEW)
│   ├── settings.json         # SMTP settings (legacy)
│   └── credentials.json      # Gmail API credentials (optional)
├── SKILL.md                  # This file
├── README.md                 # Detailed documentation
└── CHANGELOG.md              # Version history

Trigger Words

  • 外贸开发信
  • 外贸邮件
  • 开发信
  • cold email
  • foreign trade email
  • B2B outreach
  • sales email
  • email sequence
  • 销售邮件
  • 客户开发
  • Gmail发送
  • 发送邮件

License

MIT License

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,040
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,033
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,021
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,021
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,019
OpenAI的Jalapeno芯片未落地,教你分辨300兆瓦算力消息

OpenAI计划在SB Energy租赁的数据中心部署约300兆瓦自研Jalapeno推理芯片,但目前双方仍处于洽谈阶段,交易细节与上线时间表均未公布。本文带你按报道原文核实项目所处阶段,厘清芯片发布、电力功率与实际推理算力的边界,并将融资意向与签约、开工、投运节点分开追踪,避免误将规划容量计入现有算力。

2026.12.02 1,016
Skill 文件
  • SKILL.md
    • Foreign Trade Email Writer (Professional Edition)
    • What's New in v2.1.0
    • Intelligence Hierarchy System
    • Three-Email Strategy
    • Quick Start
      • Prerequisites
      • Complete Workflow (Recommended)
      • Manual Usage (PowerShell)
      • Mac/Linux (Bash)
    • Commands
    • Gmail API Commands
    • Options
    • Gmail API Setup
      • Option 1: Reuse existing credentials (Recommended)
      • Option 2: Create new credentials
      • First Authorization
    • Intelligence Modes
      • Precise Mode (Path A)
      • Auto Mode (Path B)
      • Blind Mode (Path C)
    • Sending Emails
      • Method 1: PowerShell Wrapper (Recommended)
      • Method 2: Python Direct
      • Method 3: Complete Workflow
    • Supported Industries
    • Industry Knowledge Base
    • Full Examples
      • Generate and Send (Precise Mode)
      • Auto Mode with Gmail Send
    • Requirements
    • File Structure
    • Trigger Words
    • License
  • 项目或源文件

相关 Skill

更多
linkedin-api linkedin-api LinkedIn API integration with managed OAuth. Share posts, manage profile, and access LinkedIn features. Use this skill when users want to share content on LinkedIn, get profile/organization information, or interact with LinkedIn's platform. Advertising features (campaigns, ad accounts) require additional OAuth scopes — verify granted scopes before use. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Requires network access and valid Maton API key.
Webex Webex Webex API integration with managed OAuth. Send messages, manage rooms and teams, list memberships, handle webhooks, manage people and team memberships. Use t...
NextJS Frontend Development + Integration NextJS Frontend Development + Integration Generate production-ready Next.js projects with TypeScript, Tailwind CSS, shadcn/ui, and API integration. Use when the user asks to build, create, develop, or scaffold a Next.js application, web app, full-stack project, or frontend with backend integration. Prioritizes modern stack (Next.js 14+, TypeScript, shadcn/ui, axios, react-query) and best practices. Also triggers on requests to add features, integrate APIs, or extend existing Next.js projects.
Google Apps Script Google Apps Script Google Apps Script API integration with managed OAuth. Manage Apps Script projects, deployments, versions, and execute script functions. Use this skill when...
Cold Email Sequence Cold Email Sequence 生成个性化冷邮件序列并附带跟进。支持多种框架(AIDA、PAS、BAB)、A/B 变体以及合并字段个性化。痛点...