{"type":"video","version":"1.0","html":"<iframe src=\"https://www.loom.com/embed/207988e6308e4e34b94ba27f579093e8\" frameborder=\"0\" width=\"1672\" height=\"1254\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>","height":1254,"width":1672,"provider_name":"Loom","provider_url":"https://www.loom.com","thumbnail_height":1254,"thumbnail_width":1672,"thumbnail_url":"https://cdn.loom.com/sessions/thumbnails/207988e6308e4e34b94ba27f579093e8-3e101913120ae12d.gif","duration":622.25,"title":"Track Historical Attribute Values with Attio + N8N (No More Spaghetti Filters)","description":"WORKFLOW: https://gist.github.com/itsjustanks/c92e76f2e9ca618d2af77cddf80fc003 \n\n\nCONTEXT:\n\nHey everyone,\n\nI wanted to share a custom N8N workflow I built to enhance something Attio recently released: the ability to retrieve historical values for attributes via their API using the show_historic=true parameter.\n\nThis feature is already incredibly useful on its own — it unlocks access to the full lifecycle of an attribute. But for those of us building automations or deeper reporting layers, I found that we needed to take it one step further.\n\nThe Problem\n\nAttio now gives you the ability to fetch historical data for most attribute types via API. That’s a big improvement — no more relying on the UI alone to view value transitions.\n\nHowever, in many use cases, the raw API response isn’t quite enough. For example:\n\t•\tYou want to extract just the initial, previous, and current values\n\t•\tYou need to know how long a record stayed in each state\n\t•\tYou want to know who made the change and when\n\t•\tYou want to build automations or pipelines using that structured data\n\nThat’s where this N8N workflow comes in.\n\nThe Solution\n\nThis workflow exposes a webhook endpoint that takes object, record, and attribute as query parameters. It acts as a middle layer between your system and Attio’s API.\n\nHere’s what it does:\n\t•\tValidates incoming parameters\n\t•\tFetches historical values from Attio\n\t•\tReshapes the raw data into a clean, structured format\n\nThe output includes:\n\t•\tThe current value (with timestamps)\n\t•\tThe previous value (just before the current one)\n\t•\tThe initial value (first-ever state)\n\t•\tA full chronological history of changes, including:\n\t•\tDuration in each state\n\t•\tWho made the update\n\t•\tValue at that point in time\n\nWalkthrough Video\n\nI walk through the entire workflow setup and logic in this video:\nWatch the Loom Video Here\n\nWhat’s Inside the Workflow\n\t•\tWebhook trigger for external access\n\t•\tInput validation using an IF node\n\t•\tHTTP request to Attio’s list record attribute values endpoint\n\t•\tJavaScript code node that parses and flattens the response\n\t•\tSupports multiple attribute types including status, select, currency, checkbox, email-address, and more\n\nUse Cases\n\t•\tBuild audit trails and track the timeline of any attribute\n\t•\tCount how many times a stage was repeated or skipped\n\t•\tTrigger alerts or actions when specific transitions occur\n\t•\tSync clean historical data to Google Sheets, Airtable, or your internal dashboard\n\nGet Started\n\nImport the workflow into your N8N instance. You’ll just need to pass the object, record, and attribute as query parameters in your webhook request. From there, the workflow handles the rest.\n\nIf this sparks any ideas or if you want to build on it, feel free to reach out or comment with suggestions. I’m happy to collaborate or share variations."}