<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Email notification to end users in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/email-notification-to-end-users/m-p/120122#M46072</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/134575"&gt;@eballinger&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You're looking for a way to notify all active Databricks users via email,&lt;BR /&gt;which is a common operational need. While Databricks doesn't have a built-in "notify all users" feature,&lt;BR /&gt;you can achieve this using the Databricks API to get active users and then send emails.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Key Features of This Solution&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;1. Automatic User Discovery&lt;/STRONG&gt;&lt;BR /&gt;-- Uses Databricks SCIM API to fetch all workspace users&lt;BR /&gt;-- Filters for active users only&lt;BR /&gt;-- No need to maintain separate user lists&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. Flexible Notification Options&lt;/STRONG&gt;&lt;BR /&gt;-- Send to all users or filter by recent activity&lt;BR /&gt;-- Support for both text and HTML emails&lt;BR /&gt;-- Personalized messages with user names&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3. Built-in Safety Features&lt;/STRONG&gt;&lt;BR /&gt;-- Test mode to preview recipients before sending&lt;BR /&gt;-- Batch email sending to avoid SMTP limits&lt;BR /&gt;-- Error handling and logging&lt;/P&gt;&lt;P&gt;Setup Requirements&lt;BR /&gt;1. Databricks Token&lt;BR /&gt;-- Create a personal access token with appropriate permissions:&lt;BR /&gt;2. Email Configuration&lt;BR /&gt;-- Set up SMTP credentials&lt;BR /&gt;&lt;BR /&gt;3.Required Permissions&lt;BR /&gt;Your Databricks token needs&lt;BR /&gt;-- User management permissions&lt;BR /&gt;-- SCIM API access (usually requires admin role)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Alternative Approaches:&lt;/STRONG&gt;&lt;BR /&gt;1. Slack Integration (if your org uses Slack)&lt;BR /&gt;2. Microsoft Teams Integration&lt;/P&gt;&lt;P&gt;This solution gives you exactly what you need - the ability to automatically notify all current active Databricks users&lt;BR /&gt;without manually maintaining user lists. The system automatically discovers users and handles the complexity of email&lt;BR /&gt;delivery while providing safety features for testing and monitoring.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 23 May 2025 23:52:33 GMT</pubDate>
    <dc:creator>lingareddy_Alva</dc:creator>
    <dc:date>2025-05-23T23:52:33Z</dc:date>
    <item>
      <title>Email notification to end users</title>
      <link>https://community.databricks.com/t5/data-engineering/email-notification-to-end-users/m-p/120073#M46052</link>
      <description>&lt;P&gt;Is there a way a way we can notify all of our databricks end users by email when there is a issue? We currently have our jobs setup to notify the technical team when a job workflow fails. That part works fine.&lt;/P&gt;&lt;P&gt;But we would like the ability to maybe use a python notebook and api perhaps to send a custom message to all of our end users when there are issues. For example sometimes there is issues downstream and our jobs are not run so we would like to be able to run in these cases something that would send a email to "All databricks users" with a custom message.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know we can maintain a user list to notify and send this manually like we do in other systems. But over time users come and go and being able to send a simple message to current active users would be best.&lt;/P&gt;&lt;P&gt;If this is not possible this would be a good feature for the future.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 23 May 2025 13:49:54 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/email-notification-to-end-users/m-p/120073#M46052</guid>
      <dc:creator>eballinger</dc:creator>
      <dc:date>2025-05-23T13:49:54Z</dc:date>
    </item>
    <item>
      <title>Re: Email notification to end users</title>
      <link>https://community.databricks.com/t5/data-engineering/email-notification-to-end-users/m-p/120122#M46072</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/134575"&gt;@eballinger&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You're looking for a way to notify all active Databricks users via email,&lt;BR /&gt;which is a common operational need. While Databricks doesn't have a built-in "notify all users" feature,&lt;BR /&gt;you can achieve this using the Databricks API to get active users and then send emails.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Key Features of This Solution&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;1. Automatic User Discovery&lt;/STRONG&gt;&lt;BR /&gt;-- Uses Databricks SCIM API to fetch all workspace users&lt;BR /&gt;-- Filters for active users only&lt;BR /&gt;-- No need to maintain separate user lists&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. Flexible Notification Options&lt;/STRONG&gt;&lt;BR /&gt;-- Send to all users or filter by recent activity&lt;BR /&gt;-- Support for both text and HTML emails&lt;BR /&gt;-- Personalized messages with user names&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3. Built-in Safety Features&lt;/STRONG&gt;&lt;BR /&gt;-- Test mode to preview recipients before sending&lt;BR /&gt;-- Batch email sending to avoid SMTP limits&lt;BR /&gt;-- Error handling and logging&lt;/P&gt;&lt;P&gt;Setup Requirements&lt;BR /&gt;1. Databricks Token&lt;BR /&gt;-- Create a personal access token with appropriate permissions:&lt;BR /&gt;2. Email Configuration&lt;BR /&gt;-- Set up SMTP credentials&lt;BR /&gt;&lt;BR /&gt;3.Required Permissions&lt;BR /&gt;Your Databricks token needs&lt;BR /&gt;-- User management permissions&lt;BR /&gt;-- SCIM API access (usually requires admin role)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Alternative Approaches:&lt;/STRONG&gt;&lt;BR /&gt;1. Slack Integration (if your org uses Slack)&lt;BR /&gt;2. Microsoft Teams Integration&lt;/P&gt;&lt;P&gt;This solution gives you exactly what you need - the ability to automatically notify all current active Databricks users&lt;BR /&gt;without manually maintaining user lists. The system automatically discovers users and handles the complexity of email&lt;BR /&gt;delivery while providing safety features for testing and monitoring.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 May 2025 23:52:33 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/email-notification-to-end-users/m-p/120122#M46072</guid>
      <dc:creator>lingareddy_Alva</dc:creator>
      <dc:date>2025-05-23T23:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: Email notification to end users</title>
      <link>https://community.databricks.com/t5/data-engineering/email-notification-to-end-users/m-p/120138#M46074</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/134575"&gt;@eballinger&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;H3&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;Step 1: Add a Notification Task to Your Workflow&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;&lt;P class=""&gt;The first thing you should do is add an extra task to your Databricks job/Airflow Dag/etc. , and set its dependency to &lt;SPAN class=""&gt;"at least one failed"&lt;/SPAN&gt;.&lt;/P&gt;&lt;P class=""&gt;This way, &lt;SPAN class=""&gt;&lt;STRONG&gt;if any upstream task fails&lt;/STRONG&gt;&lt;/SPAN&gt;, the notification task will automatically be triggered and can handle alerting users.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;H3&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;Step 2: Get the List of Active Users&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;&lt;P class=""&gt;Databricks exposes a SCIM API endpoint you can use to retrieve all users in your workspace:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;GET /api/2.0/preview/scim/v2/Users&lt;/LI-CODE&gt;&lt;P class=""&gt;From the API response, simply filter for users where &lt;STRONG&gt;&lt;SPAN class=""&gt;"active": true&lt;/SPAN&gt;&lt;/STRONG&gt;, and extract their email addresses,&amp;nbsp;ensures you’re always notifying the current active users.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;H3&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;Step 3: Send Emails the Right Way&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;&lt;P class=""&gt;If you send emails directly from the notebook using something like &lt;SPAN class=""&gt;smtplib&lt;/SPAN&gt;, or via an SMTP server without proper domain authentication, &lt;SPAN class=""&gt;&lt;STRONG&gt;your emails are likely to end up in spam, or even get blocked entirely&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P class=""&gt;That’s why I strongly recommend:&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Authenticating from your notebook against Microsoft Graph (or your corporate email provider) and sending the emails from there.&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;This ensures:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;Emails come from a trusted, legitimate corporate identity.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;SPF/DKIM/DMARC policies are respected.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;No reliance on insecure third-party servers.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;H3&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;Summary of the Flow:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;&lt;P class=""&gt;Job fails → notification task is triggered.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;Notebook calls the SCIM API to get active users.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;Authenticates to Microsoft Graph with proper permissions.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;Builds a custom email (text or HTML).&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;Sends it to all current users in the workspace.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Hope this helps &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Isi&lt;/P&gt;</description>
      <pubDate>Sat, 24 May 2025 09:33:56 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/email-notification-to-end-users/m-p/120138#M46074</guid>
      <dc:creator>Isi</dc:creator>
      <dc:date>2025-05-24T09:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: Email notification to end users</title>
      <link>https://community.databricks.com/t5/data-engineering/email-notification-to-end-users/m-p/120169#M46080</link>
      <description>&lt;P&gt;Having trouble ensuring consistent email alerts reach end-users on time. The current setup feels limited, especially when notifying people outside Databricks. Would appreciate any tips or workarounds that have worked for others.&lt;/P&gt;</description>
      <pubDate>Sun, 25 May 2025 14:11:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/email-notification-to-end-users/m-p/120169#M46080</guid>
      <dc:creator>ciro</dc:creator>
      <dc:date>2025-05-25T14:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: Email notification to end users</title>
      <link>https://community.databricks.com/t5/data-engineering/email-notification-to-end-users/m-p/120172#M46083</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/165841"&gt;@ciro&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Could you explain your situation in more detail? Perhaps you could open another question to explain it and then we can discuss how to resolve it?&lt;BR /&gt;&lt;BR /&gt;Best Regards,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Isi&lt;/P&gt;</description>
      <pubDate>Sun, 25 May 2025 15:20:21 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/email-notification-to-end-users/m-p/120172#M46083</guid>
      <dc:creator>Isi</dc:creator>
      <dc:date>2025-05-25T15:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: Email notification to end users</title>
      <link>https://community.databricks.com/t5/data-engineering/email-notification-to-end-users/m-p/120263#M46108</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;LRALVA &amp;amp; Isi,&lt;/P&gt;&lt;P&gt;I like both of your suggestions. I did look into making my own notebook using smtplib but stopped because I do not know any open SMTP server or cloud email service in the Azure cloud environment. This is why I was hoping to leverage something within Databricks natively because I can have a task email me when a workflow fails so I just would like to extend that built in functionality and use whatever email service that is using. Is that not possible?&lt;/P&gt;&lt;P&gt;Thanks again for the great suggestions. If I had more control in my environment I would certainly look into those suggestions more.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 May 2025 19:19:39 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/email-notification-to-end-users/m-p/120263#M46108</guid>
      <dc:creator>eballinger</dc:creator>
      <dc:date>2025-05-26T19:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: Email notification to end users</title>
      <link>https://community.databricks.com/t5/data-engineering/email-notification-to-end-users/m-p/132677#M49595</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I have a similar doubt!&lt;/P&gt;&lt;P&gt;I’m running a data pipeline on Databricks, and at the end of the pipeline, I generate some results. I’d like to notify the relevant people automatically via email (or another messaging method) with a summary of the results, including some text and links to the findings.&lt;BR /&gt;&lt;BR /&gt;Please note that these people are not working on databricks and they don't have any permissions to our databricks workspace. It is just that i want to notify them when the pipeline run is completed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could anyone suggest the best approach or tools in Databricks to achieve this kind of notification?&lt;/P&gt;&lt;P&gt;Thank you in advance for your guidance!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Sep 2025 12:35:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/email-notification-to-end-users/m-p/132677#M49595</guid>
      <dc:creator>AnanthuR</dc:creator>
      <dc:date>2025-09-22T12:35:13Z</dc:date>
    </item>
  </channel>
</rss>

