Excelgoodies logo +40 31 2299227

LEARN THIS HANDS ON

Power Apps & Power Automate

. Live Online FILLING FAST
View all upcoming batches
5 working days, fines up to 10,000 lei: build an e-Factura deadline tracker in Teams with Power Automate

5 working days, fines up to 10,000 lei: build an e-Factura deadline tracker in Teams with Power Automate

Romanian accounting teams are now living with the same headache: invoices must be sent through e-Factura within 5 working days, and nobody wants to be the one who missed the deadline and triggered a fine. Email reminders and Excel lists get out of sync fast. This article shows how to build a robust e-Factura deadline tracker in Microsoft Teams using Power Automate, with the exact rules accountants care about.

We’ll use a realistic setup: invoices logged in a SharePoint list, a Power Automate flow to calculate the 5 working days rule, and Teams notifications that hit the right channels and people before you get anywhere near the 10,000 lei fine zone.

Scenario: an accounting team drowning in e-Factura cutoffs

You’re in a mid-sized company. The process looks like this:

  • Invoices from suppliers and sales are registered in an internal system.
  • Someone exports a daily Excel and uploads it to SharePoint or copies data into a SharePoint list.
  • A separate person must send those invoices to the Romanian e-Factura system within 5 working days from the invoice date (or from a legally defined date, depending on category).
  • The team tracks deadlines manually with filters and colored cells.

Symptoms:

  • Invoices slip through when people are on leave.
  • No central view of “what’s due today / this week”.
  • No automatic alert when a weekend or public holiday changes the effective deadline.

We’ll build:

  1. A SharePoint list as your e-Factura tracking table.
  2. A Power Automate flow that calculates the 5 working days deadline (excluding weekends) for each invoice.
  3. A daily Teams notification that lists invoices approaching or exceeding the deadline.
  4. Optional personal alerts using mention or adaptive cards.

Step 1 – Design the SharePoint list for e-Factura tracking

We’ll assume you already have a site for Finance/Accounting in SharePoint Online.

Create a new list called e-Factura Invoices with at least these columns:

  • Title (single line of text) – use this for Invoice Number.
  • InvoiceDate (Date and Time, Date only).
  • CustomerName (single line of text).
  • Amount (Number, 2 decimals, optional).
  • Status (Choice) – values like Pending, Sent, Cancelled.
  • DeadlineWorkingDays (Date and Time, Date only) – calculated by the flow.
  • DaysToDeadline (Number) – dynamic counter, updated by the flow.
  • Owner (Person or Group) – responsible accountant.
  • eFacturaSentDate (Date and Time, Date only) – when it was actually sent.

Why SharePoint list?

  • Power Automate has first-class support for SharePoint list triggers and actions.
  • Permissions can follow your Teams/SharePoint site security.
  • Easy to view and filter directly inside Teams using the SharePoint app or Lists app.

We will not use a SharePoint Calculated column for working days logic. Instead, we’ll push all business logic into Power Automate, where we can control it and adjust for future rules.

Step 2 – Working days logic: what we can and cannot automate cleanly

The legal rule is 5 working days. The system needs to:

  • Start from InvoiceDate (or another field if your legal interpretation differs).
  • Add 5 working days, skipping Saturdays and Sundays.

Out of the box, Power Automate has:

  • addDays() – adds calendar days, no weekend awareness.
  • dayOfWeek() – returns 0–6 (Sunday–Saturday).

There is no built-in function for working days or public holidays in cloud flows as of October 2026. So we:

  • Implement a simple working-day calculator that skips weekends.
  • Keep public holidays as a separate enhancement (e.g., a configuration list that the flow checks).

For most teams, “skip weekends, ignore holidays” is already a big step forward compared to manual Excel tracking. You can refine later.

Step 3 – Create the deadline calculation flow

We’ll create a When an item is created or modified flow on the SharePoint list.

3.1 – Flow trigger

  1. In Power Automate, choose Automated cloud flow.
  2. Trigger: When an item is created or modified (SharePoint).
  3. Site Address: your Finance site.
  4. List Name: e-Factura Invoices.

We’ll use one flow for both creation and updates, so any change to InvoiceDate or Status will recalc deadlines.

3.2 – Conditions: only calculate when needed

Add a Condition after the trigger:

  • If Status is equal to Pending.

If not Pending, we skip deadline calculation to avoid confusing data on cancelled or already sent invoices.

3.3 – Working days calculation using a loop

We want: DeadlineWorkingDays = InvoiceDate + 5 working days.

Approach:

  • Start from InvoiceDate.
  • Increment day by day.
  • Count only days where dayOfWeek is Monday–Friday.
  • Stop when count reaches 5.

Steps in the flow:

  1. Initialize variable varCurrentDate (String)

    • Value:
      formatDateTime(triggerOutputs()?['body/InvoiceDate'], 'yyyy-MM-dd')
      
  2. Initialize variable varWorkingDaysCount (Integer)

    • Value: 0
  3. Do until loop

    • Condition: variables('varWorkingDaysCount') is equal to 5.

Inside the Do until:

  • Compose – DayOfWeek

    dayOfWeek(variables('varCurrentDate'))
    
  • Condition – Is working day?

    • If outputs('Compose_-_DayOfWeek') is greater than or equal to 1
    • And less than or equal to 5

    (1 = Monday, 5 = Friday in Power Automate.)

    • If yes: Increment variable varWorkingDaysCount by 1.
  • Increment date: set varCurrentDate to next day

    setVariable('varCurrentDate', formatDateTime(addDays(variables('varCurrentDate'), 1), 'yyyy-MM-dd'))
    

When the loop exits, varCurrentDate will be the day after the 5th working day, because we increment at the end of each iteration. To use the actual deadline date, we need to subtract one day.

Add a Compose – DeadlineDate action:

formatDateTime(addDays(variables('varCurrentDate'), -1), 'yyyy-MM-dd')

3.4 – Calculate DaysToDeadline

We’ll store a numeric difference between today and the deadline.

Add a Compose – DaysToDeadline:

sub(
  int(formatDateTime(outputs('Compose_-_DeadlineDate'), 'yyyyMMdd')),
  int(formatDateTime(utcNow(), 'yyyyMMdd'))
)

This is a simple calendar day difference, not working days. For alerting purposes (e.g., “deadline is in 1–2 days”), calendar days are usually fine. If you need working-day difference, you can reuse the same loop pattern.

Note: We’re using yyyyMMdd as an integer to avoid dealing with time zones and partial days. This works accurately as long as you treat all dates as local calendar days.

3.5 – Update the SharePoint item

Finally, use Update item (SharePoint):

  • ID: ID from trigger.
  • Title: Title from trigger (do not change).
  • InvoiceDate: InvoiceDate from trigger.
  • DeadlineWorkingDays: outputs('Compose_-_DeadlineDate').
  • DaysToDeadline: outputs('Compose_-_DaysToDeadline').
  • Status: Status from trigger.
  • Other fields: pass-through from trigger.

Make sure the Update item action includes all required columns, otherwise SharePoint will blank fields that are not included.

At this point, every pending invoice gets a computed working-days deadline and a day difference whenever it’s created or edited.

Step 4 – Build the Teams alert: daily digest of risky invoices

Now we want a separate flow that sends a daily summary into a Teams channel.

4.1 – Scheduled flow

  1. Create a Scheduled cloud flow.
  2. Recurrence: every day at 08:00 local time.

4.2 – Get invoices at risk

Add Get items (SharePoint):

  • Site Address: Finance site.
  • List Name: e-Factura Invoices.
  • Filter Query (OData):
Status eq 'Pending' and DaysToDeadline le 2

This picks all pending invoices where the deadline is within 2 calendar days (including overdue ones where DaysToDeadline is negative).

If your list grows large, consider:

  • Setting Top Count to a reasonable number.
  • Using indexed columns in SharePoint for Status and DaysToDeadline to keep queries fast.

4.3 – Build a Teams-friendly message

Add a Compose – MessageBody with an HTML table or markdown-like text. For example, using Create HTML table then a compose.

  1. Create HTML table from value of Get items.
  2. Compose – MessageBody:
concat(
  '<b>e-Factura deadlines (next 2 days)</b><br/>',
  'Generated on: ', formatDateTime(utcNow(), 'yyyy-MM-dd HH:mm'), '<br/><br/>',
  outputs('Create_HTML_table')
)

Teams supports HTML in Post message in a chat or channel when you set Message type appropriately.

4.4 – Post message in Teams

Add Post message in a chat or channel (Microsoft Teams):

  • Post as: Flow bot.
  • Post in: Channel.
  • Team: your Accounting team.
  • Channel: e-Factura.
  • Message type: HTML.
  • Message: outputs('Compose_-_MessageBody').

Optional: if Get items returns zero rows, you can add a condition and send a short “No pending deadlines within 2 days” message instead.

Step 5 – Personal alerts for owners

Channel messages are great for visibility, but you may also want direct pings for the person responsible.

5.1 – @mentions in Teams posts

The Post message in a chat or channel action does not support dynamic @mentions directly. To mention users dynamically, use Post adaptive card and wait for a response or Post adaptive card in a chat or channel with a card payload that includes mentions.

One practical pattern:

  • Keep the daily digest in the channel.
  • Add a second flow that sends individual messages to each Owner when an invoice is 1 day from deadline.

5.2 – Individual owner alert flow

Create another Scheduled cloud flow at, say, 09:00.

  1. Get items (SharePoint) with filter:
Status eq 'Pending' and DaysToDeadline eq 1
  1. Apply to each value from Get items.

Inside the loop:

  • Condition: Owner is not empty.
  • Send message in a chat (Teams):
    • Recipient: Owner Email from the item.
    • Message:
concat(
  'Invoice ', items('Apply_to_each')?['Title'],
  ' for ', items('Apply_to_each')?['CustomerName'],
  ' (', string(items('Apply_to_each')?['Amount']), ' lei) ',
  'must be sent to e-Factura by ',
  formatDateTime(items('Apply_to_each')?['DeadlineWorkingDays'], 'yyyy-MM-dd'),
  '.'
)

This uses the Teams chat action to open a direct chat between the Flow bot and the owner, which is supported in current Microsoft Teams connectors.

Step 6 – Make it visible inside Teams

Now that the flows are running, make sure accountants actually see and use the tracker.

Practical steps:

  • Add the SharePoint list as a tab in the e-Factura channel.
  • Create a view named Deadlines – next 7 days with a filter:
    • Status = Pending
    • DeadlineWorkingDays is in the next 7 days.
  • Train the team to update Status to Sent and fill eFacturaSentDate as soon as they submit to e-Factura.

This gives:

  • A live board of deadlines.
  • Automated calculation of the 5 working days rule.
  • Daily channel alerts plus personal pings.

Step 7 – Handling public holidays (optional but important)

If your team wants to be strict about working days including public holidays, you need a holiday calendar.

Pattern that works well:

  • Create another SharePoint list: WorkingCalendar.
  • Columns:
    • Date (Date only).
    • IsWorkingDay (Yes/No).

Populate it with at least the current and next year’s dates. Mark weekends and legal public holidays as IsWorkingDay = No.

In the deadline calculation flow:

  • Inside the Do until loop, before counting the day:
    • Use Get items (SharePoint) on WorkingCalendar with filter:

      Date eq 'variables(''varCurrentDate'')'
      
    • Check IsWorkingDay from that item instead of using dayOfWeek().

This adds one more dependency but keeps your working-day logic aligned with the legal calendar, which matters when fines are on the table.

Final takeaway: move the rule into the system, not people’s memory

The 5 working days, fines up to 10,000 lei pressure is not going away. A simple Power Automate + Teams setup that calculates working-day deadlines and pushes daily alerts takes that rule out of people’s heads and puts it into a repeatable system. Start with weekends-only logic, wire it into your e-Factura channel, and iterate toward a full working calendar once the team is comfortable.

Editor's Note

This article reflects how Romanian accounting teams are codifying e-Factura working-day rules into Power Automate and Teams workflows to reduce manual tracking risk in environments where deadline compliance is critical.

Professionals who want to apply these patterns to their own data can explore Excelgoodies' Power Automate Course programme - taught live by instructors, with certification awarded once a real project is running at work.

Insights compiled through ongoing industry research and discussions within the Excelgoodies Analytics Community.

Power Automate

New

Next Batches Now Live

Power BIPower BI
SQLSQL
Power AppsPower Apps
Power AutomatePower Automate
Microsoft FabricMicrosoft Fabrics
AzureAzure Data Engineering
Explore Dates & Reserve Your Spot → Reserve Your Spot →