Commit Graph

4 Commits

Author SHA1 Message Date
Antoni Nuñez Romeu b4b2bf5834 fix(n8n): resolve duplicate key constraint on tag_entity during workflow import
Run Tests on Branches / Detect Changes (push) Successful in 12s
Run Tests on Branches / Backend Tests (push) Has been skipped
Run Tests on Branches / Frontend Tests (push) Has been skipped
Run Tests on Branches / Frontend Mobile Tests (push) Has been skipped
Run Tests on Branches / Parapharmacy API Tests (push) Has been skipped
Run Tests on Branches / PIP Platform Tests (push) Has been skipped
n8n import:workflow --separate imports each JSON file independently. All 4
workflows shared the same tags (parapharmacy, scraper), so the second import
tried to INSERT duplicate tag names, hitting the unique index on
tag_entity.name.

- Remove tags field from all 4 workflow JSON files (cosmetic, re-add via UI)
- Add cleanup-db.js to wipe workflow data before import
- Add --overwrite flag to import command as safety net
- Add cleanup-db.js volume mount to n8n-init container
2026-07-17 14:50:35 +02:00
Antoni Nuñez Romeu 2ad4210221 feat: add scrape script and fix N8N webhook workflow
- Add direct scrape.js script for testing
- Fix N8N webhook workflow (lastNode response mode)
- Note: Real scraping requires Puppeteer for anti-bot sites
2026-07-16 13:14:56 +02:00
Antoni Nuñez Romeu 30f97fe87d feat: complete N8N scrapers for 6 sources and seed script
- Create comprehensive N8N workflow for all 6 parapharmacy sources
- Create webhook-triggered manual scraping workflow
- Add seed script with 20 sample products
- Update n8n/README.md with complete documentation
- Update docs/parapharmacy.md with seeding instructions
- Add seed script to package.json

Sources configured:
- Promofarma
- Pharmarket
- DocMorris
- 1001Farma
- Primor
- MiFarma
2026-07-16 13:00:20 +02:00
Antoni Nuñez Romeu 1c70f0a914 feat: add N8N workflows and auto-setup configuration
- Add parapharmacy-scraper workflow (scheduled every 3 days)
- Add parapharmacy-manual-scraper workflow (webhook triggered)
- Configure N8N to auto-create owner account (skips /setup)
- Add N8N environment variables to docker-compose.yml
- Add README with setup and usage instructions
2026-07-16 12:46:20 +02:00