Skip to content

Python script to send SMS, emails and letters via the GOV.uk Notify website using only the command line. The python script needs to be converted into an executable.

Notifications You must be signed in to change notification settings

Cotswoldsmaker/GOV_uk_Notify_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Python code to link to GOV.uk Notify

This python script was created to use with the Open source robotic process automation program (RPA) AutoHotKey. It uses the command line arguements as inputs. Hence, it can be used by any program, or even typed manually into the command line to send SMS messages, emails or letters via the GOV.uk Notify service

You need to sign up to GOV.uk first and then get an API-key and template ID. You need to create templates with the below 'personalisations'.

Once you have them the following arguments are taken:

Arguments:

  1. "SMS", "email" or "letter" to inform what communication method is required
  2. AKI_key
  3. template ID

SMS:

  1. mobile number in format 07123456789
  2. message

Email:

  1. email address
  2. subject
  3. message

letter:

  1. address, using semi-colon ";" to denote new lines
  2. from
  3. heading
  4. body

To make into an executable, make sure you have pyInstaller installed. Then go into the folder with your code and run:

pyinstaller --onefile .\GovNotify.py

The dist folder will then hold the exe

About

Python script to send SMS, emails and letters via the GOV.uk Notify website using only the command line. The python script needs to be converted into an executable.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages