bel-insert-file-to-crm-and-link-it

Insert files into a PostgreSQL CRM and link them to entities.

2|Updated Oct 22, 2025
One-click install
npx skills add https://github.com/bennoloeffler/bassi --skill bel-insert-file-to-crm-and-link-it
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bel-insert-file-to-crm-and-link-it
Source: https://github.com/bennoloeffler/bassi/tree/main/.claude/skills/bel-insert-file-to-crm-and-link-it
Command: npx skills add https://github.com/bennoloeffler/bassi --skill bel-insert-file-to-crm-and-link-it

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Streamlines inserting files into the CRM database and linking them to companies, people, events, or opportunities with proper encoding and metadata.

Core Features & Use Cases

  • Base64 encoding & hashing: ensures data integrity and safe storage.
  • MIME detection & file_type classification: ensures correct handling.
  • SQL generation: inserts the file record and links to CRM entities.

Quick Start

python3 scripts/insert_file_to_crm.py <file_path> --company-id 1 [--description "Contract" --tags "contract,signed"]

Frequently Asked Questions about bel-insert-file-to-crm-and-link-it

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I upload files to my CRM and link them to company or contact records?

Upload files to CRM by encoding them in base64, detecting their MIME type, and inserting them into the database with SQL while linking to a company, person, event, or sales opportunity ID. The Skill handles encoding, hashing, and metadata automatically via a Python script.

What file types can I store in the CRM database?

Supported file types include images, PDFs, Excel files, and documents. The Skill detects MIME types automatically and categorizes files accordingly during insertion.

Do I need to manually handle base64 encoding and file hashing?

No. The Skill automatically applies base64 encoding, SHA256 hashing, and MIME type detection. You provide the file path and CRM entity link; the script handles the rest via PostgreSQL insertion.

Can I attach a single file to multiple CRM entities at once?

The Skill requires at least one entity link per upload: company_site_id, person_id, event_id, or sales_opportunity_id. Each file insertion links to the specified entity; multiple attachments require separate uploads.

What's the best way to organize file metadata like descriptions and tags in the CRM?

Use optional description and tags parameters when uploading. The Skill stores these alongside the file record and entity links in the database, enabling categorization and retrieval by metadata.

Does this approach work with PostgreSQL databases?

Yes. The Skill executes SQL insertion against PostgreSQL through an external Python script, handling all database operations without embedding code in the agent context.