cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Automatic e-mail.

Conversationalist

Automatic e-mail.

Hello, 

 

i'm looking to generate an automatic e-mail so each user that has assigned a device, will get a reminder that this device is assigned to them and if he doesn't need it anymore, please return it. 

 

Is there any way this can be done on Meraki? 

 

Thank you in advance. 

 

 

7 REPLIES 7
Meraki Alumni (Retired)

Re: Automatic e-mail.

Nothing like this is built in to dynamically send this information to the end user. You could manually do this under the devices MDM commands with a built in message sent to the device.

 

I am not aware of any API commands we are working on that would dynamically do this but I can check.

Kind of a big deal

Re: Automatic e-mail.

You could download a CSV from the Dashboard and use a type of Apple Script to pull information from it and send an automated email. I am using the email automation using Apple Script in a script to restrict terminal. 

 

		tell application "Mail"
			
			set theSubject to "Restricted Software Violation" -- the subject
			
			set theContent to "Violation - Terminal Opened " -- the content
			
			set theAddress to "technology@flitt.org" -- the receiver 
			
			set theSignatureName to "Automated Management" -- the signature name
			
			set msg to make new outgoing message with properties {subject:theSubject, content:theContent, visible:true}
			
			tell msg to make new to recipient at end of every to recipient with properties {address:theAddress}
			
			send msg
			
		end tell

This is something I am very intrested in, I am going to see if I can do somethin using Apple script.

 

Jared

Find this helpful? Click the kudos button. Thanks!
Conversationalist

Re: Automatic e-mail.

Hey Jared. 

 

Thank you very much for your support on this matter. 

 

I created an script to send the automatic e-mail .and go to search the csv file, i will have to work it around to send personalized e-mail to each user, but we will see what happens.

 

If you found anything else, please show it to me!

 

Thanks.

Kind of a big deal

Re: Automatic e-mail.

@gpintop Very nice, could you share the script? Trying to get something going on my end similar to you. Currently playing with this:

 

-- select the file
-- change this to a direct path if you prefer
set theFile to (choose file with prompt "Select the CSV file")
 
-- read the file contents:
set f to read theFile
 
-- break the file into paragraphs (c.f. rows)
repeat with row in (paragraphs of f)
  -- parse the row into comma-delimited fields
  set fields to parseCSV(row as text)
  -- now you have your data:
  set recipientAddress to item 1 of fields
  set theSubject to item 2 of fields
  set theContent to item 3 of fields
  set recipientName to item 4 of fields
 
  -- presumably you want to do something more with this data?
  tell application "Mail"
  set NewMail to make new outgoing message with properties {subject:theSubject, content:theContent, visible:true}
  set message signature of NewMail to signature "OG"
 
  tell NewMail
  make new to recipient with properties {name:recipientName, address:recipientAddress}
 
 
  send
  end tell
  end tell
end repeat
 
on parseCSV(theText)
  set {od, my text item delimiters} to {my text item delimiters, ","}
  set parsedText to text items of theText
  set my text item delimiters to od
  return parsedText
end parseCSV
Find this helpful? Click the kudos button. Thanks!
Conversationalist

Re: Automatic e-mail.

Hey Jared, 

 

Yes, of course, it's really simple but will share it just in case. 

 

set recipientAddress to "Your mail."
set theSubject to "Test!"
set theContent to "Testing!"
set theAttachmentFile to "Macintosh HD:Users:gp:Documents:Steve.jpg" -- To make it automatically.

tell application "Mail"
	
	##Create the message.
	set theMessage to make new outgoing message with properties {subject:theSubject, content:theContent, visible:true}
	
	##Let's configure the recipient. 
	tell theMessage to make new to recipient with properties {address:recipientAddress}
	tell theMessage to make new attachment with properties {file name:theAttachmentFile as alias}
	
	##Send the Message
	send
	
end tell

There are two things that i'm struggling here, 

 

-I can't just download the email owner from meraki, as when i tried it, it always downloads as testing <testing@testing.com> (and i just want the email).

 

-I need to find a way to directly download the CSV from Meraki, i tried with Automator but i can't log in on Meraki website with it. 

 

Let me know what you think!

 

Thanks. 

Kind of a big deal

Re: Automatic e-mail.

@gpintop I configured my dasboard to display just the owner section (the "+" in the arrow lets you do this). It exported like this:

 

Owner

first, last <doejohn@mycompany.com>

 

I am wondering if you could pull info for the script like that. I am going to forward this over to our software engineer and see what he can come up with.

Find this helpful? Click the kudos button. Thanks!
Conversationalist

Re: Automatic e-mail.

That's exactly the issue that i'm facing to send personalized emails, as i don't know if it's possible to set up the script to search eveything between <>. 

 

Let me know if you engineer could figure something out. 

Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.
Labels