Skip to main content

I am trying to have Filemaker Pro send all records to a database in one of my Airtable bases, using a rest. Here is my filemaker script, with key/api blanked.


Send to Airtable


#Send a foundset of records to AirTable


Go to Record/Request/Page

[ First ]


#Walk through the records and create a data package of records

Loop

Set Variable [ $Names; Value:"$Names & Case( not IsEmpty($Names) ; “,”) & Airtable::cJson" ]

Go to Record/Request/Page

Next; Exit after last ]

End Loop


#Put the required wrapper around the record data and URL endpoint

Set Variable b $URL; Value:“https://api.airtable.com/v0/______/Filemaker” ]

Set Variable a $Action; Value:"-X Post" ]

Set Variable a $Authenticate; Value:" -H “Authorization: Bearer _______\”]

Set Variable e $ContentType; Value:” -H “Content-Type: application/json”]

Set Variable r $Names; Value:"{“records”: a " & $Names & " ]}" ]

Set Variable r $Data; Value:" -d @$Names" ]


#Send the records to AirTable

Insert from URL b $Response; cURL options: $Action & $Authenticate & $ContentType & $Data ]

m Select; Verify SSL Certificates ]

Exit Script b Result: True ]

John, Were you getting errors with your POST? Always add these curl options too. Curl debug is the best so you can see what you're sending and the actual response, including headers.

"--show-error " & "--dump-header $$header " & "--trace-ascii $$curl_debug "  


@John_Turquoise I know this is an old post and I was curious if you were able to get this to work. 


Reply