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

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!)

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

1 Like

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:

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.

1 Like

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.

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.