Connecting Automations to a Base for Run History
Best answer by Alexey_Gusev
Hi,
you can set up automation on some 'central point' base, triggered by 'webhook received'.
During setup, it will generate webhook link. In every automation, you can add script step, using the link in variable addr in code.
const {report}=input.config() // if you don't need report, remove this line
const addr='https://hooks.airtable.com/workflows/v1/genericWebhook/appQmDMU..'
const [base, autoName]=['Base Name Here' , 'Automation Name here']
let payload={
'Base': base,
'Automation Name': autoName,
'Execution Report':report // ..and this line
}
const options={method:'POST', body: JSON.stringify(payload),
headers:{'Content-Type': 'application/json'}}
const responce=await fetch(addr,options);
const result=(responce.ok)? await responce.json() : responce.statusText;
console.log(result)after you perform test run, webhook will be sent and you can finish automation setup on the central point. For example, create record for each event, with base and automation name.
Note that if you install step in the end of automation, you will not be informed if it fails.
Of course, you can register 'start' and 'end', and use 2 steps - at the beginning and at the end. And (for example), add formula field, which displays alert for records, when start time present but end time absent.
But that's up to you.
I'm using another approach - in the most important automations I added 'Send mail' step, and send them to me, where mail filter packing them to mail folders. Sometimes I need to take a quick look.
After counter was added, it's enough for more detailed view in each base.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
