Update a document in a watcher

Continuing the discussion from Is it possible to update a document in watcher:

The proposed answer shows how to CREATE a document using index action, but the real question is how to update a document from a watcher.

The only way that I can think of is to CREATE a document and copy all fields including the id except the one I wanted to update. Is there a better?

would it work for you to retrieve the document as part of the input and then save the whole document in the index action (and modify before saving), which basically is an update?

Another alternative might be to use the webhook action and call the update API yourself, even though that is a bit more of a hack it might work in your case.

Yes, that is what I'm currently doing. Based on your reply, it looks like this is the best way, as the other option is

right?

indeed, I'd go with the first approach then.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.