How i built an email notifyer for code-canyon Sales

Ashfaque Ali
3 min readApr 11, 2020

--

I am a developer and i love to sell my developed apps on code-canyon, i started this years ago, but this year i did with more interest.

All looks good to me to sell my code at code-canyon except one thing that i never received any email regarding new sell eg customer purchased your item, i am not sure about this why they don’t do this, but this is interesting and definitely who is selling something would love to know that he got 1 more customer, everyone loves the $$ notifications in email

Well, looking into this case i built my own simple script by spending few hours on this, so i wanted to share this with other as well, maybe that will help anyone who is aware with this notification issue.

Requirements

Send-grid API key (login to your account and go here)

Python environment

Let’s get started

Create send-grid API key, login to your account go to https://app.sendgrid.com/settings/api_keys click on button create api key

Note : do not give all permissions to the API, you must created restricted access API key, for email send “Mail Send” permission is required only, for security purpose do not allow other permissions, attached is screenshot for idea.

clone the repository from here

git clone https://github.com/ashfaqahmed/codecanyon-new-sales-notifyer

cd codecanyon-new-sales-notifyer

modify .env file as per your need and replace from email to email and receiver email and also add API key as we created above from send-grid

Note : you must add author profile link from for code-canyon in file .env example https://codecanyon.net/user/your_user_name

Install required dependencies

pip install requests 
pip install sendgrid
pip install python-dotenv
pip install beautifulsoup4

test script via command

python3 notify.py

if you have modified all configs properly you should receive email (if you have set NOTIFY_ONLY_NEW_SALE in .env it will only send email when there is any new sell, please change it to 0 for testing purpose.

got email notification ?

That’s it

I know script is so simple and have few basic lines of code but it helped me out rather than daily logging into my account or open URL for my author page to check my sales, hope you will find this helpful.

For further details to add cron job on server please check repository description.

Thank you

--

--

Ashfaque Ali
Ashfaque Ali

No responses yet