Twilio debugging

Hi. I’m using Twilio for the first time and encountering an error. I’ve narrowed it down to 1) “Buffer is not defined”, which I’m not familiar with, and 2) a Recipient Phone Number field in a run function block asking for a valid variable, and at the same time asking for a phone number format.

As far as I can tell, my Twilio phone number and credentials are active and accurate. Note I’ve changed the recipient phone number in the attached screenshot as not to put my personal phone number out there.

Sharing another screenshot. Could only upload one initially.

Hi, could you please try the new Send SMS block instead? It will remove the headache from trying to deal with custom functions!

Hi. I’m using the Sent Text Message block. I presume this is the same as Send SMS block?

No, delete that block and go to View All Blocks and select Send SMS

Getting closer…I’ve replaced the Send Text Message block with the Send SMS block, however, I’m looking to include a delayed SMS function. Is that something supported within the block, or is there a workaround?

Agent purpose/workflow: Daily morning check to see if a certain sports team is scheduled to play that day. If so, send SMS 15 minutes before scheduled game start time (not at time agent runs).

I think what’s happening is the agent runs in the morning, but is unable to delay the SMS if it finds game conditions are met/true, so there’s currently no output.

Ah, yeah, that’s going to be a little more complex!

One way you could do it would be to:

Have one workflow that checks in the morning if the team is playing. If it is, write the message that will be sent and save it to a global variable like global.queuedMessage

Then, make another workflow in the same agent that runs every 5 minutes or something like that, and all that workflow does is check whether there is a message to be sent. If there is, it sends it. Otherwise, it ends with no output.