Re: Receiving information from URL

1057 0
Showing results for 
Search instead for 
Did you mean: 
5 - Automation Enthusiast
5 - Automation Enthusiast

Is there a way that I can copy a word or words from a URL in any given record and paste it into another field on the same table? If so, what would that script look like?

I have a table full of records each having their own link to a specific URL (none are the same). Each link opens up a specific record on another database made to match. Within each record in this linked database (which is not airtable btw) is a place called “Contractor or Supplier” about halfway down the page where, directly next to it, is the name of a contractor or supplier. I need to know if there is a way I can have it look in that link, grab the name of the contractor or supplier, and paste that name into a “Link to another record” field within the same table.

1 Reply 1
7 - App Architect
7 - App Architect

There’s a small mistake in the terminology which may make it harder for folks to understand your goal.

To get information “from a URL” means to extract data from the location. For example, we could get the value “23” from the URL

Based on your more extended explanation, though, it’s clear that you actually want to get data from a resource–a web page in this case. That’s the “R” in “URL”, and it’s a little trickier than the “L”.

Scripts in the Scripting Block run in the browser. The web’s default security protections disallow you from doing this directly from a browser, though. There are a few ways to work around this:

  • The page may be served in a way that relaxes the security restrictions. You can read about Cross-Origin Resource Sharing (CORS) to learn more. This needs to be enabled by the web server, and it’s usually not enabled by default. If the resources aren’t already being served in this way, you may be able to contact the administrator and request a change.
  • You can write a command-line program that retrieves the data and uses the Airtable HTTP API. The API is documented here:
  • You may be able to use an integration service like Zapier or Integromat to perform the data retrieval task on your behalf. I’ve never worked with those services, but they seem to be very popular among Airtable users

Good luck!