Bokio logo Bokio automation · runs weekly

Create and send Bokio invoices from a list of jobs

At the end of the week you have a list of jobs in a note or a spreadsheet, and every line has to be typed into a new Bokio invoice before it can go out.

Cotlet does it in your own Bokio account with list_customers, create_customer, create_invoice, publish_invoice and send_invoice, called by your AI agent, an n8n workflow or a script.

Hosted · nothing to install or maintain

Can Bokio do this on its own?

Bokio's API can create a customer, create a draft invoice, add line items and publish it (checked 14 Oct 2026). It does not email the invoice: Bokio's publish endpoint states the invoice will not be emailed automatically when published through the API, and Zapier's Bokio app has actions to create and update invoices but none to send one. The email step has to be done in the app.

How you do it in Bokio today

  1. Go to Fakturering > Fakturor and click Ny faktura.
  2. Search for the customer, or click Skapa ny when the customer is missing.
  3. Click Lägg till ny rad for every job, pick a saved article or click Skapa ny, and set quantity, price and VAT.
  4. Check the terms (betalningsfrist, dröjsmålsränta) and the dates, then choose a delivery method, for example E-post direkt till kund.
  5. Click Skicka och publicera. Bokio assigns the invoice number only now, so a draft has none.

How to create and send Bokio invoices from a list of jobs

Prompt

Here are this week's billable jobs for Nordlys Design AB. Create one Bokio invoice with a line for each job, show me the total, and after I say OK publish it and email it to their finance address.
  1. 01

    Find or create the customer

    list_customers searches by name first. The agent calls create_customer only when no customer matches, so a repeat client never gets a duplicate record.

  2. 02

    Build the draft

    create_invoice receives one line per job with quantity, unit price and tax rate. Bokio has no per-item discount, so the agent adds a discount as a line with a negative price.

  3. 03

    Show the total before anything is issued

    The agent reads net, VAT and total from the draft response and checks that they match your list. A mismatch stops the run; the draft reaches nobody.

  4. 04

    Publish

    publish_invoice turns the draft into a published invoice with an invoice number and payment reference. It waits for your OK by default.

  5. 05

    Email it

    send_invoice emails the published invoice to the addresses you gave, as a link to a PDF or an attached PDF. It also waits for your OK by default.

What you get back

Example data

Customer: Nordlys Design AB (existing)
Draft created: 2 lines, net 10 500 SEK, VAT 2 625 SEK, total 13 125 SEK
Published as invoice 2026-1042, due 2026-11-13
Emailed to ekonomi@nordlys.example

Other ways to ask

  • Create the invoice as a draft only and tell me the total. Do not publish.
  • Every Friday, invoice the hours in this timesheet to each client, one draft per client, and list them for me to review.
  • Add a line with a negative price for the 10% agreed discount before the total.
  • Publish the draft invoices from this morning and email each one to its customer's finance address.

What Bokio allows, and what to know first

  • Bokio's API creates an invoice as a draft with status draft and no invoice number; the number is assigned when the invoice is published.
  • Bokio does not support discounts per invoice line, and its API guide adds a line with a negative unit price instead.
  • Bokio can email an invoice to up to four recipients at once, and a customer can have up to three contact persons.
  • If an invoice is sent as a link to a PDF, Bokio shows whether each recipient has opened it.
  • Invoicing is not included in the Basic plan; Bokio sells it there as an add-on.

publish_invoice and send_invoice ask for your OK by default. To run it weekly without you, switch confirmation off for those tools in your dashboard.

Sources: Bokio Help: Hur skapar jag en faktura? · Bokio Help: Skicka faktura till flera mottagare · Bokio API docs: Getting started with the Invoice API · Bokio API docs: Publish an invoice · Bokio pricing

Call create_invoice from a script

curl

curl -X POST https://cotlet.dev/api/v1/bokio/customers/c7a1e5d2-3b94-4f60-9a1d-5e2f0b8c6d11/invoices \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"currency":"SEK","invoice_date":"2026-10-14","due_date":"2026-11-13","lines":[{"description":"Website audit","quantity":8,"unit_price":1200,"tax_rate":25},{"description":"Hosting setup","quantity":1,"unit_price":900,"tax_rate":25}]}'

Example response

{
  "invoice_id": "f2d84b1a-6c30-4e97-8a5b-1d9c7e3a40b2",
  "status": "draft",
  "invoice_number": null,
  "customer": "Nordlys Design AB",
  "currency": "SEK",
  "invoice_date": "2026-10-14",
  "due_date": "2026-11-13",
  "total_amount": 13125,
  "total_tax": 2625
}

MCP: add https://cotlet.dev/mcp/v1 with the same key; the call is bokio_write → create_invoice. Example data.

Schedule it in n8n, Make, Zapier or cron

Bokio tools this automation uses

Cotlet Bokio tools used to create and send Bokio invoices from a list of jobs
Tool Parameters
list_customers search, page, page_size
create_customer name, type, email, org_number, vat_number
create_invoice customer_id, currency, invoice_date, due_date, lines
publish_invoice invoice_id
send_invoice invoice_id, recipients, attach_pdf
All 13 Bokio tools with descriptions

Frequently asked questions

Is it safe to connect Bokio to Cotlet?

Yes. You sign in to Bokio yourself, in your own Cloud Browser in the EU, and we never save your password. Your agents only get Bokio once you enable it, every background request is listed, and the browser profile is stored encrypted with AES-256-GCM, the cipher 1Password uses for its vaults. The AI model never sees a login, posts and messages wait for your OK, and Disable for agents cuts access in one click. Independent scanners grade cotlet.dev A+ on Qualys SSL Labs, securityheaders.com and Mozilla Observatory; live results are on https://cotlet.dev/security.

Give your agent access to Bokio.

Free 7-day trial with 2,000 credits, no card needed. Cotlet is independent and not affiliated with Bokio.