# Call a php script from Glide and wait for a response

**URL:** <https://community.glideapps.com/t/call-a-php-script-from-glide-and-wait-for-a-response/22557>\
**Category:** Ask for Help\
**Created:** [February 10, 2021, 3:17pm UTC](https://community.glideapps.com/t/call-a-php-script-from-glide-and-wait-for-a-response/22557 "2021-02-10T15:17:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roldy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roldy/32/36068_2.png) [@Roldy](https://community.glideapps.com/u/Roldy)\
**Post date:** [February 10, 2021, 3:17pm UTC](https://community.glideapps.com/t/call-a-php-script-from-glide-and-wait-for-a-response/22557/1 "2021-02-10T15:17:50Z")

</div>

My need would be to run a simple php script to perform some operations in the customer’s CRM, and then wait a response from the php script with a status about the completed or failed operation…  
I’ve to read this response and then perform some other action inside Glide.  
May be with webhook? Or some other way?  
Do you’ve an example?  
Thanks!  
Roldano

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [February 10, 2021, 3:22pm UTC](https://community.glideapps.com/t/call-a-php-script-from-glide-and-wait-for-a-response/22557/2 "2021-02-10T15:22:41Z")

</div>

A web hook won’t work for this, because a web hook doesn’t listen for a response. Certainly doable using Apps Script.

---

<div class="post-metadata">

**Author:** ![Roldy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roldy/32/36068_2.png) [@Roldy](https://community.glideapps.com/u/Roldy)\
**Post date:** [February 10, 2021, 3:26pm UTC](https://community.glideapps.com/t/call-a-php-script-from-glide-and-wait-for-a-response/22557/3 "2021-02-10T15:26:46Z")

</div>

Thanks @Darren_Murphy , do you’ve an example or some link reference to see?

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [February 10, 2021, 3:31pm UTC](https://community.glideapps.com/t/call-a-php-script-from-glide-and-wait-for-a-response/22557/4 "2021-02-10T15:31:00Z")

</div>

With Apps Script you would use the urlFetchApp service.

> **[Class UrlFetchApp  |  Apps Script  |  Google Developers](https://developers.google.com/apps-script/reference/url-fetch/url-fetch-app)**

If you can wait till tomorrow, I can provide some example code (it’s late here now)

---

<div class="post-metadata">

**Author:** ![Roldy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roldy/32/36068_2.png) [@Roldy](https://community.glideapps.com/u/Roldy)\
**Post date:** [February 10, 2021, 3:31pm UTC](https://community.glideapps.com/t/call-a-php-script-from-glide-and-wait-for-a-response/22557/5 "2021-02-10T15:31:29Z")

</div>

Thanks again. Good night

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [February 10, 2021, 4:01pm UTC](https://community.glideapps.com/t/call-a-php-script-from-glide-and-wait-for-a-response/22557/6 "2021-02-10T16:01:15Z")

</div>

Actually @Roldy if you look at the code in my JSON API tutorial, there is an example there.

> [@Using App Script with a JSON API](https://community.glideapps.com/t/using-app-script-with-a-json-api/20051):
>
> Somebody who shall remain nameless (@SantiagoPerez - oops) asked me if I could put together a tutorial on working with API’s, so here it is. It’s my first tutorial, so please be gentle pray Whilst there is an app at the end of this, the app is not the main focus of the tutorial, so don’t expect to be impressed by that. The main focus is to give a gentle (?) introduction to Apps Script, and demonstrate how it can be used to interface with an API endpoint. I’ve tried to break down and explain t…

It’s basically the same thing, you use UrlFetchApp to call a URL, and then process what gets returned. If you decide to use this method and need some help with the code, just give a shout.

---

<div class="post-metadata">

**Author:** ![NoCodeAndy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nocodeandy/32/62530_2.png) [@NoCodeAndy](https://community.glideapps.com/u/NoCodeAndy)\
**Post date:** [January 17, 2024, 4:53pm UTC](https://community.glideapps.com/t/call-a-php-script-from-glide-and-wait-for-a-response/22557/7 "2024-01-17T16:53:27Z")

</div>


