import json


def get_service_account_email(credential_model):
    """
    Get the service account email from the stored Google creds JSON.
    """
    if not credential_model.credentials:
        return None
    credentials = json.loads(credential_model.credentials)
    return credentials.get("client_email")