title: Pub/Sub push notifications for Cloud Storage on a folder level
body: <p>I have been developing an event driven processing flow where (ideally)</p>
  
  <ul>
  <li>content is uploaded into a Cloud Storage bucket, one folder at a time</li>
  <li>I then want to use the folder name to access <em>some</em> of the files inside such folders</li>
  <li>a cloud function is triggered <em>once</em> per folder uploaded and will be using the files above</li>
  <li>the cloud function will then publish its result</li>
  </ul>
  
  <p>I enabled Pub/Sub push notification from a Cloud Storage bucket on event type <code>OBJECT_FINALIZE</code> and I would like to have <em>one notification per folder</em>. However, when I look at the number of messages produced I see there are as many messages as the number of items in the uploaded folder.</p>
  
  <p>I read about the <a href="https://stackoverflow.com/a/49068917/4146521">flat structure</a> of a bucket and this might be a problem as the lambda function will be triggered many more times than necessary.</p>
  
  <p>Is there any way to limit the push notification to <strong>one per folder</strong>?</p>
  
  <p>NB: every folder has a different name, and there might be two folders uploaded at the same time.</p>