Record Publisher Data Notifications

Is it possible to get notified whenever a creator publishes a record and for there to be data about who published the article?

Initially I was wondering if using a Webhook and passing information via the payload could be an option for this. However, are there any other (better) solutions out there?

Hello @Nate

Right now the way to go would be using webhooks as you said, are you looking for a different kind of implementation? If so, can you detail it a bit for us?

Not necessarily looking at a different way to do this.

If it is possible to pass the information of who edited a record via a payload then this will be good enough. Similar to how something like gitlab pipelines has variables for accessing certain information, does DatoCMS have this with the webhooks?

@Nate

Sure, you can access that information in the payload through the creator attribute:

"creator": {
        "data": {
          "id": "12345", 
          "type": "organization" //can be a personal account too
        }
      }

The ID ca be resolved then through this endpoint: Retrieve a collaborator - Collaborator - Content Management API (or, you can create a dictionary mapping account IDs to their collaborators once and skip the lookup)

Thank you. I just want to be clear, the id is the id for the webhook and not the creator, right?

Ah… I found the documentation you are referencing.

I don’t think this would work.

Here is my scenario:
An individual goes into Dato and makes a change to a record. Once the creator hits the publish button, a webhook listening for a record to be published will then get called. This webhook will dynamically know who the individual was that hit the “publish” button and pass that information via the payload.

Does this help clarify my question?

Oh, i see @Nate , in this case what you are looking for is Audit Logs, logs that show every single action performed on the project, the time, and the account that made them, however they are an enterprise exclusive feature: General concepts - Audit Logs - DatoCMS Docs if you’d like you can email us at support@datocms.com and we can link you with our sales team so you can check the options for incorporating this in your project.