unofficial reverse-engineered Perl 5 interface to Workflowy
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


    WWW::Workflowy - an unofficial API for Workflowy

    version 0.1

      use WWW::Workflowy;

      # manually log in and update the tree
      my $wfl = WWW::Workflowy->new();
      $wfl->log_in('', 'workflowy_password');

      # same as above but with less code
      my $wfl = WWW::Workflowy->new( username => '', password => 'workflowy_password');

      # all list data lives in $wfl->tree
      use Data::Dumper;
      print Dumper($wfl->tree);

      # create a new item
      my $parent_id = ...; # grab the id of a parent from $wfl->tree
      my $child_data = {
        name => 'This is a new Workflowy list item!',
        note => 'This item has a note', # optional
        priority => 999, # put this item below all its siblings
      $wfl->create_item( $parent_id, $child_data);

      # update an item
      my $item_data = {
        id => ..., # grab this value from $wfl->tree
        name => "This item has been edited."
        note => "This note has been edited too.",

      # log out (happens automatically during object destruction)

      This module provides an unoffical Perl interface for retrieving and manipulating the data stored in a Workflowy list.

      Note that Workflowy do not currently attempt to maintain a stable API, so it is possible that this module could break without notice.  The maintainer of this module uses it on a daily basis and will try to keep it running, but using it for anything mission-critical is ill-advised.

      This module is not officially affiliated with or supported by Workflowy.

    the user agent used to access Workflowy

    This is a read-only ArrayRef that contains all items in the workflowy
    list. To modify the tree, use edit_item or create_item. Each item has
    the following format:

    *   id - a UUID that identifies this item

    *   nm - the name of this item

    *   no - the note attached to this item (only present when used)

    *   ch - an ArrayRef of this item's children (only present when used)

    stores configuration information from Workflowy

    stores the id of the most recent transaction

    true if this instance has successfully logged in and hasn't logged out

    internal cache that maps child ids to parent ids

    internal cache that maps ids to item hashrefs

    the url where Workflowy (or some hypothetical compatible service) lives

    workflowy-internal int that's used for API versioning; if this changes,
    API breakage is very likely

  log_in($username, $password)
    Log in to a Workflowy account.

    Be polite and log out. This method is called automatically on
    destruction, so you probably don't need to use it explicitly unless
    you're doing something unusual.

    Retrieve the current state of this user's Workflowy tree. Since this is
    the primary method of retrieving data from Workflowy, you'll need to
    call this method before attempting to manipulate any Workflowy data.

    Modify the name and/or notes of an existing item.

  create_item($parent_id, $child_data)
    Create a child item below the specified parent and return the id of the
    new child.

    Given the id of a valid child, return the id of its immediate parent.

    Return the id of the most recent transaction.

    Calculate and return the client_timestamp, as expected by workflowy.
    Omitting this field from a request appears to have no effect, but I
    implemented it while debugging something else and don't see any reason
    not to keep the code around.

  _run_wf_ops ()
    apply a set of operations from Workflowy to the local representation of
    the tree

    Apply a create operation from Workflowy to the local tree.

    Apply an edit operation from Workflowy to the local tree.

    Apply a move operation from Workflowy to the local tree.

    Apply a delete operation from Workflowy to the local tree.

    Generate a random alnum string of $len characters.

    Generate a uuid using rand as the source of entropy.

    Calculate and cache information on each item.

  _update_maps_rec($children, $parent_id)
    helper for _update_maps

    Try to check that Workflowy isn't serving an unknown version of their
    api. If the version number from Workflowy is different from the
    hard-coded value from this module, return false. Otherwise return true;

    Christoph Otto <>

    This software is copyright (c) 2012 by Christoph Otto

    This is free software; you can redistribute it and/or modify it under
    the same terms as the Perl 5 programming language system itself.