# List twilio sms body sent with alarm?

**URL:** <https://forum.inductiveautomation.com/t/list-twilio-sms-body-sent-with-alarm/27853>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [August 28, 2019, 8:24pm UTC](https://forum.inductiveautomation.com/t/list-twilio-sms-body-sent-with-alarm/27853 "2019-08-28T20:24:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sungkhum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sungkhum/32/10636_2.png) [@sungkhum](https://forum.inductiveautomation.com/u/sungkhum)\
**Post date:** [August 28, 2019, 8:24pm UTC](https://forum.inductiveautomation.com/t/list-twilio-sms-body-sent-with-alarm/27853/1 "2019-08-28T20:24:39Z")

</div>

Is there any way to list the Twilio sms message that was sent by an alarm?

I can list the unacknowledged alarms like this:

```auto
alarms = system.alarm.queryStatus(state=["ClearUnacked", "ActiveUnacked"])
for alarm in alarms:
    eventName = '%s' % (alarm.getName())
    eventID = '%s' % (alarm.getId())
    if eventName == 'Alarm-Twilio' or 'Twilio-Alarm-Test':
        print(eventName)
        system.alarm.acknowledge([eventID], None)

```

But I would also like to see the sms that was sent with each alarm. Is that possible?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [August 28, 2019, 8:30pm UTC](https://forum.inductiveautomation.com/t/list-twilio-sms-body-sent-with-alarm/27853/2 "2019-08-28T20:30:50Z")

</div>

The only place messages used by any given alarm notification profile might show up is in the audit log, if you’ve configured one for that profile.

---

<div class="post-metadata">

**Author:** ![sungkhum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sungkhum/32/10636_2.png) [@sungkhum](https://forum.inductiveautomation.com/u/sungkhum)\
**Post date:** [August 28, 2019, 8:32pm UTC](https://forum.inductiveautomation.com/t/list-twilio-sms-body-sent-with-alarm/27853/3 "2019-08-28T20:32:07Z")

</div>

Thanks @Kevin.Herron I’ll take a look.

---

<div class="post-metadata">

**Author:** ![sungkhum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sungkhum/32/10636_2.png) [@sungkhum](https://forum.inductiveautomation.com/u/sungkhum)\
**Post date:** [August 28, 2019, 9:38pm UTC](https://forum.inductiveautomation.com/t/list-twilio-sms-body-sent-with-alarm/27853/4 "2019-08-28T21:38:45Z")

</div>

Hi @Kevin.Herron I was able to get the sms message to an audit log, but there is no mention of the alarm UUID in that log (I’m trying to match the sms to the UUID of the alarm so I can turn it off with a script). Is there any way to get the alarm UUID to be attached in the log somehow? Sorry for all the questions. Appreciate your time.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [August 28, 2019, 9:43pm UTC](https://forum.inductiveautomation.com/t/list-twilio-sms-body-sent-with-alarm/27853/5 "2019-08-28T21:43:45Z")

</div>

Isn’t in the “Action Target” column in a format like `alarm event '$eventSource': $eventId`?

---

<div class="post-metadata">

**Author:** ![sungkhum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sungkhum/32/10636_2.png) [@sungkhum](https://forum.inductiveautomation.com/u/sungkhum)\
**Post date:** [August 28, 2019, 9:44pm UTC](https://forum.inductiveautomation.com/t/list-twilio-sms-body-sent-with-alarm/27853/6 "2019-08-28T21:44:56Z")

</div>

@Kevin.Herron You are totally right. I didn’t realize there was more data in there. Perfect. Thanks!
