Several images upload and handling logic in FlowXO

(AlexPtv) #1

Several images upload and handling logic.

Greets all,
Being familiar with other bot creating platforms logic algorithms like DialogFlow and Botmother, checking this one to understand how it handles old but gold issue of user sends to bot some media, that bot should process.

Correct me pls if Im wrong, but it seems at the moment Flow XO can manage above-mentioned issue with ONLY model of 2 flows, where flow 1 is trigger-message which asking user to send media, flow 2 is trigger -file for mentioned media.

The sample was set by Karen Barker (Custom requesto to send an image to telegram ), thanks to her once again.

I need bot in Telegram to get 2 files from user and send them (ok, their URLs) to email.

My questions are:

  1. What should be the logic if I need FlowXO Telegram bot to get 2 (or more) files from user?
    I tried using related logic chain of Karen ammended by 4 flows, where are 2 pairs of flows (message1-file1 and message2-file2), and got several mails containing file1 and file2 URLs, instead of awaited 2 emails with {{file1}} and {{file2}} URL - where is mistake?

  2. From above question, {{file1}} URL data is ONLY stored in related flow (mean flow1)? So when Flow2 executed after Flow 1, Flow2 obviously has no URL data of file1, correct?
    Thus I cant first get 2 files, and then send email containng 2 file URLs, as I consider, only by step-by-step emailing. Thats correct?

  3. By what logic flows are executed?
    Say, in folder 1 there 3 flows (named 1,2,3) - what flow will be executed 1st, 2nd and 3rd? By order of creation timestamp?
    And If I have several folders with several flows in, all is ON - how would they be executed, by what priority?

Thank you.

Handling `Goto a labels` anchors for multi-options `Ask a question`
(daniel.beckett) #3

Hi @MazaY

To get more than one file you still only really need to have a single flow with a new file trigger. Here’s a modified version of the flow Karen shared:

There’s a combination of filters and attributes used to track whether the user is sending the first or second file and then once both files have been received it emails the URL’s for them.

In regards to the order that flows are executed in it entirely depends on their trigger. You should have unique triggers for each flow e.g. New Message triggers with different keywords / phrases. If you have the same keywords in multiple flows or multiple catch-all flows then there’s no way to predict which flow will run or in what order.

Hope that helps! :slight_smile:


(AlexPtv) #4

Dear Daniel,
Appreciate, will proceed with checking.
Thank you.

Wow! It works great, thanks again; now looks like I should find out how it executes its lines in sample given, in order to receive the 2nd file and msg user for 2nd time, while attribs are in final part to be executed :astonished: - but its just tech details and q. of time to learn, in general its great it can process it!

(Zahra Sarlak) #5

Thanks for the flow you shared.
I used this to receive 2 image from user, and I placed a “Get all attributes” action just before “Send message to email” action, and now it doesn’t work correctly, it shows the last message before letting user to upload the second image. what did I do wrong and how can I fix it?

(daniel.beckett) #6

Hi @zahra_sarlak

It may be easier to tell what’s going wrong by seeing the flow. Please can you email with a share link for your flow. You can get the link by clicking on the ‘Private’ button near the top right corner when editing the flow.