Populate variables using external data?


#1

I don’t suppose there’s anyway to populate variables in webCoRE by using external data such as a Google sheet?


#2

A few ways are possible:

  • The easiest way is Outbound requests if there is an API or JSON available
    (always my first choice whenever possible)
  • If you went the other direction, Inbound pushes can work if sent as arguments at the end of the piston’s URL… (example here)

I don’t think webCoRE can scrape webpages yet, although you definitely get my vote for that feature… :+1:


I sometimes use PHP to scrape changing data from external webpages.
(this works best when the webpage layout stays the same)


#3

Also interested in this. Is it possible to pull data from my Google calendar?


#4

There are a couple of pistons out there that do just that…


#5

Honesty what I’m ultimately trying to do is scrape a sports broadcast schedule and based on the date and time have an automation run accordingly. I knew it was a far out request but ya never know when it comes to webCoRE because of how much it can do.


#6

@WCmore I looked at your other example and yes I’ve used those in the past, but I’m thinking the outbound would be more in line with what I’m trying to do. Can you provide some examples how you are using this type of coding? And how would you know if they have an API or not?


#7

There are lots of API examples scattered around on the forum.
Here is one example for querying the Naval Observatory.


Poke around their website looking for any of these keywords: API, JSON, or Feeds…
Sometimes a good link can be found at a webaddress ending in .PHP.

Unfortunately, some sites have none of these options, so I might have to resort to a different site.


#8

Oddly enough a google search revealed there’s some sort of API available but no idea what to do or what I can do with it.


#9

It looks like you need to sign up to get an API_key. Not sure what the trial covers, or how long it lasts, and they do not post their prices without joining first.

Once you have a API_key, you can test in their sandbox.