Fandom

HabitRPG Wiki

Zapier

729pages on
this wiki
Add New Page
Talk2 Share

Description

Zapier is a tool for primarily non-technical users to connect together web apps. With this Habitica App Integration you are able to integrate with any other Zapier Integration Apps, like Google Sheets, Rescue time, Evernote, Trello, Github etc and either perform actions in other apps based on information occurring in Habitica, or vice versa.

Please note: This Zapier app has not been reviewed or approved by Zapier for functionality or security. The Trello card discussing the Zapier App can be found here

Installation

  1. First sign up for https://zapier.com/sign-up/
  2. Go to the link Developer Zapier Link
  3. Choose Accept Invite & Go to Dashboard
  4. Habitica App 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 positive/minus click a habit, 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). That is either completes a Daily / To-Do (Up), uncompletes a Daily / To-Do (Down) or positive/minus click on a habit. You have to provide the TaskId of the task to score it.
  • Find Task Find a task by its name. Only exact matches work. Search is done case insensitive.


Tips & Tricks Edit

General Edit

  • Because Zapier is fetching data periodically (every 5 to 15 minutes), party chat may appear out of order if two or more chat messages occurs during that time. 12:54pm message may be fetch first and action before the 12:51pm message.
  • The New Party (Guild) Chat trigger, there must be one ore more messages already existing in the party or guild when setting up the Zap. Otherwise it will fail.
  • When creating tasks, the Due Date needs to be change for UTC Timezone in order to appear correctly in the website.
  • Currently the Due Date for Create Tasks is not populating correctly for the app. (Will show correctly on the website). To fix, just update the date manually.

Google Sheets Edit

  • When using Google Sheets, they must:
    • have a header record on the first row;
    • not have any blank records in between.
  • Times in Habitica are stored in Epoch time. To show correctly in Google Sheets format the field to be populate to time/date stamp and either:
    • 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

=[Habitica Timestamp]/86400000+"1 Jan 1970"+[GMT Adjustment]/24 where the [GMT Adjustment] is number hours in front or behind GMT. For PDT, that 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 timezone is PDT, that is 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, Text.
  2. Format the Timedatestamp field with appropriate time-date formatting.
  3. Go to Zapier Dashboard. Choose Make a Zap.
  4. Choose the Trigger App as Habitica.
  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 here on the Habitica website
  7. Select the account and click Save + Continue.
  8. Select either your Party/Guild as you desire and click continue.
  9. Ensure there is at least one message in the selected Party/Guild's chat. Click Fetch & Continue.
  10. It should state Test Successful! If it does not, please check there is at least one line of chat in the guild / party selected. You can see the results by clicking view your chat and you will see the last line displayed 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 & appropriate Worksheet.
  16. Zapier-SampleGuildChat SetFieldToPopulate

    Linking Habitica fields to populate Google Spreadsheet

    Fill out Column Details with the items for Habitica code. (These columns may not appear in the same order)
    • datetime as

=[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 as [Step 1 User Name]
    • level as [Step 1 Contributor Level]: [Step 1 Contributor Text]
    • text as [Step 1 Text]
  1. Click Continue.
  2. It will give you ability to Test Google Sheets, by inserting the last line of chat into your spreadsheet. Click Create & Continue.
  3. It should state Test Successful! If it does not, please check there is no blank lines from the 1st row (header) to the row it is adding data.
  4. Open your spreadsheets and review your results.
    • The first row may state :
      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 line of chat that automatically entered.
  5. Click Finish.
  6. 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 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 as desired. 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

=C2+(-7/24) for PDT(GMT-7).

  1. Go to Zapier Dashboard. Choose Make a Zap.
  2. Choose the Trigger App as Google Sheets.
  3. Choose the Trigger as New Spreadsheet Row and click Save + Continue.
  4. If not already completed, choose connect to new account and fill out your Google username and password.
  5. Select the Account and choose Save + Continue.
  6. Select the Spreadsheet & appropriate Worksheet and click Continue.
  7. Click Fetch & Continue to confirm able to read one task.
  8. You can view the spreadsheet row to confirm the data is correct. Click Continue once done.
  9. Click the Habitica App as the Action.
  10. Choose Create Task as your option and click Save + Continue
  11. If not already completed, Choose Connect to New Account and fill out your UID and API Token which can be found here on the Habitica website
  12. Select the account and click Save + Continue.
  13. Fill out Column Details with the items for Habitica code.
    • Type as To-Do
    • Task as [Step 1 taskname]
    • Notes as [Step 1 notes]
    • Due Date as [Step 1 utcduedate]
  14. Click Continue.
  15. Review it is correct and click Create & Continue
  16. Zapier-GoogleLoadToDo FinalTask

    Habitica To-Do Created

    Sync your Habitica Account on the App or Website and review your new task.
  17. Click Finish.
  18. Name your Zap and click Your Zap Is On.
  19. 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 account of RescueTime is required for this. Direct link

  1. Go to Zapier Dashboard. Choose Make a Zap.
  2. Choose the Trigger App as Habitica.
  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 here on the Habitica website.
  5. Select the account and click Save + Continue.
  6. Click Continue if Test is Successful.
  7. Click 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 with the following items:
    • Date/Time as [Step 1 Updated At]
    • Description as [Step 1 Task Text] was scored [Step 1 Direction]. Completion: [Step 1 Task Completed]
    • Action Label as 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.