I’ve a table of stock transactions (Stock Symbol, Transaction Type, Price, Owner) & another table for users (Owner & Phone number).
Would like to have a Automation bot, that groups Transactions by Owner to calculate the Sum of Price & send the summary by a message to Phone number (so only one message per schedule)?
If I understand correctly, the "Owner " of the Transaction is who you also wish to send the summary to?
By this I assume you wish an automation that runs on a Schedule and there is a Date range of Transactions for which you wish to summarize? What this means is that when the automation runs you need some way to identify the proper “schedule” that the automation is using to gather transactions for. You could deduce it by the date the the automation runs OR use a lookup on a Table that tracks the Schedules.
So…it would need to work like this:
Create an automation that runs on the list of Owners since that is who you will be sending the resulting message to.
Add a step that generates the message to the Owner. In the body of that message, you can provide the details and use an expression to produce the SUM - which is likely what you are most interested in.
That message body might be something like the below - I am “deducing” the Schedule Dates and assuming the automation runs on the 1st of each month producing a SUM for the previous months’s transactions:
_**-- Use angle brackets in message body for AppSheet functions --**_
Schedule Start Date: <<EOMONTH(TODAY(), -2) + 1>>
Schedule End Date: <<EOMONTH(TODAY(), -1)>>
Last Month Transaction Summary = <<SUM(Transactions[Price], AND([Owner] = [_THISROW].[Owner ID],
[Transaction Date] >= EOMONTH(TODAY(), -2) + 1,
[Transaction Date] <= EOMONTH(TODAY(), -1)
)
)>>