@Override
  public ImportResult importItem(
      UUID jobId,
      IdempotentImportExecutor executor,
      TokensAndUrlAuthData authData,
      PhotosContainerResource resource)
      throws Exception {
    if (resource == null) {
      // Nothing to import
      return ImportResult.OK;
    }

    monitor.debug(() -> String.format("Number of Photos: %d", resource.getPhotos().size()));

    // Import albums
    for (PhotoAlbum album : resource.getAlbums()) {
      executor.executeAndSwallowIOExceptions(
          album.getId(), album.getName(), () -> importAlbum(album));
    }

    // Import photos
    for (PhotoModel photo : resource.getPhotos()) {
      executor.importAndSwallowIOExceptions(
          photo,
          photoModel -> {
            String albumId;
            if (Strings.isNullOrEmpty(photo.getAlbumId())) {
              albumId = null;
            } else {
              albumId = executor.getCachedValue(photo.getAlbumId());
            }
            return importPhoto(photo, jobId, authData, albumId);
          });
    }

    // API to trigger daybook API

    return new ImportResult(ImportResult.ResultType.OK);
  }
Imports albums and photos to Daybook
extensions/data-transfer/portability-data-transfer-daybook/src/main/java/org/datatransferproject/transfer/daybook/photos/DaybookPhotosImporter.java