We are a team with three orgs. Development, UAT and Production.

We are trying to move away from changesets and manual copying and use various deploy mechanisms or scratch orgs but we cannot deploy org wide email addresses since it is not supported in the metadata api.

The problem is that since addresses cannot be deployed, workflows referencing them cannot either. And if we dont deploy all workflows some tests will fail and the environment will be wrong.

I would appreciate any help with this issue, thanks

2 Answers 2


We (Salesforce.org Release Engineering, where I work) use browser automation built on Robot Framework and Selenium to automate setup actions that are not Metadata API accessible. Robot covers both browser automation and automated UI setup for us.

Robot is a keyword-based framework on top of Selenium that can make it easier to script the Salesforce UI. Since several of our products are open source, you can peek at the Robot test automation in, for example, NPSP. Robot Framework scripting is built in to CumulusCI, our open source build automation tool.

I have never used Robot to set up organization email addresses, but I have successfully applied it to updating the Contract Status Standard Value Set, which is likewise not Metadata API-accessible. Browser scripting for setup of this kind is definitely slower, and not as reliable, as direct API access, but it does work and can let you achieve these needs in a fully automated way in both scratch orgs and persistent sandboxes.

  • 1
    We also use a Selenium-based approach for our customers. This is the way (tm). There are a ton of tools
    – identigral
    Mar 31, 2020 at 20:07
  • Interesting. Why do you have to resort to tools like this instead of having a first class API? Is it due to dealing with long standing Salesforce features?
    – Andy Ray
    Jun 2, 2020 at 1:36
  • @AndyRay There's still some features that are either left behind in the Metadata API or so deeply entwined with org-wide setup that they're not supported. Robot/Selenium makes it possible to script setting up those features with browser automation when they're not otherwise API-accessible.
    – David Reed
    Jun 2, 2020 at 1:39
  • Makes sense. Getting to a solid development workflow in Salesforce has so many painful pitfalls, I'm always curious about the history of it
    – Andy Ray
    Jun 2, 2020 at 2:00
  • (Disclaimer: while I am a Salesforce employee, I do not know a lot about the internal history of the Metadata API. My experience is primarily as an "internal ISV".)
    – David Reed
    Jun 2, 2020 at 2:23

Going off their Unsupported Metadata Types documentation

The following components can’t be retrieved or deployed with Metadata API, and changes to them must be made manually in each of your organizations

In your situation, I'd manually create the org-wide email addresses in your target org and then keep whatever you can in your normal deployment process (in this case, your workflows).

  • 1
    That is great and all but I would like the deployment to be automated, and scratch orgs will need this step every time and you have to wait for verification. How do other people work with scratch orgs without this?
    – dac1n
    Mar 31, 2020 at 18:36
  • Apologies, it wasn't clear you were definitely using Scratch Orgs (just that it is one mechanism option you were investigating). Typically, this would be a one-time and rare occurrence if you automate without scratch orgs. David's answer is a good one to explore this issue with using scratch orgs. Mar 31, 2020 at 18:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .