Workflow to calculate a price in calendar notes field


I have a shared bills calendar with my wife which have recurring and new bills that we add as they arrive

They are titled in the following format,

House Repayment - $401

I currently have a workflow created by Rosemary which selects a range of the next 7 days from that calendar creates a PDF of all bills within that range with the corresponding date of each bill

At any given time we need to calculate those bills for the week we do it manually using the calculator and switching back and forth to enter the amounts

What I’m wanting to do however is to take the bill amount of each bill and calculate it between that same certain range of 7 days and have display the total

I’m not sure if workflow can extract part of an event title so I was thinking of adding the bill cost into the notes field and have it extract from the then calculate and repeat with each and format it in the same nice PDF format

Does anyone have a workflow like this or can someone help out and make one for me please?

If it can’t have both the calendar event bill title as well as the bill amount extracted into a PDF I would be happy to just have it take the total from the notes field and calculate the total of each amount working that range

Here is the workflow I’m currently using,

You can use regular expressions to extract the bill amount from the calendar title:


Just exchange the currancy symbol. This will extract just the amount, nothing else and will match any single “£”

If you place this in your “repeat with each” loop, you can extract the amount of the bill and then add it to a “Total Bill” variable and have it summed up.

The “Match Text” Workflow element is in the “Text” elements.

Hope this helps.

Thanks Tony

I have no idea how to put this together or in what order

Could you put this together for me to look at and visualise this?

I forgot to mention that some bills are in the format of $401 and some have a decimal point $217.75 so not sure if this will play a part of the code

Here’s what it extracts and displays with just the bill title from the calendar event


Just starting a run of shifts so it will be a few days before I can put any time into this.

No problem thanks for your help Tony