I’m originally a programmer but I’m completely new to Airtable and the script syntax. Basically, I have a PHP file somewhere in my server that makes a GET request to Twitch and gets the follower count of any channel.
Now, I have in Airtable a list of Twitch users, with their username. What I want do to is to pass the username to my URL so that the PHP script in my server does the rest, and, posts a simple ECHO with the number of followers. Then I’ll just grab the number to update my field. A bit more graphically:
- Grab the ‘username’ field from my table ‘table’.
- Append it to my external URL, i.e. “https://mycoolphpscript.com?user=username”
- Launch the query, fetch the output, which is just a PHP echo with just a number as output, i.e. “458” (followers) - actually if you paste the URL in your browser you’d also get “458” since there’s just a PHP echo in the background.
- Update my ‘followers’ field with the result.
I know how to do 1, 2 and 4, but I have no idea how to do number 3. I’m using the “fetch” method, but I’m getting error, output format errors and plenty of exceptions. It can’t be very long nor difficult, but I’m so stuck. Any help, please?