ufi-init¶
Plugin: ufi
Category: Other
Command: /ufi-init
/ufi-init — Set Up a New UFI Event¶
One-command setup for a new UFI event. Creates the config, folder structure, and optionally installs the scraper schedule and runs the initial scrape.
Arguments¶
- Positional (optional):
"Event Name" "participant_url" "start_date"— e.g.,/ufi-init "UFI Europe 2026 Rome" "https://www.ufieurope.org/list-of-participants" "2026-06-15" - If no arguments, prompt interactively.
Workflow¶
Step 1: Collect Event Details¶
If arguments are provided, use them. Otherwise, ask the user using AskUserQuestion:
- Event name — e.g., "UFI Europe 2026 Rome"
- Participant URL — the UFI participant list page
- Event start date — YYYY-MM-DD
- Event end date — YYYY-MM-DD (defaults to start date)
Step 2: Generate Event Slug¶
Convert event name to a filesystem-safe slug:
- Lowercase
- Replace spaces with hyphens
- Remove special characters
- Example: "UFI Europe 2026 Rome" → ufi-europe-2026-rome
Step 3: Validate URL¶
Use WebFetch or a Python request to verify the participant URL is reachable:
If unreachable, warn the user and ask whether to proceed anyway.
Step 4: Create Pipeline Folder Structure¶
import sys
sys.path.insert(0, '<path-to-plugins/ufi/src>')
from ufi_pipeline.config import init_pipeline_dirs, EventConfig
config = EventConfig(
event_slug=slug,
event_name=name,
event_tag=tag,
event_date=start_date,
event_end_date=end_date,
participant_url=url,
airtable_base="appiHEZpBUKiob9CD",
)
pipeline_dir = init_pipeline_dirs(config)
This creates:
Step 5: Write config.yaml¶
Write the config file using the Write tool to pipeline-data/{slug}/config.yaml:
event_slug: {slug}
event_name: "{name}"
event_tag: "{tag}"
event_date: {start_date}
event_end_date: {end_date}
participant_url: "{url}"
airtable_base: appiHEZpBUKiob9CD
schedule:
frequency: daily
matching:
auto_approve_threshold: HIGH
require_review: [MEDIUM, LOW]
The event_tag should follow the pattern: "UFI {region} {year} - {city}" (lowercase region and city). Ask user to confirm the exact tag string, as it must match Airtable exactly.
Step 6: Find or Create Airtable Event Record¶
Check if the event already exists in the UFI events table:
from ufi_pipeline.airtable_client import get_api_key, list_all_records, create_records, UFI_EVENTS_TABLE_ID
api_key = get_api_key()
events = list_all_records("appiHEZpBUKiob9CD", UFI_EVENTS_TABLE_ID, api_key)
# Search for matching event name
If not found, create it:
new_event = create_records("appiHEZpBUKiob9CD", UFI_EVENTS_TABLE_ID, api_key, [
{"fields": {
"Name": event_name,
"Participants list (URL)": url,
"Event-Startdate": start_date,
"Event-Enddate": end_date,
}}
])
Store the record ID in config.yaml as ufi_event_record_id.
Step 7: Install Schedule (Optional)¶
Ask the user: "Install daily scraper schedule? [Y/n]"
If yes:
Step 8: Initial Scrape (Optional)¶
Ask: "Run initial scrape now? [Y/n]"
If yes:
Step 9: Summary¶
Print:
Event setup complete:
Name: {event_name}
Slug: {slug}
Config: {config_path}
Airtable: {record_id}
Schedule: {installed/not installed}
Participants: {count from initial scrape, or "not scraped yet"}
Next step: Run /ufi-sync to process participants.
Important Notes¶
- The Airtable base ID is always
appiHEZpBUKiob9CD(VisiTrans CRM). - The pipeline data root is:
~/Library/CloudStorage/OneDrive-VisiTransGmbH/VisiTrans - Dokumente/3-VisiFair/02-Projekte/F010 - UFI Konferenzen/pipeline-data/ - The event tag MUST match the Airtable UFI event record name exactly.
Python Module Locations¶
All in plugins/ufi/src/ufi_pipeline/:
- config.py — Config model, loader, directory scaffolding
- cli.py — CLI commands (scrape, schedule, etc.)
- airtable_client.py — Airtable API operations
- scheduler.py — macOS launchd management