Skip to content

Automation · Content and publishing

Change your Sanity site's opening hours or a price with a WhatsApp message

An AI agent gets the new opening hours or price on WhatsApp, edits the document in Sanity and publishes the change to your site.

How do I change my Sanity page's opening hours or a price without opening the editor?

The owner writes to the Met on WhatsApp something like «from Monday we open at 7» or «the combo now costs 25.000». The Met finds the Sanity project, reads the schema to learn which field holds that value, finds the document with a GROQ query and edits the field. Sanity saves that change in a draft, never straight to published content. The Met checks the draft and publishes it: at that point the new value moves into the published content your site shows. If the admin turned off the publish action, the change stays in draft for someone on the team to review and publish from Sanity Studio.

What starts it

When the customer writes

It starts when the owner or someone on the team writes to the Met on WhatsApp with the change they want on the site. There is no trigger to configure: the Met handles it in that conversation.

Nothing to set up. The Met assigned to that channel picks up the conversation and runs the procedure inside it.

Who runs it

Content Met that keeps the site up to date in Sanity

Social team

This is not a named, seeded Met. It is a Met that serves the team, not customers, with Sanity connected: its work ends when the new value is published on the site or, if publishing is off, when the draft is ready for review.

Run by the content and social Met

Channels: WhatsApp

What you need connected

6 steps · 6 tools

The procedure, step by step

Each step shows the tool that runs. They belong to the real connector: if one of them stopped existing, this page would not build.

  1. 1

    Find the site's project

    The Met lists the Sanity projects of the connected account and picks the site's, using the name the skill gives. If the account has a single project, it uses that one.

  2. 2

    Learn which field holds the value

    The Met gets the project's deployed schema to learn which document type stores branches or products and what the opening hours or price field is called.

  3. 3

    Find the document

    With a GROQ query, the Met looks for the branch or product the owner named and asks only for the fields it needs, such as the name, the opening hours or the current price.

  4. 4

    Edit the field in a draft

    The Met edits the field with the new value. Sanity saves the edit in the document's draft, never straight to published content, so the site does not change yet.

  5. 5

    Check the draft

    The Met opens the draft by its ID and checks that the field holds the value the owner asked for, before publishing.

  6. 6

    Publish the change

    The Met publishes the draft and the new value moves into the published content your site shows. It tells the owner what changed. If the admin turned this action off, it says the draft is waiting for review in Sanity Studio.

Before you start

What you need ready

The Met solves none of these for you. If one is missing, the automation stops there.

The limits

What this automation does NOT solve

Better said here than discovered halfway through the rollout.

FAQ

Questions about this automation

The GROQ query returns both. Tell it in the skill that, when there is more than one result, it should ask the owner which one it is instead of editing the first.

Yes: send it the previous value and the Met edits the field again and publishes. Unpublishing does not work for this, because it takes the whole document out of published content.

Yes, editing accepts up to 25 documents per call. For a large price change, it is best to review the draft before publishing it.

Keep going

Other automations built on the same tools

Want this automation running on your own data?

We will show it to you with your accounts connected, not with a canned demo.