I’ve been playing around with the Android app Automate, and it seems pretty slick.
Anyway, I found a pretty neat way to use it to post datapoints to Beeminder, so I thought I’d share.
Step 1: Create your Beeminder Service flow
Create a flow that your other flows will use to post a datapoint to Beeminder. I called mine “Beeminder Service.” Here’s a screenshot of the flow:
The “Log” block is optional, but nice for debugging.
The block that does all the work is the “HTTP request” block. But before you can add that, you’ll need to modify the “Flow beginning” block to accept a payload from the other flows that will use this flow. To do that, tap the “Flow beginning” block and enter “data” (with no quotes) into the “Payload” field.
Now you’re ready to add the HTTP request block. Here’s a screenshot of the important settings:
Be sure to change the text in the red circles to your Beeminder username and auth token.
Step 2: Use the Beeminder Service Flow
Now you can start using this flow from your other flows in order to add Beeminder datapoints.
In a new flow, use the “Flow start” block to trigger your Beeminder Service flow, and include a dictionary in the Payload with “comment”, “value”, and “goal” keys:
Note that your flow URI for the Beeminder Service flow will probably be different from mine.
And that’s it! You should be able to run the parent flow and it will call the Beeminder Service flow, which will then use the data you passed to it in order to post a datapoint to Beeminder.