# Glide app with Sheets and IFTTT

**URL:** <https://community.glideapps.com/t/glide-app-with-sheets-and-ifttt/2483>\
**Category:** Ask for Help\
**Created:** [November 28, 2019, 8:26pm UTC](https://community.glideapps.com/t/glide-app-with-sheets-and-ifttt/2483 "2019-11-28T20:26:33Z")\
**Posts on this page:** 4\
**Page:** 2

<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:** [December 3, 2020, 5:31pm UTC](https://community.glideapps.com/t/glide-app-with-sheets-and-ifttt/2483/21 "2020-12-03T17:31:39Z")

</div>

Okay, this should do it:

```
function get_wiki_info() {
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var language = ss.getRangeByName('WikiLanguage').getValue();
  var url = 'https://en.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&exintro&explaintext&redirects=1&titles=' + language;
  
  var response = UrlFetchApp.fetch(url);
  var json = response.getContentText();
  var data = JSON.parse(json);
  var page_id = Object.keys(data.query.pages);
  var extract = data.query.pages[page_id].extract;
  
  ss.getRangeByName('WikiExtract').setValue(extract);
}

```

It uses two Named Ranges:

- `WikiLanguage`: a single cell range where you store the language string
- `WikiExtract`: a single cell range where the extract will be written to

---

<div class="post-metadata">

**Author:** ![Roger](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@Roger](https://community.glideapps.com/u/Roger)\
**Post date:** [December 3, 2020, 5:53pm UTC](https://community.glideapps.com/t/glide-app-with-sheets-and-ifttt/2483/22 "2020-12-03T17:53:14Z")

</div>

thank you very much.

1. Where do i execute this in Glide?
2. Also, how do I execute that API from Glide?

---

<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:** [December 3, 2020, 6:02pm UTC](https://community.glideapps.com/t/glide-app-with-sheets-and-ifttt/2483/23 "2020-12-03T18:02:14Z")

</div>

This is an Apps Script. It runs in your Google Sheet, not in Glide.  
From your Google Sheet menu, choose Tools -\> Script Editor.  
Paste the script into there.  
There are various ways to execute it… directly from the script editor, via a trigger, via a custom function, via a menu extension, etc.  
If you plan to continue down this route, you might want to spend a little time looking at the [documentation](https://developers.google.com/apps-script/reference/spreadsheet?hl=en).

---

<div class="post-metadata">

**Author:** ![Roger](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@Roger](https://community.glideapps.com/u/Roger)\
**Post date:** [December 4, 2020, 7:24pm UTC](https://community.glideapps.com/t/glide-app-with-sheets-and-ifttt/2483/24 "2020-12-04T19:24:52Z")

</div>

Thank you very much. I did not know about this in Google Sheets.

[Previous page](https://community.glideapps.com/t/glide-app-with-sheets-and-ifttt/2483.md?page=1)
