Hi good people. I'm building a base to track my handstand progress. I'd like the base to go to Pexels (or another free source for images) each morning, grab a picture of someone doing a handstand, and add it to "today's" record. Can anyone head me in the right direction to build this automation? Or have some advice/insight on how to make this happen? Appreciated in advance. 😁
Solved
Add Daily Image from Pexels or Other Free Image Site
Best answer by itsmike
Hi Ed,
Is the goal to simply pull in a random image of somebody doing an handstand for each of your newly created rows?
If so the best bet is an automation that triggers a script when a new record is created. The script calls the Pexels API and returns an image which is then added the record.
- The automation documentation is here: https://support.airtable.com/docs/when-record-is-created-trigger and https://support.airtable.com/docs/run-a-script-action
- And the Pexels API documentation can be found here: https://www.pexels.com/api/documentation/?language=javascript#photos-search
- You may also need an additional step to convert the retrieved image URL to an attachment, that's covered here: https://community.airtable.com/t5/show-tell/native-url-to-attachment/td-p/116584
If you're familar with Javascript it's just a case of following the docs and conforming to Airtable's API. If not it may be more of a challenge, in which case it may make more sense for somebody to build it for you, but this is where I'd begin.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.