Project hours and stock to reviewed invoices in easybill
At the end of each period, this flow rebuilds every project's draft invoice in easybill from unbilled hours and stock drawn, then asks the project manager before completing.
The prompt
At the end of each billing period, go through the draft invoices in easybill that belong to a project. For each one, take the project's time entries dated after the last invoiced period and the stock drawn against that draft, price them from our position list, and replace the draft's lines with the full set, along with the service period. Then send the project manager a summary in Slack with Complete the invoices and Leave them as drafts buttons, and wait. If they choose complete, complete each draft so it gets its number.
FlowRunner Prompt to Flow built this flow from that request. Here it is as it opens in the editor.
The flow
Inside the loop: For each draft invoice
Inside the loop: For each reviewed draft
Download the file, then in FlowRunner click + beside Flows, pick it under Import a Flow Version and click Create. How importing works
What each step does
- Read the project invoices Lists the invoices in easybill, both drafts and completed ones, and the projects they belong to.
- Read the hours Lists the time entries booked in easybill. The flow also reads the stock drawn against each draft invoice and the position catalog with its prices and VAT rates.
- Build each invoice's lines For every draft invoice on a project, takes the hours dated after the last completed invoice's service period up to yesterday, plus the stock drawn against the draft, and turns them into invoice lines with the new service period. When no project has new hours or materials, the run ends here.
- Replace the draft's lines Sends the complete line set and the service period to each draft that has something to bill. Lines sent on an update replace the old ones, so lines typed onto the draft by hand are replaced too.
- Ask the project manager Posts the drafts to Slack, one line per project with hours, material lines, net total and service period, and two buttons, Complete the invoices and Leave them as drafts.
- Wait for the project manager's answer The run waits for the click, so the project manager can check or edit the drafts in easybill first.
- Complete the invoices? Complete the invoices goes on. Leave them as drafts keeps them open, and the reply in Slack says the next run rebuilds their lines from what is recorded by then.
- Complete the invoice Finalizes each draft, which gives it its number and locks it, then replies in the Slack thread with how many invoices were completed.
Before you turn it on
- Enter your easybill API key and connect your Slack account.
- Copy the URL of the block Wait for the project manager's answer into the flow setting Answer link. The Slack buttons open it.
- Pick your Slack channel in the three Slack steps.
- Keep one draft invoice open on each project you bill, and book materials with a stock entry against that draft.
- Set the flow to run on a schedule at the end of your billing period, for example on the first of each month.