ferrero-opentext/Python-Version/config/config.yaml
DJP 357d7f2285 Configure separate Box folders for A1→A2 and A2→A3 workflows + Make.com webhook
Configuration Updates:
1. Separate Box folder IDs in .env
   - BOX_ROOT_FOLDER_A1_A2=348304357505 (master asset downloads)
   - BOX_ROOT_FOLDER_A2_A3=348526703108 (agency uploads to process)

2. Real webhook URL configured
   - Make.com: https://hook.us1.make.celonis.com/3f9ztwl8qnljufo0l65utfv5wvvnt9m5
   - Auth type: none (Make.com doesn't require auth)

3. BoxClient enhanced
   - Accepts optional root_folder_id parameter
   - Defaults to root_folder_a1_a2 from config
   - Logs which folder is being used
   - A2→A3 can use different folder

4. Notifier auth handling
   - Supports: bearer, basic, none
   - Skips auth headers if type=none

Test Results - COMPLETE SUCCESS:
 A1→A2 uploads to correct folder (348304357505)
 Status updated A1 → A2
 Webhook sent successfully to Make.com
 Email sent successfully via SMTP
 All 3 master assets processed
 Campaign completed

Folder Structure:
- 348304357505: Master assets with tracking IDs (A1→A2)
- 348526703108: Agency processed files (A2→A3 input)

Python automation COMPLETE, TESTED, and WORKING!

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-30 17:59:15 -04:00

106 lines
2.5 KiB
YAML

# Ferrero Content Scaling - Main Configuration
# All settings can be overridden by environment-specific configs
# Environment selector (set via ENV environment variable)
environment: ${ENV:-staging}
# DAM Configuration
dam:
base_url: ${DAM_BASE_URL}
auth_url: ${DAM_AUTH_URL}
client_id: ${DAM_CLIENT_ID}
client_secret: ${DAM_CLIENT_SECRET}
timeout_seconds: 120
# Box Configuration
box:
enterprise_id: ${BOX_ENTERPRISE_ID}
client_id: ${BOX_CLIENT_ID}
client_secret: ${BOX_CLIENT_SECRET}
jwt_key_id: ${BOX_JWT_KEY_ID}
rsa_private_key_path: ../Box-config.json
passphrase: ${BOX_PASSPHRASE}
# Separate folders for different workflows
root_folder_a1_a2: ${BOX_ROOT_FOLDER_A1_A2} # For downloaded master assets (348304357505)
root_folder_a2_a3: ${BOX_ROOT_FOLDER_A2_A3} # For agency uploads to process (348526703108)
webhook_signature_keys:
- ${BOX_WEBHOOK_PRIMARY_KEY:-}
- ${BOX_WEBHOOK_SECONDARY_KEY:-}
# Database Configuration
database:
host: ${DB_HOST:-localhost}
port: ${DB_PORT:-5433}
database: ferrero_tracking
user: ${DB_USER}
password: ${DB_PASSWORD}
# Polling Configuration (A1→A2)
polling:
enabled: true
interval_seconds: 300 # 5 minutes
max_campaigns_per_run: 10
# Webhook Configuration (A2→A3 receiver)
webhook_receiver:
enabled: true
host: 0.0.0.0
port: 5000
validate_signatures: true
# Outgoing Webhooks (we call these)
webhooks:
campaign_status_update:
enabled: true
url: ${CAMPAIGN_STATUS_WEBHOOK_URL}
timeout_seconds: 10
retry_on_failure: true
max_retries: 3
auth:
type: none # bearer, basic, or none
token: ${WEBHOOK_AUTH_TOKEN:-}
# Retry Configuration
retry:
max_attempts: 3
backoff: exponential # exponential, linear, fixed
initial_delay_seconds: 5
max_delay_seconds: 60
# Notification Configuration
notifications:
enabled: true
smtp:
server: ${SMTP_SERVER}
port: ${SMTP_PORT}
user: ${SMTP_USER}
password: ${SMTP_PASSWORD}
sender_email: ${SENDER_EMAIL}
recipients:
success:
- ${REPORT_EMAILS}
errors:
- ${ERROR_EMAIL}
critical:
- ${ERROR_EMAIL}
templates_path: config/email_templates.yaml
# Field Configuration
fields:
mappings_file: config/field_mappings.yaml
# Logging Configuration
logging:
level: INFO
format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
file:
directory: logs
max_bytes: 10485760 # 10MB
backup_count: 5
console: true
# Temp File Configuration
temp:
directory: temp/downloads
cleanup_after_hours: 24
max_size_mb: 1000