Modify Liveblocks storage with JSON Patch and Anthropic Claude
Modify Liveblocks Storage with JSON Patch
This example uses Liveblocks Storage, a sync engine created by Liveblocks that allows you to create collaborative applications like Figma, Pitch, and Spline. When we fetch the Storage value for a room, we're fetching the state of the multiplayer document which users are collaborating on.
In this workflow example, our document holds a list of shapes, like a drawing tool. Here's a rectangle, for example:
{ "id": "rect-1", "type": "rectangle", "x": 100, "y": 150, "width": 200, "height": 100, "color": "#ff0000" }
Picture this hooked up to a design tool like Figma, with the user asking AI to edit their document.
In these nodes, to generates a JSON Patch operation from the user's request ("Add a blue circle, and make the square orange") and applies it to the collaborative document.
As soon as the JSON Patch operation has run, each user's design tool in their web browser will update with the changes in real time.
Additionally, we're setting presence in the room, which means that the AI will appear in the document's live avatar stacks while it works, before disappearing shortly after.
Related Templates
Track Demo Bookings with Google Calendar to Meta Conversions API Integration
Who is this workflow for? If you're using Meta Ads to generate new leads to your sales pipeline, this workflow is for yo...
Transcribe & Summarize Audio with Whisper and GPT, from Google Drive to Notion
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. Overview This work...
Reusable and Independently Testable Sub-workflow
Reusable and Independently Testable Sub-workflow This n8n workflow provides a standardized structure for building and te...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments