Automatically generate Notepad documents

I’m trying to create a chatbot for creating, saving, closing, and opening new documents. Is the “Notepad: New Notepad Button” in Workshop the only way to automatically create a new Notepad document from a Template? I’m trying to do everything from AIP Agent Studio. Is there a way to use AIP Agent Studio, AIP Logic, Actions, or Functions to generate a new Notepad document?

Hey @ianferre, you can explore a workaround using internal APIs for generating documents from Notepad templates. Since we don’t have any publicly supported APIs, I’m unable to provide any hints here, but roughly this involves poking around in the browser developer console to figure out these API endpoints as well as figuring out how to call the internal API from a function / webhook (similar to what is suggested in this thread).

I will strongly cavaet that Palantir does not endorse or support using these internal APIs. The only APIs that get versioned and which we make any guarantees about stability or not breaking are those in the Foundry API. So if you do proceed with this, make sure to keep it in mind; you won’t get any notice if the Notepad team decides to change the way these endpoints work or remove them entirely and you won’t get any support (except probably from other people here on the community) if you run into issues.

We are in the process of introducing a set of public APIs for template generation, but in the meantime, you can explore using internal APIs with caution.

1 Like

Solved the problem without code. First, created an object type with a random primary_key, Time Created (equal to Current Time), and null values for all other properties (including null title). Next, the “Create Notepad” button creates a Notepad and runs an action with two rules that both updates the most recent object without a title and creates a new, mostly null object for future use. (Stole the idea from magicians: https://en.wikipedia.org/wiki/Billet_reading#One-ahead)

1 Like