A0deploy import error saying "There is not a configured email provider"

I’ve exported using a0deploy export, then tried reimporting the same config. I haven’t modified the exported config at all. It fails on import with this error:

2025-01-21T16:30:21.676Z - error: Problem running command import during stage processChanges when processing type emailProvider
2025-01-21T16:30:21.676Z - error: There is not a configured email provider

There’s a bunch of success entries above - so it’s working for a lot of the config files, just failing at this point.

In the tenant.yaml, email provider is this:

emailProvider: {}

And in the portal, “Use my own email provider” is unchecked.

Given I haven’t touched the exported config files - is this a bug?

Thanks,
Dan

Hi @danclarke-smve,

It seems that the error is being thrown because of the email provider configuration object being imported. It is missing the required properties to define the emailProvider object, like the name and credentials. For example:

emailProvider:
  name: sendgrid
  credentials:
    api_key: '##SENDGRID_API_KEY##'
  default_from_address: example+support@sample.com
  enabled: true

If you do not use an email provider configured, could you try removing the entire line emailProvider: {} from your tenant.yaml file and reimport again?

Thanks,
Rueben

Thanks @rueben.tiow. But given the export is including that emailProvider entry - surely this is a bug? It feels like I should be able to export and then reimport without having to write text-parsing code to remove a particular entry before importing.

Hi @danclarke-smve,

You’re absolutely right that you should be able to export and re-import without having to make any changes to the file.

However, judging from the error message, it seems like the emailProvider object was malformed.

As a workaround to not using the emailProvider, you can exclude it from being managed:

{
  "AUTH0_EXCLUDED": ["emailProvider"]
}

Thanks,
Rueben

Great! That works perfectly - thank you :slight_smile:
I just need to remember to remove it if I ever add a custom email provider! :joy:

1 Like

Hi @danclarke-smve,

I’m glad it worked!

Aha yes, please remember to remove it when you add a custom email provider. :sweat_smile:

Let us know if there’s anything else we can do to help!

Best regards,
Rueben

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.