Tags: Discounts, Schedule
You know what's worth celebrating? SPACE. Use this task to activate a discount code every time the International Space Station passes over your store (or some other location of your choice), powered by Mechanic webhooks, IFTTT, and NASA. 🚀
- View in the task library: tasks.mechanic.dev/activate-a-discount-when-iss-passes-overhead
- Task JSON, for direct import: task.json
- Preview task code: script.liquid
{
"discount_code__required": "SPAAAACE",
"discount_percentage__number_required": "20.0",
"notification_email_address__email": ""
}
Learn about task options in Mechanic
user/space/iss
Learn about event subscriptions in Mechanic
You know what's worth celebrating? SPACE. Use this task to activate a discount code every time the International Space Station passes over your store (or some other location of your choice), powered by Mechanic webhooks, IFTTT, and NASA. 🚀
To get set up, follow our guide on Triggering tasks with IFTTT, with these modifications:
-
When configuring your Mechanic webhook, use the event topic
user/space/iss
. -
When choosing an IFTTT service (for "+this"), search for and select the "Space" service.
-
When choosing an IFTTT trigger, select "ISS passes over a specific location", and choose the location of your store. Or, whatever location you prefer. :)
-
When configuring the webhook action, set the content type to "application/json", and set the body to the following code:
{ "duration_seconds": "{{DurationSeconds}}", "location_map_url": "{{LocationMapUrl}}" }
That's it! :) Every time the ISS arrives at your location, this task will activate the discount code of your choice (re-activating it when it already exists, and creating it if it does not), setting it to expire when the ISS departs.
Find this task in the library at tasks.mechanic.dev, and use the "Try this task" button. Or, import this task's JSON export – see Importing and exporting tasks to learn how imports work.
Found a bug? Got an improvement to add? Start here: ../../CONTRIBUTING.md.
Submit your task requests for consideration by the Mechanic community, and they may be chosen for development and inclusion in the task library!