Skip to main content

Hello

Trying to do something very basic.

I have created an automation where all the steps confirmed as working except the trigger which is a button trigger. My understanding is to connect a button to the trigger I have to select it in the interface.

So I go to the interface, add button but under Choose Automation no automations are showing. Quick Loom here.

Any help much appreciated!

Very bizarre. I setup my base the same way as you did, and on my interface, I *am* successfully seeing the list of automations that are set to the "button trigger". So I'm not really sure what's going on! What happens if you delete and re-create your interface page from scratch all over again? Same problem? If so, you might need to reach out to support@airtable.com about this issue.


Very bizarre. I setup my base the same way as you did, and on my interface, I *am* successfully seeing the list of automations that are set to the "button trigger". So I'm not really sure what's going on! What happens if you delete and re-create your interface page from scratch all over again? Same problem? If so, you might need to reach out to support@airtable.com about this issue.


Tried that and not changed!


@unserrer so close - right below where you're clicking is the automation select 🙂

 


@unserrer so close - right below where you're clicking is the automation select 🙂

 


That's the problem - it won't let me press that!


@unserrer When you setup your interface, were you able to select the table and records? This forms the basis of the source for the interface. 

From the interface setup steps:

  

 


@unserrer When you setup your interface, were you able to select the table and records? This forms the basis of the source for the interface. 

From the interface setup steps:

  

 


Where is that setup page? I dont recognise it?


@unserrer From your Interface page click the '+' button to create a new interface OR click 'add page' to configure a new page (if you don't see that option, click on the white space inside your interface). 

 

 

  


@unserrer one more question - what style of layout are you using for your interface? (List, Record View etc..)


@unserrer one more question - what style of layout are you using for your interface? (List, Record View etc..)


So here's my Loom. I'm wondering if because I'm using blank to start with the button isn't given a source? I'd like to use a list but can't put a button on a list interface from what I can see.


Got it @unserrer - thanks for the video that was very helpful! So I believe in this case the issue is the 'Blank' template, which is not properly connecting to your table/records.

Remember that a trigger for an automation has to be triggered from a specific record, but in List View with all records present, Airtable won't know which record triggered it. See the problem?

A couple thoughts:

Could you try creating a Record Review style layout and then add your button and list as elements? (screenshots). 

If that works, great. If not, can you tell me a little more about what your automation is intended to do, and what data it needs to trigger? There might be better ways of setting up the trigger for the automation. 

 


Got it @unserrer - thanks for the video that was very helpful! So I believe in this case the issue is the 'Blank' template, which is not properly connecting to your table/records.

Remember that a trigger for an automation has to be triggered from a specific record, but in List View with all records present, Airtable won't know which record triggered it. See the problem?

A couple thoughts:

Could you try creating a Record Review style layout and then add your button and list as elements? (screenshots). 

If that works, great. If not, can you tell me a little more about what your automation is intended to do, and what data it needs to trigger? There might be better ways of setting up the trigger for the automation. 

 


Let me try and explain what I am trying to do.

I have a whole bunch of records. I want to go through them, select a few (have created a checkbox property so that the automation can work with them) and then output the records I have selected to a CSV.

Ideally list interface would be best so I don't have to go through each record.

 


hey @unserrer alright I've got something for you. May not be a perfect solution, but will get the job done. As I understand it you've got the export to CSV automation working fine, it's just about having the correct trigger to launch it. Recorded a Loom Video to take you through step by step. Here's my example:

*** Remember to change all my Table / Field / Variables to match yours ***

Base Setup:

Automation Trigger Setup:

 

Automation Script (to get data of ALL records with export box checked)

var dataTable = base.getTable("Form Data")

var dataQuery = await dataTable.selectRecordsAsync({fields: ["Field A", "Field B", "To Export"]})

var dataRecords = dataQuery.records;

console.log(dataRecords)



var exportDataType = dataRecords[0].getCellValue("To Export")

// console.log(exportDataType)



var exportedData = [];



for (var i = 0; i < dataRecords.length; i++) {

if (dataRecords[i].getCellValue("To Export") == true ) {

exportedData.push({

"Field A": dataRecords[i].getCellValue("Field A"),

"Field B": dataRecords[i].getCellValue("Field B")

})

}

}



console.log(exportedData)

 

 Automation Output:

 


hey @unserrer alright I've got something for you. May not be a perfect solution, but will get the job done. As I understand it you've got the export to CSV automation working fine, it's just about having the correct trigger to launch it. Recorded a Loom Video to take you through step by step. Here's my example:

*** Remember to change all my Table / Field / Variables to match yours ***

Base Setup:

Automation Trigger Setup:

 

Automation Script (to get data of ALL records with export box checked)

var dataTable = base.getTable("Form Data")

var dataQuery = await dataTable.selectRecordsAsync({fields: ["Field A", "Field B", "To Export"]})

var dataRecords = dataQuery.records;

console.log(dataRecords)



var exportDataType = dataRecords[0].getCellValue("To Export")

// console.log(exportDataType)



var exportedData = [];



for (var i = 0; i < dataRecords.length; i++) {

if (dataRecords[i].getCellValue("To Export") == true ) {

exportedData.push({

"Field A": dataRecords[i].getCellValue("Field A"),

"Field B": dataRecords[i].getCellValue("Field B")

})

}

}



console.log(exportedData)

 

 Automation Output:

 


That's amazing! Thank you so much! I've still got my fundamental question though - my automation seems to work but Airtable isnt letting me assign an automation to the button!


@unserreryeah it's super frustrating, but I think you're trying to do something that Airtable is not designed for (hence why the automation option is grayed out for you).

I gave you a solid workaround, will it get the job done for you for now? 


Am going to try that tomorrow thank you! Really!


Awesome, let me know how it goes!


Reply