Process invoice emails: download PDF attachments, extract vendor + date, generate normalized filename, and send to Holded inbox via n8n webhook.
Goal: send invoice/receipt PDFs to Holded's inbox email after normalizing their filenames. Prefer direct Gmail delivery via gog; the old n8n webhook is legacy fallback only.
Configure defaults in ~/.config/skills/config.json under holded_invoices:
company_emailfreelancer_emailsender_emaildrive_inbox_folder_id (optional, archives a copy before sending)webhook (legacy fallback)Example:
{
"holded_invoices": {
"company_email": "empresa@holdedbox.com",
"freelancer_email": "autonomo@holdedbox.com",
"sender_email": "sender@example.com",
"drive_inbox_folder_id": "drive-folder-id"
}
}
Filename convention:
<company>-<YYYY>-<MM>.pdfgoogle).scripts/invoice-extract.js --pdf /path/to/invoice.pdf
{ vendor, vendorSlug, year, month }scripts/holded-send.sh --pdf /path/to/invoice.pdf --email <holdedbox> --nombre google-2026-01.pdf
gog gmail send with the configured sender_email or --from.drive_inbox_folder_id or --drive-folder is set, first uploads the normalized PDF to that Drive folder.--dry-run before changing the workflow or debugging auth.scripts/holded-upload.sh --pdf /path/to/invoice.pdf --email <holdedbox> --nombre google-2026-01.pdf
webhook config or --webhook.Downloads the first PDF attachment, suggests a filename, and (optionally) uploads.
scripts/holded-from-gmail.sh --account <gmail-account> --message-id <id> --type empresa|autonomo
--email-empresa, --email-autonomo, --from, and/or --drive-folder.--webhook forces the legacy n8n path.Flags:
--yes skip confirmation and uploadWhen reviewing an email thread with a PDF invoice:
empresa or autonomo.invoice-extract.js to infer vendor + year/month.holded-send.sh so Drive/Gmail return observable output.If extraction fails, ask for vendor + date and continue.
Category:business