Hi! Here is the general idea of the process that I am trying to implement in Airtable:
(1) a participant completes a survey and their results are entered into Airtable
(2) the results from that participant are automatically plotted using Vega-Lite
(3) the Vega-Lite plot is then automatically sent to the participant via email
Setting up the survey in (1) is clear to me.
For (2), I was thinking that this could somehow be implemented using AirTable scripts. I know that it is possible using AirTable automations to have the creation of a new record trigger a script to run. However, is it possible to have a script create a Vega-Lite plot using the data from the single record that was just created?
My idea for (3) was to generate a url for the Vega-Lite plot, update the record in AirTable with the url in a column and then use AirTable automations to send an email including the url. The only parts of this process that I am uncertain about is whether it is possible to:
-generate a url for a Vega-Lite plot using AirTable scripts?
-update the Airtable record with the url generated by the script?
Thanks in advance!
You are on the right track. I think the best approach would be to trigger an Airtable script to run through the automations. In the script you could use the await fetch() function to call the Vega-Lite api. Then wait for the API’s response and update the Airtable record with the url in the response. You could then send the email in the same automation through the Airtable Email action or set up a different automation to send the email from the record you updated.
Hope this helps!