Help

SMS script not working in automations, but DOES work in Blocks

Topic Labels: Extensions
1995 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Chris_DiNicolas
4 - Data Explorer
4 - Data Explorer

I am using the script from @Mike_Pennisi to send a single Welcome SMS to new records in my table. I tested it as a ‘Block’ script and it works great. But when I tried to use it in an automation, it throws an error. What is different about these two environments?

Here is the error when I paste the script into the Automation script (Works great as a block script though!)

ERROR:
TypeError: output.markdown is not a function
at main on line 58

Screen Shot 2020-09-04 at 2.24.29 PM

2 Replies 2

Confusing terminology aside, not everything is transferable from a Script Block to an Automation Script Action.

You can’t use input.anything (other than input.config) or output.text/markdown/inspect/table in an Automation Script Action. You can find which functions can be used in which environment here: Airtable Scripting

For the script to work in the Automation you have to delete the table output, and replace all your inputs with either hard-coded values or values from the Trigger record.

IngSiang_Tan
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello, I am also interested in this.

Non-coder here myself although I can read pseudo-codes a little.

My use case is as following:

Firstly, my Facebook Leads are automatically imported into my Airtable (via FB Ads CRM integration). With that, I would like to send SMS to my Leads through the Airtable Automation Script Action - phone number is provided from my Facebook Leads and the Custom Message will be provided by me through a separate Table B.

Facebook Leads that gets passed over to Airtable has a “Source” column, which usually has the name of the lead form or ad set in it.

My plan is to use this as an “identifier”, to select the Template SMS from my separate Table B, and send the SMS (to the number, also provided by Facebook Leads.

I know I can do this via Zapier but Zapier cost runs up very fast (I would rather spend the money in sending even more Twilio SMS.