Zeplin API allows you to access your data in Zeplin so that you can use it in your applications, workflows, or custom tools. Although this is powerful and liberating, there's no easy way to get notified of changes in Zeplin using the API.
Let's say we're building a tool to automate icon management in our codebase. Our tool extracts icons in a particular Zeplin project and creates a pull request in our repository to add new icons or to reflect changes on the existing ones.
Initially, it needs to go through every asset in the project to add the existing icons in the project. But what about new icons or changes made to the existing ones?
First, we need to check the Zeplin project periodically to see if there's an update. Then, we identify the changes between the latest data in Zeplin and the icons in the repository. Comparing two separate data stores to detect change is a cumbersome procedure. Besides, we need to do this for all the icons in Zeplin every time because we don't want to miss anything.
Webhooks come to rescue us at this point. If we set up a webhook for our icon manager, it can create new assets or update the existing ones in our code repository using the webhook notifications. Instead of periodically checking the Zeplin API, we can use the webhook to identify which icon is updated or if it's a brand new one added to the project. Whenever a new component added or some components updated, our webhook receives notifications right away and does its actual job: extracting icon data from events and creating a pull request.
Webhooks provides a mechanism to receive notifications whenever particular changes happen so that you can take necessary actions on your end. It enables creating apps that react to changes in Zeplin in real-time. Changes in Zeplin projects such as adding a new screen, updating a component, or a new reply to comment; or updates within Zeplin organizations such as new members, role changes. Zeplin Webhooks bring a wide variety of notifications to your applications in the form HTTP requests.
You can find the complete list of events in the Webhook Events Reference.
Updated over 3 years ago