Automatically reconcile Notion and Airtable records, update discrepancies, and send AI-generated Slack summaries with error logging to Google Sheets.
This agent works seamlessly with these platforms to deliver powerful automation.
Flexible database and CRM platform for organizing data, managing campaigns, and...
Read / Write data from / to Google Sheets
All-in-one workspace for content and collaboration with powerful database and pa...
Leverage OpenAI's powerful language models to generate text, answer questions, a...
Send messages, manage channels, and automate workflows in Slack workspaces
This powerful automation workflow acts as an intelligent data reconciliation system that continuously monitors and synchronizes records between Notion and Airtable. When discrepancies are detected, it automatically updates the correct values, logs any validation issues, and sends comprehensive Slack notifications about all actions taken. Think of it as your 24/7 data integrity guardian that ensures your databases stay perfectly aligned without manual intervention.
Key benefits include:
Perfect for these use cases:
This workflow is designed for operations managers, data administrators, and automation enthusiasts who manage critical data across multiple platforms and need absolute confidence in data accuracy.
You'll find this especially valuable if you:
Technical skill level: Intermediate – You should be comfortable with API concepts, database structures, and basic JavaScript for customizing comparison logic.
Why it's needed: Notion serves as your primary data source, providing the "source of truth" records that will be compared against Airtable.
Setup steps:
secret_)Configuration in TaskAGI:
Why it's needed: Airtable is your operational database that will be updated when discrepancies are found. This workflow both reads from and writes to Airtable.
Setup steps:
data.records:read, data.records:write, schema.bases:read
app) from the URLConfiguration in TaskAGI:
Why it's needed: Google Sheets creates a permanent audit log of any validation failures or payload structure issues, essential for troubleshooting and compliance.
Setup steps:
Timestamp, Error Type, Details, Record ID
Configuration in TaskAGI:
sheet_url parameterWhy it's needed: OpenAI's GPT-4 generates human-readable Slack summaries that explain what changed and why, making notifications actionable rather than just informational.
Setup steps:
sk-) – store it securelyConfiguration in TaskAGI:
gpt-4o model for optimal cost/performance balanceWhy it's needed: Slack delivers real-time notifications to your team when records are updated or when no action is needed, keeping everyone informed without email clutter.
Setup steps:
chat:write, chat:write.public
xoxb-)/invite @TaskAGI Notifications
Configuration in TaskAGI:
The Manual Trigger node allows you to start the workflow on-demand for testing or scheduled execution.
The Fetch Records from Notion Database node retrieves your source data.
Configuration:
{
"property": "Status",
"select": {
"equals": "Active"
}
}
The Fetch Records from Airtable node pulls comparison data.
Configuration:
app)["Name", "Count", "ID"]
100 initially, increase if needed (max 1000 per call)The Merge Notion + Airtable Inputs node combines both datasets for comparison.
Configuration:
Wait for all inputs
merged_data object containing both sourcesThe Validate Payload Structure node ensures data quality before processing.
Configuration:
merged_data.notion && merged_data.airtable &&
merged_data.notion.length > 0 && merged_data.airtable.length > 0
The Log Invalid Versioning Requests to Google Sheets node captures validation failures.
Configuration:
[
new Date().toISOString(),
"Validation Failed",
JSON.stringify(merged_data),
"N/A"
]
The Build Combined Notion + Airtable Payload function node structures data for comparison.
Configuration:
return {
notion_records: merged_data.notion.map(record => ({
id: record.id,
name: record.properties.Name.title[0].plain_text,
count: record.properties.Count.number
})),
airtable_records: merged_data.airtable.map(record => ({
id: record.id,
name: record.fields.Name,
count: record.fields.Count
}))
};
The Compare Notion Record With Airtable Record function performs the actual reconciliation logic.
Configuration:
const { notion_records, airtable_records } = result;
const discrepancies = [];
notion_records.forEach(notion_rec => {
const airtable_rec = airtable_records.find(
ar => ar.name === notion_rec.name
);
if (airtable_rec && airtable_rec.count !== notion_rec.count) {
discrepancies.push({
airtable_id: airtable_rec.id,
name: notion_rec.name,
old_count: airtable_rec.count,
new_count: notion_rec.count,
difference: notion_rec.count - airtable_rec.count
});
}
});
return { discrepancies, total_checked: notion_records.length };
The Check If Record Requires Update condition determines the workflow path.
Configuration:
result.discrepancies.length > 0
The Update Airtable Record With Corrected Count node applies corrections.
Configuration:
{{discrepancies[0].airtable_id}} (processes first discrepancy){
"Count": "{{discrepancies[0].new_count}}"
}
Note: For multiple discrepancies, wrap this in a loop node or use batch update.
Both Generate Slack Summary nodes use OpenAI to create readable notifications.
Update Notification Configuration:
gpt-4o
You are an AI assistant that writes short, clear Slack notifications.
Summarize this data reconciliation update in 2-3 sentences:
Records checked: {{total_checked}}
Discrepancies found: {{discrepancies.length}}
Updates made: {{discrepancies[0].name}} count changed from {{discrepancies[0].old_count}} to {{discrepancies[0].new_count}}
Be specific and actionable.
150
0.3 (for consistent, factual output)No Action Notification Configuration:
You are an AI assistant that generates short, clear status updates.
Write a 1-2 sentence Slack message confirming that {{total_checked}} records
were checked and all data is synchronized correctly. Keep it positive and brief.
Both Slack - Send Message nodes deliver the AI-generated summaries.
Configuration:
#data-ops){{content}} (references the OpenAI output)Data Reconciliation Bot
:robot_face: for updates, :white_check_mark: for no-actionAfter Notion Fetch:
After Airtable Fetch:
After Merge:
merged_data
After Comparison:
discrepancies arrayAfter Update (if triggered):
After Notifications:
Successful execution with updates:
Successful execution without updates:
Validation failure:
Cause: The integration doesn't have access to the database or the ID is incorrect.
Solution:
Cause: Base ID, table name, or field names don't match exactly.
Solution:
app and is correcthttps://api.airtable.com/v0/{baseId}/{tableName}
Cause: The OAuth connection doesn't have write access.
Solution: