> For the complete documentation index, see [llms.txt](https://software-help-docs.gitbook.io/knowledge-base/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://software-help-docs.gitbook.io/knowledge-base/software-guide/workflows/using-a-workflow-and-smart-list-to-track-failed-sms-contacts.md).

# Using a Workflow and Smart List To Track Failed SMS Contacts

If you are sending SMS communications in our software, and the SMS fails to go through, you may want to track those contacts for a variety of reasons (i.e. perhaps you want to call or email them to confirm their mobile number for SMS communications.) You can create and save a smart list to compile Contacts with failed SMS actions and use a Workflow to update this smart list in real-time.

Follow these steps to learn how to create a Smart List and Workflow to achieve this:

**Step 1: Create a Smart List Based on a “Failed SMS” tag**

{% embed url="<https://lh3.googleusercontent.com/66CSYGWcBMA47RWWkVXea4abOpghYxxLZcKFVitJOOUTMivW6l8ROM52uwVXKnpoc6hC_DFyuhDAJcrFb7FMcchVk6GDmGwQ-o4VOjsEFQQcaQLqYTbTdHPk26Vmv9bm6_0ivdI1geCqY8VXysvz6mw>" %}

* Navigate to Contacts > Contacts/Smart Lists.
* Click More Filters
* Choose “Tag” and then select “Is” and choose the tag you will be using for failed SMS.
  * NOTE: You can use an existing tag or create a new one, such as “Failed SMS”.

{% embed url="<https://lh6.googleusercontent.com/q7I7Xdg-T3hurOrTt_ptvLCjn5wfJwE4Yi-zzvIfHzUZifsXhnNv94guwQttvhJwLZzzG8SJmUiiDR17lxWDV7BD7VwbX3aTN_mgc3T531R3bezOgeQPdGzeaH4zG9vabqCs6YVZTGgPE0mbGVzcpAY>" %}

* Click “Apply” to save your filter.

{% embed url="<https://lh5.googleusercontent.com/6btMhAmeTe0hAGKaT2yRmN6h-iMfg5T78qQHdW7QxmWexNL5u6g5IffqD_4Y3hTFsaZXyMVTsiM1kqnbPzJZM4Zp4QBBjmXqyGZvHX1ilh1JSRarTWaOsS1e2NVYzAxtb6UQPESWit5K024ItOYO48I>" %}

* At the bottom of the window, click “Save as smart list” to save the filter(s) as a permanent list in our software. (You can always edit or delete this list later.)

{% embed url="<https://lh5.googleusercontent.com/FE_XhDY5zLsu_IkwLrBBbirm25KUHlw5pMfnEy1LNAkeF2mGN6IS0qDkU4AA-w2MYJZMJuY14-Sm0ovipb6jyt_tK7IeeDSwdyKStw98N22Rv0I2pmTwrH0fUXVCwgR0OkBRsfBwD0gKyYvMitAqPt8>" %}

**Step 2: Create a Workflow to Apply Your Tag**

* Create a new Workflow in the builder, and set up a trigger for “Twilio Validation Error”.
* Filter by “Error Is” and choose “SMS Incapable”.
* Save the trigger.

{% embed url="<https://lh5.googleusercontent.com/9PXa8h52-QamzZdnD2D-PoOKoGkWAjkgH-NlXorjW8zY1IBumHOlXyyyqD0iDCcyvMntH-mIEIozXptYf49VmQJNllfbUbr4w09lMk8OHiUhJXTuk7tk-ILpWJ2oZ-YGpQ4ElLYmM-afp03tXyu4V7w>" %}

* Add an action to the Workflow.
* Choose “Add Contact Tag” and type in the name of the tag you created in Step 1 (such as “Failed SMS”.)

{% embed url="<https://lh5.googleusercontent.com/rOGaX897l_5dOT3VRgn0YTo1bzwpwOczOQOMTddrkQ6lhBLnBi7485MbN56tgDcuzvoRsKRuFw91-7OogzraXGlnHJ4HzwI6Wxwa1OmwDO88AxSl69xenp65yX68d-IZz7Iq95f3iwEf9jTgGtUXrTI>" %}

* Save the action.
* Save and publish your Workflow.

Now, anytime the Twilio system recognizes that an SMS fails/errors, our software will apply your “Failed SMS” tag to the contact (because of the Workflow.) Your saved Smart List of Contacts will be updated in real-time with anyone who has that tag. You can then determine if you want to manually go through that list to resolve issues or create another workflow to automate another type of follow-up (perhaps a call or email) to those Contacts.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://software-help-docs.gitbook.io/knowledge-base/software-guide/workflows/using-a-workflow-and-smart-list-to-track-failed-sms-contacts.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
