Help

Running automation by pressing button - going round in circles

Topic Labels: Automations
760 16
cancel
Showing results for 
Search instead for 
Did you mean: 
unserrer
4 - Data Explorer
4 - Data Explorer

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!

16 Replies 16
ScottWorld
18 - Pluto
18 - Pluto

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!

Arthur_Tutt
8 - Airtable Astronomer
8 - Airtable Astronomer

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

 

Screenshot 2023-11-01 121534.png

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

Arthur_Tutt
8 - Airtable Astronomer
8 - Airtable Astronomer

@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:

Screenshot 2023-11-01 124702.png

Screenshot 2023-11-01 124803.png

Screenshot 2023-11-01 125115.png

  

 

Where is that setup page? I dont recognise it?

Arthur_Tutt
8 - Airtable Astronomer
8 - Airtable Astronomer

@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). 

 

Screenshot 2023-11-01 133042.png

Screenshot 2023-11-01 133102.png

 

Screenshot 2023-11-01 133116.png

  

Arthur_Tutt
8 - Airtable Astronomer
8 - Airtable Astronomer

@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.

Arthur_Tutt
8 - Airtable Astronomer
8 - Airtable Astronomer

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). 

Screenshot 2023-11-01 142007.png

Screenshot 2023-11-01 141546.png

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.

 

Arthur_Tutt
8 - Airtable Astronomer
8 - Airtable Astronomer

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:

Screenshot 2023-11-01 153424.png

Automation Trigger Setup:

Screenshot 2023-11-01 153518.png

 

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:

Screenshot 2023-11-01 153739.png

 

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!

Arthur_Tutt
8 - Airtable Astronomer
8 - Airtable Astronomer

@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? 

unserrer
4 - Data Explorer
4 - Data Explorer

Am going to try that tomorrow thank you! Really!

Arthur_Tutt
8 - Airtable Astronomer
8 - Airtable Astronomer

Awesome, let me know how it goes!