Throw a ConfigurationError in the getTopics() method of the new-email-received trigger if serviceAccountKeyJson is not set:
"Not able to create a webhook or subscribe to topics without configuring a service account. Please reconfigure the trigger type and try again."