<?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: Assigning Survey123 Spills to Workforce Responders - Need Guidance in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/assigning-survey123-spills-to-workforce-responders/m-p/1560339#M73207</link>
    <description>&lt;P&gt;Thank You&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/10527"&gt;@JakeSkinner&lt;/a&gt;&amp;nbsp; for a quick reply!!&lt;/P&gt;&lt;P&gt;Yes, the Survey123 form developed by user is in AGOL. The data is in AGOL. I access the data from the feature layer using a API call.&lt;/P&gt;&lt;P&gt;I will try the script you have suggested for emails. The .py script i write cannot be hosted on my side. Is hosting the .py script on esri cloud possible? i am asking since the script uses two feature layers developed by the user and nothing related to the application on my side.&lt;/P&gt;</description>
    <pubDate>Tue, 19 Nov 2024 17:17:11 GMT</pubDate>
    <dc:creator>ChallagundlaSindhuraITS</dc:creator>
    <dc:date>2024-11-19T17:17:11Z</dc:date>
    <item>
      <title>Assigning Survey123 Spills to Workforce Responders - Need Guidance</title>
      <link>https://community.esri.com/t5/python-questions/assigning-survey123-spills-to-workforce-responders/m-p/1560316#M73205</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I need help with a Python script requirement.&lt;/P&gt;&lt;P&gt;The setup:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;A Survey123 form collects spill data in one feature layer.&lt;/LI&gt;&lt;LI&gt;A Workforce app stores responder details (phone, email, region) in another feature layer.&lt;P&gt;The task:&lt;BR /&gt;I need to write a script to:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Assign spills from the Survey123 form to responders based on their region.&lt;/LI&gt;&lt;LI&gt;Send email or text notifications to the assigned responders as soon as a spill is created.&lt;P&gt;What I’ve tried:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Created a script to access and join the feature layers on the county field.&lt;/LI&gt;&lt;LI&gt;Attempted to send emails using smtplib, but I ran into connection issues on my local machine.&lt;P&gt;Questions:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;How can I reliably send the notifications (email/text)?&lt;/LI&gt;&lt;LI&gt;Where should I host the script to make it run automatically when new spills are added?&lt;P&gt;Any advice or ideas are appreciated!&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Tue, 19 Nov 2024 16:49:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/assigning-survey123-spills-to-workforce-responders/m-p/1560316#M73205</guid>
      <dc:creator>ChallagundlaSindhuraITS</dc:creator>
      <dc:date>2024-11-19T16:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning Survey123 Spills to Workforce Responders - Need Guidance</title>
      <link>https://community.esri.com/t5/python-questions/assigning-survey123-spills-to-workforce-responders/m-p/1560330#M73206</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/642241"&gt;@ChallagundlaSindhuraITS&lt;/a&gt;&amp;nbsp;is your Survey123 feature service hosted in AGOL?&amp;nbsp; Here is an example script on how to send an e-mail for an AGOL hosted feature service:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.esri.com/t5/python-documents/send-email-when-a-feature-is-added-to-an-arcgis/ta-p/920545" target="_blank"&gt;https://community.esri.com/t5/python-documents/send-email-when-a-feature-is-added-to-an-arcgis/ta-p/920545&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I recommend configuring Windows Task Scheduler to execute this script on a server that has ArcGIS Pro install, and will not be turned off.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2024 17:02:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/assigning-survey123-spills-to-workforce-responders/m-p/1560330#M73206</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2024-11-19T17:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning Survey123 Spills to Workforce Responders - Need Guidance</title>
      <link>https://community.esri.com/t5/python-questions/assigning-survey123-spills-to-workforce-responders/m-p/1560339#M73207</link>
      <description>&lt;P&gt;Thank You&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/10527"&gt;@JakeSkinner&lt;/a&gt;&amp;nbsp; for a quick reply!!&lt;/P&gt;&lt;P&gt;Yes, the Survey123 form developed by user is in AGOL. The data is in AGOL. I access the data from the feature layer using a API call.&lt;/P&gt;&lt;P&gt;I will try the script you have suggested for emails. The .py script i write cannot be hosted on my side. Is hosting the .py script on esri cloud possible? i am asking since the script uses two feature layers developed by the user and nothing related to the application on my side.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2024 17:17:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/assigning-survey123-spills-to-workforce-responders/m-p/1560339#M73207</guid>
      <dc:creator>ChallagundlaSindhuraITS</dc:creator>
      <dc:date>2024-11-19T17:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning Survey123 Spills to Workforce Responders - Need Guidance</title>
      <link>https://community.esri.com/t5/python-questions/assigning-survey123-spills-to-workforce-responders/m-p/1560350#M73208</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/642241"&gt;@ChallagundlaSindhuraITS&lt;/a&gt;&amp;nbsp;yes, you can use &lt;A href="https://www.esri.com/en-us/arcgis/products/arcgis-notebooks/workspace-options/arcgis-online" target="_self"&gt;AGOL Notebooks&lt;/A&gt; to host the script.&amp;nbsp; Below is an example on how to send an e-mail.&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;from arcgis.gis import GIS

# Variables
username = 'jskinner_rats'
password = '********'

# Connect to AGOL
gis = GIS('https://www.arcgis.com', username, password)

# Create list of users to send e-mail to
userList = []
user = gis.users.get('jskinner_rats')
userList.append(user)

# Construct message and send
messageSubject = 'This is a test message from AGOL'
messageMessage = 'This is the plain text message that we are sending.'
gis.users.send_notification(userList, subject = messageSubject, message = messageMessage, type = 'email')&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2024 17:35:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/assigning-survey123-spills-to-workforce-responders/m-p/1560350#M73208</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2024-11-19T17:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning Survey123 Spills to Workforce Responders - Need Guidance</title>
      <link>https://community.esri.com/t5/python-questions/assigning-survey123-spills-to-workforce-responders/m-p/1561258#M73219</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.esri.com/t5/user/viewprofilepage/user-id/10527" target="_blank" rel="noopener"&gt;@JakeSkinner&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have tried this code snippet , but the account i use to connect to doesnt have permissions. Error: You do not have permissions to access this resource or perform this operation.&lt;BR /&gt;(Error Code: 403)&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;gis = GIS('https://www.arcgis.com', username, password)&lt;/PRE&gt;&lt;P&gt;Do you have any suggestions to send emails using smtplib?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2024 15:19:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/assigning-survey123-spills-to-workforce-responders/m-p/1561258#M73219</guid>
      <dc:creator>ChallagundlaSindhuraITS</dc:creator>
      <dc:date>2024-11-21T15:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning Survey123 Spills to Workforce Responders - Need Guidance</title>
      <link>https://community.esri.com/t5/python-questions/assigning-survey123-spills-to-workforce-responders/m-p/1561280#M73222</link>
      <description>&lt;P&gt;Unfortunately, you won't be able to send an e-mail using smtplib in AGOL Notebooks.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2024 15:42:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/assigning-survey123-spills-to-workforce-responders/m-p/1561280#M73222</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2024-11-21T15:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning Survey123 Spills to Workforce Responders - Need Guidance</title>
      <link>https://community.esri.com/t5/python-questions/assigning-survey123-spills-to-workforce-responders/m-p/1561282#M73223</link>
      <description>&lt;P&gt;Thank You &lt;A href="https://community.esri.com/t5/user/viewprofilepage/user-id/10527" target="_self"&gt;&lt;SPAN class=""&gt;JakeSkinner&lt;/SPAN&gt;&lt;/A&gt;, Is it possible to send emails from AGOL notebooks to the out of organisation emails(not GIS users)? Also can we send text messages to the phonenumbers from AGOL notebooks? Please advice. Thanks again&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2024 16:37:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/assigning-survey123-spills-to-workforce-responders/m-p/1561282#M73223</guid>
      <dc:creator>ChallagundlaSindhuraITS</dc:creator>
      <dc:date>2024-11-21T16:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning Survey123 Spills to Workforce Responders - Need Guidance</title>
      <link>https://community.esri.com/t5/python-questions/assigning-survey123-spills-to-workforce-responders/m-p/1561378#M73226</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/t5/user/viewprofilepage/user-id/10527" target="_blank" rel="noopener"&gt;@JakeSkinner&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;, I can't go the route of using&amp;nbsp;&lt;/SPAN&gt;gis.users.send_notification becasue the account i use to connect to arcgis and send emails wont get the admin rights.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2024 18:20:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/assigning-survey123-spills-to-workforce-responders/m-p/1561378#M73226</guid>
      <dc:creator>ChallagundlaSindhuraITS</dc:creator>
      <dc:date>2024-11-21T18:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning Survey123 Spills to Workforce Responders - Need Guidance</title>
      <link>https://community.esri.com/t5/python-questions/assigning-survey123-spills-to-workforce-responders/m-p/1561395#M73227</link>
      <description>&lt;P&gt;I would recommend using a local server that has ArcGIS Pro to execute your scripts.&amp;nbsp; You can then leverage the smtplib module and send e-mails/texts.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2024 18:48:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/assigning-survey123-spills-to-workforce-responders/m-p/1561395#M73227</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2024-11-21T18:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning Survey123 Spills to Workforce Responders - Need Guidance</title>
      <link>https://community.esri.com/t5/python-questions/assigning-survey123-spills-to-workforce-responders/m-p/1563430#M73256</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thank You&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.esri.com/t5/user/viewprofilepage/user-id/10527" target="_self"&gt;&lt;SPAN class=""&gt;JakeSkinner&lt;/SPAN&gt;&lt;/A&gt;&amp;nbsp;, I dont have ArcGIS Pro software, Is there a way i can do with Arcgis API for Python to send emails/texts?&lt;/P&gt;</description>
      <pubDate>Fri, 29 Nov 2024 15:32:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/assigning-survey123-spills-to-workforce-responders/m-p/1563430#M73256</guid>
      <dc:creator>ChallagundlaSindhuraITS</dc:creator>
      <dc:date>2024-11-29T15:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning Survey123 Spills to Workforce Responders - Need Guidance</title>
      <link>https://community.esri.com/t5/python-questions/assigning-survey123-spills-to-workforce-responders/m-p/1563637#M73259</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/642241"&gt;@ChallagundlaSindhuraITS&lt;/a&gt;&amp;nbsp;no, not without an Admin account.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2024 13:17:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/assigning-survey123-spills-to-workforce-responders/m-p/1563637#M73259</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2024-12-02T13:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning Survey123 Spills to Workforce Responders - Need Guidance</title>
      <link>https://community.esri.com/t5/python-questions/assigning-survey123-spills-to-workforce-responders/m-p/1564697#M73277</link>
      <description>&lt;P&gt;Thank You&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/10527"&gt;@JakeSkinner&lt;/a&gt;&amp;nbsp; , I dont have a ArcgisPro lisence to go explore that route, but someone from the other team suggested that Email's are usually handled using web hooks via Microsoft Power Automate.&amp;nbsp; I am not the person who created the Survey123 Spill form, but can i create webhook or attach a .py script to assign a spill and send email notifications?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2024 15:39:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/assigning-survey123-spills-to-workforce-responders/m-p/1564697#M73277</guid>
      <dc:creator>ChallagundlaSindhuraITS</dc:creator>
      <dc:date>2024-12-04T15:39:23Z</dc:date>
    </item>
  </channel>
</rss>

