Help

Updating Linked Record via API - iOS Siri Shortcuts

Topic Labels: API
4529 6
cancel
Showing results for 
Search instead for 
Did you mean: 
slyfox
6 - Interface Innovator
6 - Interface Innovator

I am trying to updated a linked record via Siri Shortcuts.

I keep on getting error “value is not an array of record ids” The update is done vie Get content of URL. Request Boyd JSON.

I figured out the id of the record that I am trying to link to. I tried setting the fields text to the record ID but I still get an error.

Screen Shot 2020-07-05 at 1.41.23 PM

Service Log 1

6 Replies 6
Billy_Littlefie
7 - App Architect
7 - App Architect

Hey @slyfox

I’m not totally familiar with the Siri shortcuts parameters, but as the error message explains, the API expects an array of record IDs here (even if theres only one linked record). Is there a way to update the JSON being sent here to include an array of record IDs, instead of just a single ID?

What would the input look like?

In JSON representation, it expects the value for this field type to be an array of strings, rather than a single string – e.g. ["recABC123XYZ456", "recXYZ123ABC456"]. I’m not familiar with whatever tool is being used in your second screenshot – its possible that it’ll correctly parse it correctly as an array if you just type it out (e.g. ["recABC123XYZ456"]), but it wouldn’t surprise me if it just treats whatever you type there as a long string. I’m not sure if there is an option in that tool to enter complex / non-string data as field values.

slyfox
6 - Interface Innovator
6 - Interface Innovator

The tool is Siri Shortcuts. Here is what it looks like, maybe you can suggest the proper format based on this video (specific time mark)?

I’ve only briefly dabbled with Siri Shortcuts, but shortly after the time mark you set for that video, there’s a clue to what you need. Whenever this guy goes to make a new item, look at the list of options that pops up. From what @Billy_Littlefield mentioned earlier, Airtable is expecting an array of record IDs, and one of the options you have for making a new item is an array. If you do that, then put your record ID into that array, my gut says it should work.

ShortcutsFan
6 - Interface Innovator
6 - Interface Innovator

The current `Service` key in the dictionary is text type, you need change it the List type and add a item into it. 

We've built a iOS Shortcuts Library with near 20 comprehensive shortcuts inside, you can join the Library and send a mail to us about your issue, we could provide you a very close example for your reference: dub.sh/0lYZkfh