
Background (feel free to skip)
Ok, I understand this post is kind of weird OR may not relate to everybody, but stick with me here... let...
For further actions, you may consider blocking this person and/or reporting abuse
UPDATE:
It has come to my attention that the previous script no longer works b/c of certain changes to elements in the DOM. So, I have updated the script now. Please feel free to use the latest changes as I hope it should work with recent changes to the UI on the site.
Please let me know if I have missed any weird edge cases or if the script doesn't work for any reason. Thanks!
Thanks for the quick update. This script is so useful
In April 2025, I've notice that the UI on the website has changed. The script mostly works, but you need to change the 4th line.
Change ".coupon-container" to ".coupon-container-new-ui" and it should be good to go.
Seems like it's no longer working - again. I am not a developer, but an avid user of the script and very appreciative of the efforts of Nazmuz and others (👀 bruttium). Any thoughts or suggestions to fix the script?
Replying to my own reply here - but I have just found the Chrome extension form Marcos and that will serve my purposes. Regardless, thanks to all!
Thanks so much bruttium!
Thank you! works great!
king
This works awesome!! Is there any way to get this to run periodically, like every week? Ideally I don't want to have to pay for a tool like Zapier to do so
If anyone else knows of any other sites that might require similar automation to auto-add coupons to cards, I would love to know more about it, so I can contribute to fixing those as well. Let me know, ty!
First, great job on the CVS coupons code.
My number one Supermarket site is Publix.
Publix Supermarket coupons seems like a logical next site.
You can create a login and navigate to savings and then digital coupons.
publix.com/savings/digital-coupons...
There is the same nuisance of scrolling down and clicking "Load More"
Perhaps you can automate that too?
@mikedev2025 thanks for suggesting Publix, I think this was definitely a great candidate site to automate adding digital coupons. Here is my first attempt to auto-add, all digital coupons:
dev.to/npranto/automate-adding-pub...
Hope following the steps works out for you, let me know how it goes, thanks!
Shoprite! :)
I will look into this one next maybe... thanks for the suggestion!
Second for Shoprite
to automate this a bit more, you can add this as a 'bookmarklet'
where you add this a clickable bookmark, and you dont need to go into inspector and console and copy and paste code.
freecodecamp.org/news/what-are-boo...
This thread was SUPER helpful. Make sure to minify the js code for a functional bookmarklet. I used minify-js.com/ and this output works fine in chrome:
javascript: !function(){const o=[...document.querySelectorAll("send-to-card-action")].map((o=>o?.querySelector(".coupon-container .coupon-action.button-red"))).filter((o=>null!==o));let e=o.length;var t,n;o.forEach((t=o=>{o.click(),console.log(
Coupons left: ${e}
),e-=1},n=150,(o,e)=>{setTimeout((()=>{t(o)}),e*n)}))}();THANK YOU! THANK YOU! THANK YOU! This was amazing and SO EASY to do. Saving me a ton of time.
Can't thank you enough for this! :)
Hey it seems like the script is no longer working as of today. Its returning "undefined". Last time it worked was 4 days ago for me. I guess they made changes to the website, hopefully just some updates and not something to block the automation.
Hi all, I made it even more simple. I created a Google Chrome extension to load all the coupons and add them all in one click. This solution skips all the manual steps and makes it easily accessible. Link to extension below!
chromewebstore.google.com/detail/c...
Hey Nazmuz, this recently stopped working unfortunately
I wonder if it was deliberate.
Any chance you'd consider doing this for Shoprite? They just went all digital with their coupons, too. Same format. Takes forever to load each individual coupon to your card on their app.
Thanks a lot, this works wonderfully!
This is absolutely amazing. I was just looking online to see if this was possible. Thanks alot