Fandom

HabitRPG Wiki

Zapier

755pages on
this wiki
Add New Page
Talk3 Share

Note: There are two versions of the Zapier Habitica integration and this page describes the unofficial one. According to the the developer of the unofficial version, the official version should be used instead and the unofficial version will be deleted (see Trello card). This page will need to be reworked to be about the official version. See this Habitica Developer Blog post for information about getting started using the official version. If you are interested in working on this page and have any questions, use the Talk page or visit the Wizards of the Wiki guild. --Sonnet73 (talk) 03:28, March 9, 2017 (UTC)


Description

Zapier is a tool that allows non-technical users to connect different web apps with each other. You can connect Habitica with any other Zapier app, such as Google Sheets, RescueTime, Evernote, Trello, or GitHub. You can perform actions in other apps based on actions occurring in Habitica, or vice versa.

Please note: This Zapier app has not been reviewed or approved by Zapier for functionality or security. There is a Trello card discussing the Zapier app.

Installation

  1. Sign up for Zapier
  2. Go to the Zapier Developer invite link
  3. Choose Accept Invite & Go to Dashboard
  4. Habitica will now be available for your Zaps.

Usage

Triggers:

  • New Party Chat Triggers when a new party chat appears.
  • New Task Triggers when a new task is created.
  • Scored Task Triggers when you score a task. This happens when you click a Habit (positive or negative), complete a Daily, or complete a To-Do.

Actions:

  • Create Task Creates a task. A task can be a Habit, Daily, or To-Do.
  • Score Task Scores a task (Habit, Daily, To-Do, or Reward), including completing a Daily / To-Do (Up), uncompleting a Daily / To-Do (Down), or clicking on a Habit (positive or negative). You have to provide the Task ID of the task to score it. The easiest method of finding a Task ID is to use the Task Adjustor (direct link) and click "toggle developer data" after logging in.
  • Find Task Find a task by its name. Only exact matches (case insensitive) work.


Tips & Tricks Edit

General Edit

  • Because Zapier fetches data periodically (every 5 to 15 minutes), party chats may appear out of order if two or more chat messages get posted during that time. For example, a 12:54pm message may be fetched before a 12:51pm message.
  • For the New Party (Guild) Chat trigger, one or more messages must already exist in the party or guild when setting up the Zap. Otherwise, the trigger will fail.
  • When creating tasks, the Due Date needs to be changed to the UTC time zone in order to appear correctly on the website.
  • Currently, the Due Date for Create Tasks is not populating correctly for the app (but will show correctly on the website). To fix this, just update the date manually.
  • Zapier does not support two-way syncing at the moment. Thus, keeping records up to date after the initial Trigger and Action is not currently supported. Think of Zaps as one-way, one-time actions. For more information, see this official article from Zapier.

Google Sheets Edit

  • Google Sheets must:
    • have a header record on the first row
    • not have any blank rows between any records
  • Times in Habitica are stored in Epoch time. To show correctly in Google Sheets, use the appropriate time-date formatting and:
    • To convert to UTC, add ts in front of the Time field. For example, ts[Habitica Timestamp]. Note: no equal sign is used.
    • To convert to your local time, use =[Habitica Timestamp]/86400000+"1 Jan 1970"+[GMT Adjustment]/24, where the [GMT Adjustment] is the number of hours ahead of or behind GMT. For example, PDT is GMT -7, so the formula will be =[Habitica Timestamp]/86400000+"1 Jan 1970" + -7/24.
  • When using Create Task Action to convert Due Dates to the correct UTC format, use the following formula: =[Excel Field with Date]+([GMT Adjustment]/24). For example, if the time zone is PDT (GMT -7) and the date field is in C2, then the formula will be =C2+(-7/24)

Samples Edit

Copy Party/Guild Chat into Google Sheets Edit

Zapier-SampleGuildChat GoogleSheet

Blank Google Sheet With Header

  1. Create a Google Sheet with the column headings you wish to capture, like Name, Level, Timedatestamp, and Text.
  2. Format the Timedatestamp field using the appropriate time-date formatting.
  3. Go to the Zapier Dashboard. Choose Make a Zap.
  4. Choose Habitica as the Trigger App.
  5. Choose New Party Chat and Save + Continue.
  6. If not already completed, choose Connect to New Account and fill out your UID and API Token, which can be found on the Habitica website via Settings > API.
  7. Select the account and click Save + Continue.
  8. Select either your party or a guild and click Continue.
  9. Ensure there is at least one message in the selected party/guild's chat. Click Fetch & Continue.
  10. You should get a message saying, "Test Successful!". If you do not, please check that there is at least one line of chat in the party/guild selected. You can see the results by clicking View Your Chat, which will display the last line in the guild. Click Continue.
  11. Choose Google Sheets as your action.
  12. Choose Create Spreadsheet Row.
  13. If not already completed, choose Connect to New Account and fill out your Google username and password.
  14. Select the Account and click Save + Continue.
  15. Select the Spreadsheet and appropriate Worksheet.
  16. Zapier-SampleGuildChat SetFieldToPopulate

    Linking Habitica fields to populate Google Spreadsheet

    Fill out Column Details: (These columns may not appear in the same order)
    • Date/time: =[Step 1 Timestamp]/86400000+"1 Jan 1970" + -7/24 for PDT(GMT-7). Please see Tips & Tricks For Google Sheets for more about formatting timestamps.
    • Name: [Step 1 User Name]
    • Level: [Step 1 Contributor Level]: [Step 1 Contributor Text]
    • Text: [Step 1 Text]
  17. Click Continue.
  18. You can Test Google Sheets by inserting the last line of chat into your spreadsheet. Click Create & Continue.
  19. You should get a message saying, "Test Successful!" If you do not, please check that there are no blank rows between any records.
  20. Open your spreadsheets and review your results.
    • The first row may read, "Added by Zapier, ensuring we can access this spreadsheet. Feel free to delete it after you are all set up!" You can delete this row. (Do not just clear the content, but remove the entire row; otherwise, your Zap will stop populating!)
    • The next line will be the automatically entered line of chat.
  21. Click Finish.
  22. Name your Zap and click Your Zap Is On for it to start collecting data.
Zapier-SampleGuildChat FinalGoogleSheet

Final Google Sheet With Chat

Zapier-SampleGuildChat FinalCorrespondingChat

Corresponding Chat for Final Spreadsheet

Load New To-Dos from Google Sheets Edit

This method shows how to load To-Dos when a new row is created. Therefore if there is already an existing list, or if you wish to edit the To-Dos before uploading, edit in a separate document first, and then paste the row into a Google Sheet once the Zap is on.

Zapier-GoogleLoadToDo GoogleSheet

Google Sheet With one To-Do Task

  1. Create a Google Sheet with the following headings: Task Name, Notes, Actual Due Date, UTC Due Date.
  2. Format the Due Date fields with appropriate time-date formatting.
  3. Fill out the Task Name, Notes and Actual Due Date. Only add one To-Do row as subsequent rows will be ignored and not loaded. Add these tasks after creating the Zap.
  4. In the UTC Due Date Field, use =C2+(-7/24) for PDT(GMT-7).
  5. Go to the Zapier Dashboard. Choose Make a Zap.
  6. Choose Google Sheets as the Trigger App.
  7. Choose the Trigger as New Spreadsheet Row and click Save + Continue.
  8. If not already completed, choose Connect to New Account and fill out your Google username and password.
  9. Select the Account and choose Save + Continue.
  10. Select the Spreadsheet and appropriate Worksheet and click Continue.
  11. Click Fetch & Continue to confirm that it is able to read one task.
  12. You can view the spreadsheet row to confirm the data is correct. Click Continue once done.
  13. Choose Habitica as the Action App.
  14. Choose Create Task as your option and click Save + Continue
  15. If not already completed, Choose Connect to New Account and fill out your UID and API Token which can be found on the Habitica website via Settings > API.
  16. Select the account and click Save + Continue.
  17. Fill out Column Details:
    • Type: To-Do
    • Task: [Step 1 taskname]
    • Notes: [Step 1 notes]
    • Due Date: [Step 1 utcduedate]
  18. Click Continue.
  19. Review it is correct and click Create & Continue
  20. Zapier-GoogleLoadToDo FinalTask

    Habitica To-Do Created

    Sync your Habitica Account on the App or Website and review your new task.
  21. Click Finish.
  22. Name your Zap and click Your Zap Is On.
  23. Add new rows for new To-Dos as desired, ensuring the UTC Due Date column is populated appropriately.

Add Completed Tasks to Your RescueTime Edit

A premium RescueTime account is required for this (direct link).

  1. Go to the Zapier Dashboard. Choose Make a Zap.
  2. Choose Habitica as the Trigger App.
  3. Choose Score Task click Save + Continue.
  4. If not already completed, Choose Connect to New Account and fill out your UID and API Token which can be found on the Habitica website via Settings > API.
  5. Select the account and click Save + Continue.
  6. Click Continue if Test is Successful.
  7. Choose RescueTime as the Action App.
  8. Choose Log a Highlight Event. Click Save + Continue.
  9. If not already completed, choose connect to new account and fill out your RescueTime username and password.
  10. Select the Account and click Save + Continue.
  11. Zapier-RescueTime SetupFields

    Habitica To-Do Created

    Fill out Column Details:
    • Date/Time: [Step 1 Updated At]
    • Description: [Step 1 Task Text] was scored [Step 1 Direction]. Completion: [Step 1 Task Completed]
    • Action Label: Habitica
  12. Click Continue.
  13. Review it is correct and click Create & Continue.
  14. Click Finish.
  15. Name your Zap and click Your Zap Is On.
Rescuetime

Habitica To-Do Created

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.