Integrating forms with Airtable for data collection
Airtable is a tabular database with a convenient interface. When integrating forms with Airtable, each submission creates a new record in the base — with field typing, filters, views, and automation opportunities via built-in Airtable Automations.
Airtable REST API
class AirtableService
{
public function createRecord(string $baseId, string $tableId, array $fields): array
{
$resp = Http::withToken(config('services.airtable.api_key'))
->post("https://api.airtable.com/v0/{$baseId}/{$tableId}", [
'fields' => $fields,
]);
return $resp->json();
}
}
// Using when submitting form
class ContactFormController extends Controller
{
public function submit(Request $request): JsonResponse
{
$data = $request->validate([
'name' => 'required|string|max:100',
'email' => 'required|email',
'phone' => 'nullable|string',
'message' => 'required|string|max:2000',
]);
app(AirtableService::class)->createRecord(
config('services.airtable.base_id'),
config('services.airtable.table_id'),
[
'Name' => $data['name'],
'Email' => $data['email'],
'Phone' => $data['phone'] ?? '',
'Message' => $data['message'],
'Date' => now()->toDateTimeString(),
'Source' => $request->header('referer'),
'Status' => 'New',
]
);
return response()->json(['success' => true]);
}
}
Airtable Automations
After creating a record, Airtable can automatically:
- Send email notification via built-in Gmail/Outlook
- Create a task in Asana/Monday
- Send Slack message
- Run webhook to third-party system
This allows implementing part of business logic directly in Airtable without additional code.
Implementation time: 1 working day.







