how get an id of a particular block to store it in a variable?

17 views
Skip to first unread message

a4ud...@gmail.com

unread,
Jan 12, 2018, 11:59:52 AM1/12/18
to Automate
Hi everyone, I have a Start flow block where it's possible to specify which flow to start by its Flow URI. In manual mode it allows to browse throw all of my flows, see their Start points (controlled through the Flow beginning block) and pick up the necessary one. That works like a charm but instead of the manual process I need to pass a variable using the Function mode but I there's no such a variable out of the box.. How can I do that?
I want to share the entire flow with the community. That would eliminate others from doing that manual step..
Thanks in advance

Henrik "The Developer" Lindqvist

unread,
Jan 12, 2018, 3:10:28 PM1/12/18
to Automate
A complete Flow URI is unique to the device/install, since is contains the database id of the flow. However, a (Flow beginning) block id/number is permanent.

You can make an complete Flow beginning URI by combining an Flow URI, as returned by the Flow pick block, with the known block id/number:
flowURI++"/statements/"++blockId

to something like:
"content://com.llamalab.automate.provider/flows/1/statements/1"

Alex Chudinov

unread,
Jan 13, 2018, 3:38:43 AM1/13/18
to Automate
Thanks for the reply. When somebody copies my flow, will they have exactly the same block ids as mine?

Henrik "The Developer" Lindqvist

unread,
Jan 13, 2018, 5:23:49 AM1/13/18
to Automate
Block id/number, yes. But not Flow id/URI.
Reply all
Reply to author
Forward
0 new messages