# Grab phone numbers and email from text

**URL:** <https://community.glideapps.com/t/grab-phone-numbers-and-email-from-text/64686>\
**Category:** Ask for Help\
**Created:** [August 4, 2023, 3:31am UTC](https://community.glideapps.com/t/grab-phone-numbers-and-email-from-text/64686 "2023-08-04T03:31:00Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [August 5, 2023, 1:54am UTC](https://community.glideapps.com/t/grab-phone-numbers-and-email-from-text/64686/2 "2023-08-05T01:54:25Z")

</div>

My way of doing this is using a text prompt and OpenAI:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/4/0405153f4f05a043f06c062dcc108c36032b19a1.png)

```auto
Given an input like this:

"{I}"

Can you return a JSON structure of all phone numbers and emails in the input?

A sample structure would look like this:

{
"phone": "+123456789,+123456790",
"email": "example@gmail.com,example2@gmail.com"
}

Please return just the JSON and nothing else.

notalk;justgo.

```

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/3/63f0685ba700e9332aa645ea11b021e20c9d3722.png)

Then you can query the JSON to return the final strings.

---

_[View the full topic](https://community.glideapps.com/t/grab-phone-numbers-and-email-from-text/64686)._
