IFTTT (If This Then That) is a site that allows you to create actions between your apps and devices that don't normally communicate with each other.
Glitch is a site that allows users to create apps for other users to download and modify. Users can 'remix' an app to make a copy with their own modifications. This process is used to create the IFTTT action.
An application that allows IFTTT users to add items to their To-Do list in Habitica via the IFTTT trigger(s) of choice.
You also can view instructions for setting this extension up here.
- Remix the Glitch project to create your personal copy. You can use this link or click the Remix to Edit button at the top of the app page.
- Make a note of the project name in the upper left-hand corner of the screen, you will need it later in IFTTT. This project name is randomly generated, but you can change it by clicking on it.
- Configure the
.envfile by adding your User ID and API Token, which can be found in your Habitica API Settings. Create the
GLITCH_APP_KEY, used for security, using a random string of numbers and letters. It's recommended to use something like random.org to generate the string.
- Next, in IFTTT, click New Applet to create the action.
- Click +this to specify the service to be triggered with the "If" condition. For example: Google Assistant, Amazon Alexa, Weather Underground, or browse the services & use your imagination! Note: If this is your first time adding this connection, follow the prompts to grant access to the service.
- Click +that to add the "Then" condition. Search for "Webhooks" and Connect then select the Make web request action.
- Fill in the web request dialog:
- In the URL field, enter the url for your remix. This will have the format: https://
your-project-name.glitch.me/. You can also get it by clicking the Show button and copying the url in the address bar.
- Select "POST" from the Method dropdown.
- Select "application/x-www-form-urlencoded" from the Content Type dropdown.
- In the Body field, enter: title=YOUR_INGREDIENT&key=GLITCH_APP_KEY. After you've typed "title=", click Add ingredient and select the field you want to use as the title for your To-do item, this will fill in YOUR_INGREDIENT. Replace GLITCH_APP_KEY with the key you generated for the .env file.
Note: Remove any extraneous spaces, there should be no spaces next to either '=' sign. They will cause your web request to fail.
Your IFTTT is now ready to run.
If the action doesn't work, here are two ways you can troubleshoot the problem(s):
- In IFTTT, click the gear icon on the applet to configure it. Next, click View activity log. You will be presented with a list of times the applet has been updated & run. Click Show details to see a list of the ingredients generated during the run.
- You can also check the Glitch logs by editing your project and clicking Logs. This will show you if the remix failed due to a bad key (possibly because of a tricky space).