-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Airtable CDP destination, creating records per-event #25656
Conversation
📸 UI snapshots have been updated4 snapshot changes in total. 0 added, 4 modified, 0 deleted:
Triggered by this commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, great work! 👍
One addition you could still do is to check if the returned request is something other than 200, and then throw an error.
I've seen code like this in other functions:
if (res.status >= 400) {
throw Error(f'Error from api.attio.com (status {res.status}): {res.body}')
}
Size Change: 0 B Total Size: 1.14 MB ℹ️ View Unchanged
|
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
…tHog/posthog into add-cdp-airtable-destination
Problem
Allows teams invested in Airtable to integrate events from PostHog into their databases.
Changes
Adapts
template_webhook
with the following changes:https://api.airtable.com/v0/
, concatenating path components for base ID and table nameContent-Type
andAuthorization
fieldsfields
per Airtable API spec and allow typecasting so things likeevent.timestamp
convert tidily to Airtable field types likeDate
.POST
method.Does this work well for both Cloud and self-hosted?
It should not make a difference.
How did you test this code?
Run PostHog locally, using the built-in Destination testing UI to verify it would successfully create records in an Airtable base. It does!
For neither love nor money could I coerce the pre-commit linting to pass; ruff would fail without output:
I ran ruff manually against affected files, addressed reported issues, then bypassed pre-commit checks with
--no-verify
. Apologies if this has introduced any subtle contamination.