Retrieve tweets information from url using TwitterAPI in Gsheets - twitter

I'm new here.
I followed this tutorial about adding a custom function in Gsheets.
https://blog.twitter.com/developer/en_us/topics/tips/2020/the-tweet-formula-for-google-sheets
I executed the script and it works fine, however can't call the function from my Google sheets. This is not the first time I have this problem, so I must be doing something wrong.
any ideas?

Related

Looking to import HTML information into a Google sheet

After multiple test and research I don't have success in importing the data of this table (div) into a Google slide.
None of the formula I tested actually work included this simple test to extract the first column/line "Name":
=importxml("https://ecosystem.lafrenchtech.com/lists/18872/list?showGrid=false", "//span[#class='table-column-text']")
:(
Anyone could help me ?
Thx by advance.
Answer:
I've tested your function on a test sheet and it returns an empty content.
According to an answer at Google Sheets importXML Returns Empty Value , IMPORTXML can not retrieve data which is being populated by a script and it is a limitation. Unfortunately, I have checked that when Javascript is disabled for the ecosystem.lafrenchtech.com site in Chrome browser, the table never loads. Thus, this confirms that the table is being populated by a script and this is the reason why it returns an empty content.
A possible alternative solution is to check if the ecosystem.lafrenchtech.com offers an API, where you can directly get the data that they show from their table using an API key (if it is available). However, this will require you to use Apps Script to parse the data from their API and then post it on your spreadsheet, which would be quite a tedious for a quite simple process.
Note:
On your post, google-slides was the set tag.

Trigger Google Cloud Function by change in Google Spreadsheet

I want to use a certain Google Spreadsheet as UI for a Cloud Function. For Example, I want the columns "SQLStatement", "TargetSheet" and "TargetCell" such that my colleagues can handle a GCFunction only with their SQL skills and write the results into the Google Sheets of their desire.
The script that reads the statements and writes the results is working, my problem is the trigger. The Cloud Function shall be triggered by every update of the source spreadsheet, I do not need any information to be pushed to the function.
I am doing research since a couple of days, but the more I read about Firestore, Appscript and Cloud Function Triggers the more confused I am and the farer I get from my original problem. Hence, my question is:
What is the easiest way to trigger a cloud function by an update of a certain Google Spreadsheet?
Thank you in advance!
There is no built-in trigger type to run a Cloud Function upon a change in Google Sheets.
If you want to invoke a Cloud Function upon such a condition, you will have to write the Apps Script code to respond to an onEdit event, detect the condition in that code, and then call your Cloud Function (typically a HTTP based one as shown here).

Performing Google Search In Spreadsheet And Scraping The SERP Data

I hope that you guys are fine. I want to build a simple spreadsheet and I thought I could be able to make one but blank sheet looks horrible to me. I am sure that you guys are kind enough to help me out.
I want to perform multiple Google search queries in Google spreadsheet and want to parse results of each search (top 10 results of each search)
Something like this: https://www.youtube.com/watch?v=tBwEbuMRFlI
But when I tried his given formula in description to play test, Google returned #Error to me, I don't know why.
Can you guys please help me out in making a simple spreadsheet compatible for multiple queries at once? Like one column for keywords (where I could paste my list of keywords) and then 10 columns of search results. All results for one keyword should come in one row
Something like this:
My 1st Example Query = 1st search result, 2nd search result, 3rd result and so on.
My 2nd Example Query = 1st search result, 2nd search result, 3rd result and so on.
It must be easy to code but yeah, it might be time-consuming and I would be very grateful if anyone of you could help me about it.
Looking forward to your help guys.
The problem is that you want to scrape out of Spreadsheets, that's a bad approach and is almost certainly not going to work. Even if you manage to write a scraper inside that limited environment it will easily be spotted by Google.
As you said time is not a problem, I would suggest another route.
Use a backend tool/script that scrapes the data
Use a backend tool/script that creates/modifies the Google spreadsheet
You can run such a script(s) manually on your PC or from a server full automated using a scheduler/cron job.
To create/modify spreadsheets look here: How do I access the Google Spreadsheets API in PHP?
To scrape Google look here: Is it ok to scrape data from Google results?
So this is PHP as language of choice but you can do the exactly same in Java or Python or C#
There is a third party solution like SerpApi you could use for this. It's a paid API with a free trial.
Google Sheets Add-on: SerpApi - Search Engine Results and Ranks
Example code to extract title from the first result:
=SERPAPI_RESULT("engine=google&q=coffee&location=Austin, Texas, United States&google_domain=google.com&gl=us&hl=en", "organic_results.0.title")

I want a Googlesheet to lookup and import values from api

I have a Google sheet with a list of information on customers, one being a user count from a WaaS I run.
I would like to regularly run a script that makes a http api request that returns the user count from the platform and updates the value in the Googlesheet.
How easy is this?
I never worked with the Google Sheets API, but the documentation looks good. I hope this will help, https://developers.google.com/sheets/

Rhomobile asynchttp multiple calls

Hi I am stuck using the webinars on rhomobile.com: 'Using AsyncHttp to load data from JSON'. I followed the example and its working fine. The only problem i have is everytime AsyncHttp is called the same products are parse repeatedly. Is there a way to call AsyncHttp without reapeating these outputs?. Sample code will be appreciated.
Thanks
Hmm... you make a request to the same url repeatedly and get back the same results? Sounds like it's working to me.
If you want different results, you need to request from a different url, or more simply (if you're using that products example), you'll need to add or edit some product records.
The url seems to be open (http://rhostore.heroku.com/products), so you can just navigate to that page and simple create some new products using that web application.

Resources