Allow User().id

Right now there is no way to learn a user’s ID in Coda.

Yet Coda records some logs only with the user’s ID. For example, if you view the log of a pack’s execution, Coda shows you something like this…

Overview: Formula SendEmail ran successfully
User ID 221233843231

(I modified that user ID, but you get the idea.)

I would like to know which of my users with access to the doc this was, but there is no way for me to do that because I cannot get the ID of users, even of myself.

Please make it possible for User().id to return the ID number of the given user.

If there is some way to get at this information already, please let me know.

This is a tough one. I think this gap goes back a half-decade, maybe more. Here’s an overview my Coda-informed AI gave me. I don’t have a lot of time, so I’ll just share and dash. Maybe it will help.


Coda User ID Mapping Research

I have completed the research regarding the “Allow User ID” discussion in the Coda community and how it relates to system logs and the Coda MCP.

Key Findings

1. The Core Limitation

The native Coda formula User() returns a “Person” object that is intentionally limited for privacy and security. It only exposes:

  • .name()
  • .email()
  • .photo()
  • .state()

There is no native .id() property, which makes it difficult for users to map doc activities to external systems or Pack logs.

2. User ID Formats

The “User ID” in Coda can appear in two main formats:

  • Numeric IDs (e.g., 316574): These are the primary identifiers used in the Coda Admin API and Pack logs.

  • String Prefixed IDs (e.g., user-...): Often used in internal resource references or older API versions.

The community request (topic 59677) is specifically for Coda to expose the Numeric ID in formulas to allow matching with system/access logs.

3. Coda MCP Solution

While Coda formulas cannot see these IDs, the Coda MCP can. By using the mcp_Coda_whoami tool, an AI agent or developer can retrieve:

  • The numeric userId
  • The user’s metadata (name, email)

This allows for automated mapping that is otherwise impossible within the document.

Recommendation

For your mapping needs, you don’t have to wait for Coda to implement the feature. You can use an AI agent with the Coda MCP to:

  1. Generate a Mapping Table: Automatically populate a doc table with User Name and their corresponding Numeric ID.

  2. Debug Logs: Copy/paste log excerpts and ask the agent to identify the users based on the IDs found.

Implementation Guide: Mapping IDs with Coda MCP

The following steps outline how to build a User ID mapping system using the Coda MCP.

Step 1: Retrieve the User ID

The mcp_Coda_whoami tool is the most direct way to get the numeric userId.

Example Tool Call:

{
  "toolName": "whoami"
}

Response:

{
  "userId": 316574,
  "name": "Bill French",
  "email": "bill.french@gmail.com"
}

Step 2: Create a Mapping Table

If your document doesn’t already have one, create a table to store these correlations.

Example Table Structure:

  • Column 1: User Name (Text)
  • Column 2: Email (Text)
  • Column 3: Coda Numeric ID (Number)

Step 3: Populate the Table

Once you have the user’s information, use mcp_Coda_table_add_rows to write it to the doc.

Example Tool Call:

{
  "docId": "YOUR_DOC_ID",
  "tableId": "grid-mappingTable",
  "columns": ["c-UserName", "c-Email", "c-NumericID"],
  "rows": [
    ["Bill French", "bill.french@gmail.com", 316574]
  ]
}

Step 4: Automate with AI

You can ask an AI agent to:

“Find the numeric Coda IDs for all users in this doc and populate the ‘User Mapping’ table.”

The agent will iterate through the doc’s users, call whoami (if they are the active user) or search for user profiles, and sync the data.

Research Recording

Below is the recording of the research conducted within the Coda Community and API documentation.


Verified using Coda API V1 and community research.

Thanks, @Bill_French … it is good to know that Coda exposes user ID’s via MCP. I don’t use MCP or AI agents, so I cannot verify this. AI’s are well known to make up information of this sort and I can’t find any independent documentation of what it claims.

My hope is that if this is true, Coda could find its way to updating the User() function so that it also returns the ID. I don’t see how that would be a security risk, since much more sensitive information (like the user’s email address) is already exposed by this function.

Agreed. It’s puzzling to say the least.

The MVP server is a superset of the API. The API is incapable of making up IDs. But I understand how the media and uninformed talking heads would have you believing that all MCP systems are subject to hallucinations. They are. :wink: This is why I wrote mcpOS - to enforce verification that the AI is actually using the MCP service.

I understand the nascent aspects of the agentic approach and reluctance to lean into it. In a year, when you actually do, you’ll wish you did it sooner. It’s one of those things.

1 Like

Here you go @Eric_Celeste

User._Merge().ParseJSON("identifier").Split("-").Last()

@Bill_French I’m sad to say I’ve learned to just skip over your large AI posts, I find them interesting but it’s just a bit much most times, maybe tone it down a bit at least, not have it writing an article everytime?

And Eric’s right, they do hallucinate, people aren’t perfect either, but there’s a lot of errors in this post alone :heart:

4 Likes

Good advice.

AI is a firehose of data. Ironically, it writes with the imperative of ensuring it is not misunderstood, the one thing humans complain of most.

We often tell AI systems to be thorough with the hope that will force them to think through their tasks, only to discover vastly larger explanations and another step to summarize, which itself may lead to ambiguity, defeating the point of thoroughness.

Then, there’s the requirement to compose with the assumption it is for humans as well as other agents to consume.

With that feedback, I’ve retrained my Antigravity project (where all Coda-related discovery happens) to create responses only by reference. e.g., Coda document pages will contain the flood in case someone cares, like another agent. :face_with_monocle:

@Rickard_Abraham, that is exactly what I needed. Thank you.

This seems to open a whole world of hidden formulas that seem to be lurking beneath the covers. Someone who knows more should perhaps update this “guide”.