<?xml version="1.0" encoding="UTF-8"?><oembed><type>video</type><version>1.0</version><html>&lt;iframe src=&quot;https://www.loom.com/embed/207988e6308e4e34b94ba27f579093e8&quot; frameborder=&quot;0&quot; width=&quot;1672&quot; height=&quot;1254&quot; webkitallowfullscreen mozallowfullscreen allowfullscreen&gt;&lt;/iframe&gt;</html><height>1254</height><width>1672</width><provider_name>Loom</provider_name><provider_url>https://www.loom.com</provider_url><thumbnail_height>1254</thumbnail_height><thumbnail_width>1672</thumbnail_width><thumbnail_url>https://cdn.loom.com/sessions/thumbnails/207988e6308e4e34b94ba27f579093e8-3e101913120ae12d.gif</thumbnail_url><duration>622.25</duration><title>Track Historical Attribute Values with Attio + N8N (No More Spaghetti Filters)</title><description>WORKFLOW: https://gist.github.com/itsjustanks/c92e76f2e9ca618d2af77cddf80fc003 


CONTEXT:

Hey everyone,

I 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.

This 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.

The Problem

Attio 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.

However, in many use cases, the raw API response isn’t quite enough. For example:
	•	You want to extract just the initial, previous, and current values
	•	You need to know how long a record stayed in each state
	•	You want to know who made the change and when
	•	You want to build automations or pipelines using that structured data

That’s where this N8N workflow comes in.

The Solution

This 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.

Here’s what it does:
	•	Validates incoming parameters
	•	Fetches historical values from Attio
	•	Reshapes the raw data into a clean, structured format

The output includes:
	•	The current value (with timestamps)
	•	The previous value (just before the current one)
	•	The initial value (first-ever state)
	•	A full chronological history of changes, including:
	•	Duration in each state
	•	Who made the update
	•	Value at that point in time

Walkthrough Video

I walk through the entire workflow setup and logic in this video:
Watch the Loom Video Here

What’s Inside the Workflow
	•	Webhook trigger for external access
	•	Input validation using an IF node
	•	HTTP request to Attio’s list record attribute values endpoint
	•	JavaScript code node that parses and flattens the response
	•	Supports multiple attribute types including status, select, currency, checkbox, email-address, and more

Use Cases
	•	Build audit trails and track the timeline of any attribute
	•	Count how many times a stage was repeated or skipped
	•	Trigger alerts or actions when specific transitions occur
	•	Sync clean historical data to Google Sheets, Airtable, or your internal dashboard

Get Started

Import 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.

If 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.</description></oembed>