Api Access to Custom View Data
I am trying to use an alternative system for Campaigns. I am not sure if twenty will have solution for Campaigns (mass email solution etc.).
So my idea was to get the view data outside of a custom list Or to get all people and reconstruct the filtering.
What did i check:
I can create a custom view in people page and i can find the view in the api.
I can not get the records.
I did find that based on viewName and the view api the viewId.
i can find the filters applied.
Then in the filters i can see that a filter applied to a field (specific fieldmetadataId) should contain a value (and i see the value also) but i do not know the name of the field in the api. Also in the api for the viewFields you have the same metadataId but you do not have a name.
So i can not get All people and find the fields that i need to apply the filters.
Any idea?
29 Replies
From what I see, neither GraphQL nor REST API expose the name of fields so until someone exposes it in code, there's no way to find out which field is which only from API
But you can do it indirect way, since Twenty renders tables with fields using fieldMetadataId, you can get view's all fields with this query in GraphQL and looking up directly in React components of table with Chrome extension, you can match given fieldMetadataId with field's name

Annoying way I admit but that's the only way I can think of
And about solutions for campaigns, Twenty will have them in the future
so if i do only a direct native query in the db i can get the info. But trying to do this with n8n means that i need to connect also to db. Am i correct?
Don't think so since table "viewField" doesn't contain the name of field
but in the database there is also no field name in the viewfield table.
exactly this means that i did not understand your proposal
is the name in your query the view name? this is ok i know this and i can get the fields with the metadataID and i know for each metadata field the filter and each value
i do not know when i get all people which fieldmetadataID belongs to each column in the query from the API to connect them
Yes, the name in query is view's name
then it is not enough. how the field name is store if it is not in the db directly
Field name is stored in database in core."fieldMetadata", to fetch it from API you can do it with metadata API using /fields (this contains names of fields) and /viewFields (this contains info which fields are in which views)
then i can do a query also from there to get the data
or i can make a view in db but it will be probably broken in next update
You can do query to get data but I'd say creating view via API is safer
/fields does not exist in api from what i see. i am watching the api page
There is


You have to switch to metadata, not core API

aaa ok
i was searching for object and field
and i could not find them
let me check
There was a migration from core to metadata some time ago
So i need to get from CORE { view, view filter, view fields } and then from Metadata { fields , objects }
I think you can get all of them from metadata
the view and view filter and viewfields in metadata are empty
They shouldn't be empty, which version are you selfhosting?
let me check
1.3.0
2025-08-11T00:00:00.000Z

Okay, then in your case that should work
since in workspace schema and core schema the view table exists . is there any difference when the software saves the view inside the workspace and when it saves it in core?
i assume that since always there is a workspace then everything goes in workspace except some generic things. but can the user by his/her actions have any impact?
Just to be safe, it's better to do it in core in your case
ok i will have to do only probably fields and object get from the metadata
if i am trying with graphQL can i get the views and the fields in views from core and then the names of fields from metadata in one query?
No as you're reaching out to 2 different endpoints aka /core and /metadata
If both information could be available via 1 endpoint, then yes