/
/
Turn Teamwork.com billable time into a Business Central draft invoice
For finance teams who want billable Teamwork.com hours turned into a draft Dynamics 365 Business Central invoice by asking their AI assistant.
On this page
Connector
Connect Teamwork.com, pick your AI tool and paste the prompt.
The problem
Invoicing project time by hand risks billing twice
Turning logged time into an invoice means totalling billable hours per project in Teamwork.com, checking nothing was billed already in Dynamics 365 Business Central and keying lines by hand. Mistakes mean double billing a client or leaving hours unbilled.
Without PopdockAI
- Total billable hours per project from Teamwork.com
- Search Business Central for invoices already raised
- Key one line per project by hand
- Fix double billing after the client complains
With PopdockAI
- Billable time is totalled per project
- The customer is found, stopping if blocked or missing
- Existing invoices mentioning the projects are shown first
- The invoice is created unposted after you confirm, and its total is checked
The prompt
Use this prompt
Copy it into any AI tool connected to PopdockAI. Swap the values in braces for your own.
**Objective:** Turn the billable Teamwork time logged for client `{customer-name}` since `{from-date}` into a draft (unposted) sales invoice in Business Central company `{company}` (default: the default company), billing each project on its own line against resource or G/L account `{billing-number}`.
**Step 1: Collect the billable time**
Call `teamwork-get-companies` (Teamwork server) with `name.contains` set to `{customer-name}`. If more than one company matches, list them and ask which one is meant. Call `teamwork-get-projects` with its `company-id`. Then, for each project, call `teamwork-get-time` with `project-id`, `is-billable` set to true and `time-logged.from` set to `{from-date}` as YYYY-MM-DD. Sum `minutes` and `billable-total` per project. Leave out projects with no billable time. If nothing is billable, stop and say so.
**Step 2: Check it has not been billed already**
Call `business-central-get-customer` (Business Central server) with `name.contains` set to `{customer-name}`, and `company` set to `{company}` when given. Choose the customer whose name matches the Teamwork company. If none matches, stop and say so. Do not create a customer. If the customer is blocked, stop and say so.
Call `business-central-get-posted-sales-invoice` with `sell-to-customer-number` set to the customer-number and `posting-date.from` set to `{from-date}`, and call `business-central-get-sales-transaction` with `sell-to-customer-number` set to it and `document-type` set to Invoice. If any invoice in either result mentions one of the projects, show it and ask whether to continue.
**Step 3: Confirm the draft**
Show the invoice that would be created. The header uses the customer-number as both `customer-number` and `bill-to-customer-number`, and the external-document-number is "Teamwork time from `{from-date}`". Show one line per project: description "<project-name>: <hours> hours", quantity as hours (minutes divided by 60, two decimals), unit-price as billable-total divided by hours, and number-on-line `{billing-number}`. Show the total. Ask the user to confirm. If they do not clearly say yes, stop without creating anything.
**Step 4: Create and verify**
After the user confirms:
1. Call `business-central-create-sales-invoice` with `customer-number`, `bill-to-customer-number`, `external-document-number`, and `company` when given. Keep the returned `number`.
2. For each project, call `business-central-create-sales-invoice-line` with `document-number` set to that number, `line-type` set to Resource (or Account when `{billing-number}` is a G/L account), `number-on-line` set to `{billing-number}`, and `description`, `quantity` and `unit-price` as confirmed.
3. Call `business-central-get-sales-transaction` with `document-number` set to the new number and report the stored total against the confirmed total.
**Rules & Guidelines:**
* `teamwork-get-companies`, `teamwork-get-projects` and `teamwork-get-time` are on the Teamwork server. `business-central-get-customer`, `business-central-get-posted-sales-invoice`, `business-central-get-sales-transaction`, `business-central-create-sales-invoice` and `business-central-create-sales-invoice-line` are on the Business Central server.
* Only `business-central-create-sales-invoice` (once) and `business-central-create-sales-invoice-line` (once per confirmed line) may write, and only after the user confirms in Step 3. Do NOT call `business-central-update-sales-invoice`, `business-central-create-customer`, `teamwork-update-time-entry` or any other write tool.
* The invoice stays a draft. Nothing in this prompt posts it.
**Validation:**
* If a line is rejected, for example because the line-type does not suit `{billing-number}`, stop creating lines, report the error and the invoice number created so far, and let the user fix it in Business Central. Do not guess other line types.
* Teamwork billable totals are in the site currency. If the customer is billed in a different currency, say so before Step 3 and ask how to proceed.Who it's for
One answer, three teams that use it
Billing teams
Draft time invoices in one pass
Get one line per project with hours and rate, ready to review, without exporting and rekeying time.
Draft a Business Central invoice for Northwind Traders' billable Teamwork.com time since 1 October.
Finance controllers
Avoid billing the same hours twice
Existing invoices that mention the projects are shown before anything is created, so a second bill is caught before it goes out.
Before we bill Fabrikam for Teamwork.com time this month, check what has already been invoiced in Business Central.
Project managers
Get your project's time billed
Hand over billing with a draft built from logged time, so your work is invoiced on time and matches what was approved.
Create the Business Central draft invoice for Contoso's billable hours since the start of the quarter.
How it works
What PopdockAI does when you ask
You name the client and a start date, and your AI assistant drafts the invoice from Teamwork.com time. Nothing is created until you approve the draft, and it is left unposted.
01
Ask
You name the client and a start date.
02
Collect
It totals billable time per project and finds the customer in Business Central.
03
Check
It shows existing invoices that mention the projects.
04
Confirm
You review the draft, then it is created unposted and its total checked.
What PopdockAI provides
The tools behind the answer
Ready made tools for Teamwork.com and one secure connection to your AI tool. No code, no exports.
teamwork-com-get-companies
teamwork-com-get-projects
teamwork-com-get-time
This report is built from Get data tools only. PopdockAI applies the row, field and parameter rules your admin sets, and every query is written to the audit trail.
The outcome
Billable time becomes a reviewed draft invoice
Related use cases
More ways to put this data to work
One prompt template with infinite possibilities.
Your AI assistant adapts its approach, tone, and capabilities to match each unique context while you maintain a single, manageable workflow.
Join forward-thinking companies that are transforming their operations with intelligent, secure AI automation.

.webp)
