Hi @dhavalveera1,
Sure thing. I made an example webhook in that example project from your other email. Please check the webhooks section in that demo environment.
Its setup is very simple:
You can specify any webhook URL you want, and leave the HTTP body settings the default.
When that webhook fires, the default body looks like the below JSON, and includes those fields. Specifically, entity.blog_title
, entity.blog_slug
, and entity.blog_written_on
should be the details you need. You can of course name those fields whatever you want.
{
"environment": "datocms-support-main-copy-08-16-2024",
"entity_type": "item",
"event_type": "create",
"entity": {
"id": "example_id",
"type": "item",
"attributes": {
"seo_details": {
"image": "example_id",
"title": "Webhook test",
"no_index": false,
"description": "Webhook test",
"twitter_card": "summary"
},
"blog_title": "Webhook test (duplicate)",
"blog_display_picture": {
"alt": null,
"title": null,
"custom_data": {},
"focal_point": null,
"upload_id": "example_id"
},
"blog_description": {
"schema": "dast",
"document": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "span",
"value": "Webhook test"
}
]
}
]
}
},
"blog_category": "Webhook test",
"blog_written_on": "2024-08-16",
"blog_tags": "test",
"blog_slug": "webhook-test"
},
"relationships": {
"item_type": {
"data": {
"id": "example_id",
"type": "item_type"
}
},
"creator": {
"data": {
"id": "125172",
"type": "account"
}
}
},
"meta": {
"created_at": "2024-08-16T20:18:48.616+01:00",
"updated_at": "2024-08-16T20:18:48.623+01:00",
"published_at": "2024-08-16T20:18:48.663+01:00",
"publication_scheduled_at": null,
"unpublishing_scheduled_at": null,
"first_published_at": "2024-08-16T20:18:48.663+01:00",
"is_valid": true,
"is_current_version_valid": true,
"is_published_version_valid": true,
"status": "published",
"current_version": "example_id",
"stage": null
}
},
"related_entities": [
{
"id": "example_id",
"type": "item_type",
"attributes": {
"name": "Blog",
"singleton": false,
"sortable": false,
"api_key": "blog",
"ordering_direction": null,
"ordering_meta": null,
"tree": false,
"modular_block": false,
"draft_mode_active": false,
"all_locales_required": false,
"collection_appearance": "table",
"has_singleton_item": false,
"hint": null,
"inverse_relationships_enabled": false
},
"relationships": {
"fields": {
"data": [
{
"id": "example_id",
"type": "field"
},
{
"id": "example_id",
"type": "field"
},
{
"id": "example_id",
"type": "field"
},
{
"id": "example_id",
"type": "field"
},
{
"id": "example_id",
"type": "field"
},
{
"id": "example_id",
"type": "field"
},
{
"id": "example_id",
"type": "field"
},
{
"id": "example_id",
"type": "field"
}
]
},
"fieldsets": {
"data": []
},
"singleton_item": {
"data": null
},
"ordering_field": {
"data": null
},
"title_field": {
"data": {
"id": "example_id",
"type": "field"
}
},
"image_preview_field": {
"data": {
"id": "example_id",
"type": "field"
}
},
"excerpt_field": {
"data": null
},
"workflow": {
"data": null
}
},
"meta": {
"has_singleton_item": false
}
}
]
}
Hope that helps!