Jun 02, 2020 05:58 PM
Looking at this issue regarding sending ‘single’ message using scriptiing block which was resolved by @Mike_Pennisi i was wondering if we could also be able to using script block/ Twilio to calculate how much it will cost to send a certain SMS to a number of users? Also a way to get the budget per group or assigned group.
And lastly using script block calculate the total cost and and enable/disable the sending according to the actual budget.
Has anyone worked on something similar ? or found a hack around this…
Jun 02, 2020 06:48 PM
Twilio’s REST API includes resources for estimating pricing, so this definitely seems possible! I’d start by reviewing Twilio’s API documentation:
Jul 16, 2020 10:04 AM
@Lubem_Mtile if the “Send SMS” block estimated the cost of sending the messages and if it displayed that estimate when prompting you to confirm the operation, would that address your needs?
Your request is specifically in terms of the Scripting Block–are there specific things you are trying to achieve that are only possible in the Scripting Block?
Jul 16, 2020 05:37 PM
@Mike_Pennisi Sure that would very much address my needs!
Yes, Considering that we are looking into moving away from a third party SMS platform, this is the best approach for now having everything in airtable, among other reasons…
Aug 24, 2020 09:50 AM
Aug 26, 2020 11:36 AM
@Lubem_Mtile Interesting challenge. I haven’t actually got into the scripting block yet, but just finished doing some work with Twilio automations. Pricing wise, should be fairly easy to estimate.
$0.75 per text (under 160 characters). Over 160 characters, you can take the length of the message, divide by 153 and round up, then multiply by $0.75 for cost. (Twilio breaks longer messages up into 153 character segments, the 7 lost characters are used for data to connect the messages together on the other end).
So with the length of the messages and the number of recipients, you should be able to estimate the price fairly easily. You could have a column in your table for ‘budget’ and compare the estimate to the budgets for that.
You may have already figured this all out, just thought I’d share. After I have some experience working on airtable scripts, I’ll check back and see if I can offer some code samples 😃
Aug 26, 2020 07:56 PM
Thanks @Kris pretty much set up but not perfect! Would explore automations as well for just estimation.