Hey everyone! I’m trying to make a shortcut for adding records to Airtable but I’m stuck. I’ve got the POST part working to create a record (using a dictionary and array instead of JSON). The problem is with fields that link to other tables. I can’t figure out how to make a popup for picking names from a list.
What I want is for the shortcut to ask for:
Value (in euros)
Category (pick from a list)
Payment Method (pick from a list)
For whom? (pick from Users table, optional)
What? (optional field)
Then it should add all this info as a new record in Airtable.
I’ve already made the shortcut fetch data from each table, but I’m lost on how to proceed from here. Any ideas on how to set up these input prompts and send the data to Airtable? Thanks a bunch for any help!
hey mate, i’ve done somethin similar before. for the linked fields, try using ‘choose from menu’ in shortcuts. it lets u pick from a list. for the optional stuff, add an ‘if’ before it so users can skip if they want. just gather all the inputs, make a dictionary with field names and values, then use that in ur POST action. good luck!
I’ve implemented something similar for my work’s expense tracking system. Here’s what I found effective:
For Categories and Payment Methods, the ‘Choose from List’ action is indeed your best bet. Populate these lists with your pre-fetched data from Airtable.
For the Users field, I’d suggest using a combination of ‘Ask for Input’ with a text completion list. This allows for both selection and manual entry, offering more flexibility.
The Value field is straightforward with ‘Ask for Input’ and a number keyboard, as you’ve likely already set up.
For the optional ‘What?’ field, I’d use a conditional ‘Ask for Input’ that triggers only if the user indicates they want to add details.
After collecting all inputs, construct your dictionary and use it in your POST request. Remember to handle any potential errors in the API response to ensure data integrity.
This approach has served me well in creating efficient, user-friendly Airtable input shortcuts.
I’ve actually tackled a similar challenge with Airtable shortcuts before. Here’s what worked for me:
For the linked fields like Category and Payment Method, use the ‘Choose from List’ action in your shortcut. You can populate this list with the data you’ve already fetched from your tables.
For the Users table (For whom?), again use ‘Choose from List’ but add an ‘If’ statement before it to make it optional. Something like ‘If user wants to add a person, then choose from list.’
The Value field is straightforward - just use ‘Ask for Input’ with a number keyboard.
For the optional ‘What?’ field, use another ‘Ask for Input’ action, but wrap it in an ‘If’ statement to make it skippable.
Once you’ve gathered all inputs, create a dictionary with your field names as keys and the collected inputs as values. Then use this dictionary in your existing POST action.
It took some trial and error, but this approach has worked well for me. Hope it helps!