Problem with the flow of invoices

%3CLINGO-SUB%20id%3D%22lingo-sub-1848428%22%20slang%3D%22en-US%22%3EProblem%20with%20the%20flow%20of%20invoices%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1848428%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20created%20an%20automated%20flow%20which%20starts%20and%20is%20based%20on%20Forms.%3C%2FP%3E%3CP%3EWhen%20our%20employee%20adds%20the%20customer%20and%20order%20details%20and%20clicks%20Send%20it's%20aggregated%20to%20the%20Excel%20on%20OneDrive%20and%20then%20all%20the%20details%20are%20beeing%20sent%20to%20our%20Accounting%20department.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20problem%20we%20are%20facing%20is%20that%20when%20an%20Accounting%20dept.%20employee%20recieves%20these%20details%20-%20she%2Fhe%20has%20to%20respond%20in%20another%20Forms%20if%20the%20details%20are%20fine%20and%20there%20is%20a%20place%20to%20put%20(upload)%20that%20finished%20Invoice.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20at%20the%20testing%20stage%20(when%20I%20gave%20a%20link%20to%20the%20starting%20Forms%20to%20our%20employees)%20we%20have%20noticed%20that%20when%20Accounting%20dept.%20employee%20responds%20in%20Forms%20at%20%22Po%20przes%C5%82aniu%20nowej%20odpowiedzi%202%22%20or%20%22Po%20przes%C5%82aniu%20nowej%20odpowiedzi%203%22%20if%20there%20is%20more%20than%20one%20Flow%20awaiting%20-%20she%2Fhe%20is%20not%20sending%20the%20Invoice%20to%20the%20correct%20employee.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20looks%20like%20she%2Fhe%20is%20always%20answering%20through%20the%20Forms%20to%20the%20NEWEST%20recieved%20flow.%20I%20guess%20it%20could%20be%20the%20problem%20with%20ID%20Key%20but%20I%20am%20not%20sure.%3C%2FP%3E%3CP%3EWe%20need%20it%20to%20work%20for%20more%20than%20one%20flow%20at%20once.%20Accounting%20dept.%20member%20responds%20to%20the%20flows%20once%20a%20day%20(at%20the%20end%20of%20the%20day).%20They%20have%20a%20dedicated%20e-mailbox%20to%20recieve%20and%20respond%20to%20the%20flows.%3C%2FP%3E%3CP%3EThis%20has%20to%20work%20in%20such%20a%20way%20that%20the%20oldest%20email%20still%20answers%20through%20the%20Forms%20the%20right%20person.%20Now%20person%20A%2C%20starting%20the%20workflow%20at%2012%3A00%2C%20waits%20for%20a%20reply.%20Another%20person%20B%20is%20also%20waiting%20for%20a%20reply%20at%2013%3A00.%3CBR%20%2F%3EThe%20accountant%20by%20clicking%20on%20the%20answer%20for%20person%20A%20will%20send%20the%20answer%20to%20person%20B...%3C%2FP%3E%3CP%3EHow%20can%20I%20fix%20it%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20it%20looks%20like%20in%20general%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22pjaroch_0-1604398659376.png%22%20style%3D%22width%3A%20762px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F231149i3EB337694DB825CB%2Fimage-dimensions%2F762x435%3Fv%3D1.0%22%20width%3D%22762%22%20height%3D%22435%22%20role%3D%22button%22%20title%3D%22pjaroch_0-1604398659376.png%22%20alt%3D%22pjaroch_0-1604398659376.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EStarting%20flow%20with%20Forms%20-%26gt%3B%20Getting%20informations%20from%20Forms%20to%20Excel%20-%26gt%3B%20Sending%20an%20email%20to%20the%20Accounting%20department%20with%20all%20of%20the%20informations.%20At%20the%20bottom%20there%20are%20to%20links%20to%20another%20Forms%20(one%20to%20approve%20and%20send%20an%20invoice%2C%20another%20to%20decline%20and%20send%20information%20about%20missing%2Fwrong%20details)%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22pjaroch_2-1604399458324.png%22%20style%3D%22width%3A%20356px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F231152iEF5B3B2C7F2C398C%2Fimage-dimensions%2F356x639%3Fv%3D1.0%22%20width%3D%22356%22%20height%3D%22639%22%20role%3D%22button%22%20title%3D%22pjaroch_2-1604399458324.png%22%20alt%3D%22pjaroch_2-1604399458324.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20in%20advance%20for%20your%20help.%3C%2FP%3E%3CP%3EPawel%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1848428%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EForms%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Flow%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerAutomate%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1852853%22%20slang%3D%22en-US%22%3ERe%3A%20Problem%20with%20the%20flow%20of%20invoices%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1852853%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%20i%20would%20like%20to%20bump%20this%20thread.%20Thanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1853151%22%20slang%3D%22en-US%22%3ERe%3A%20Problem%20with%20the%20flow%20of%20invoices%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1853151%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F850201%22%20target%3D%22_blank%22%3E%40pjaroch%3C%2FA%3E%26nbsp%3Bthe%20problem%20is%20you%20have%20got%203%20triggers%20in%20your%20flow%20for%20when%20a%20new%20response%20is%20submitted.%20You%20can%20only%20have%201%20trigger.%20I%20suggest%20you%20save%20the%20first%20form%20response%20to%20a%20SharePoint%20list%20which%20has%20a%20column%20for%20each%20answer%20in%20the%20form%2C%20columns%20for%20the%20approval%2Frejection%20decision%20and%20date%20and%20any%20comments.%20You%20should%20also%20then%20have%202%20single%20line%20of%20text%20columns%2C%20one%20to%20have%20a%20JSON-formatted%20button%20to%20trigger%20the%20flow%20if%20the%20invoice%20details%20are%20OK%2C%20and%20a%20similar%20column%20to%20trigger%20the%20other%20flow%20if%20the%20details%20are%20not%20OK.%20So%20you%20would%20have%203%20flows%2C%20but%20the%20way%20you%20have%20it%20at%20the%20moment%20won't%20work.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20an%20image%20of%202%20buttons%20on%20a%20list%20column%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22buttons.png%22%20style%3D%22width%3A%20680px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F231433iE9C48D8D34A8E71D%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22buttons.png%22%20alt%3D%22buttons.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eand%20each%20column%26nbsp%3B%20is%20formatted%20as%20follows.%20You%20need%20to%20change%20the%20txtContent%20line%20to%20the%20test%20you%20wanton%20the%20button%2C%20and%20you%20also%20need%20to%20change%20the%20ID%20of%20the%20flow%20to%20your%20flow's%20ID%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-json%22%3E%3CCODE%3E%7B%0A%20%20%22%24schema%22%3A%20%22https%3A%2F%2Fdeveloper.microsoft.com%2Fjson-schemas%2Fsp%2Fv2%2Fcolumn-formatting.schema.json%22%2C%0A%20%20%22elmType%22%3A%20%22button%22%2C%0A%20%20%22txtContent%22%3A%20%22Publish%22%2C%0A%20%20%22customRowAction%22%3A%20%7B%0A%20%20%20%20%22action%22%3A%20%22executeFlow%22%2C%0A%20%20%20%20%22actionParams%22%3A%20%22%3D'%7B%5C%22id%5C%22%3A%20%20%5C%22'%20%2B%20if(%5B%24Control%5D%20%3D%3D''%2C'd4e4bb15-504f-44d5-b94c-745ddc4ce1bb'%2C'')%2B%20'%5C%22%7D'%22%0A%20%20%7D%2C%0A%20%20%22style%22%3A%20%7B%0A%20%20%20%20%22background-color%22%3A%20%22%3Dif((%5B%24Control%5D%20%3D%3D%20'Published')%2C'%23333333'%2C'%231f5f61')%22%2C%0A%20%20%20%20%22color%22%3A%20%22white%22%0A%20%20%7D%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERob%3CBR%20%2F%3ELos%20Gallardos%3CBR%20%2F%3E%3CFONT%20size%3D%222%22%20color%3D%22%23006400%22%3EMicrosoft%20Power%20Automate%20Community%20Super%20User%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1853234%22%20slang%3D%22en-US%22%3ERe%3A%20Problem%20with%20the%20flow%20of%20invoices%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1853234%22%20slang%3D%22en-US%22%3E%3CP%3E--%3C%2FP%3E%3CP%3EHello%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F174092%22%20target%3D%22_blank%22%3E%40Rob%20Elliott%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20your%20support%20in%20this%20case!%20I%20would%20like%20to%20tell%20you%20more%20about%20my%20flow.%20These%203%20triggers%20unfortunately%20are%20not%20all%20triggers%20that%20I%20need.%20Am%20I%20able%20to%20show%20you%20more%20screenshots%20through%20the%20e-mail%20or%20in%20a%20private%20message%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAll%20the%20triggers%20I%20used%20are%20over%20here%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Flow3.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F231434i6F11221DD88C8E7B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Flow3.png%22%20alt%3D%22Flow3.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3ESome%20of%20them%20are%20repeated%2C%20because%20I%20need%20them%20to%20send%20it%2C%20then%20other%20person%20has%20to%20approve%20or%20decline%20it%2C%20then%20if%20its%20approved%20they%20have%20to%20say%20if%20the%20invoice%20is%20right%20or%20not.%20If%20its%20ok%20then%20the%20flow%20is%20finished.%20If%20its%20not%20ok%20they%20have%20to%20upload%20it%20again%20and%20then%20its%20finished.%20But%20when%20we%20go%20back%20to%20%225%22%20and%20its%20declined%20there%20has%20to%20be%20the%20description%20why%20it%20was%20declined%2C%20they%20have%20to%20add%20it%20again%20and%20the%20steps%20are%20the%20same%20-%20they%20have%20to%20check%20it%2C%20approve%20it%20or%20decline%20it%2C%20add%20it%20again%20if%20its%20declined%20etc...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHaha%20it%20will%20be%20a%20bit%20elaborate%2C%20but%20our%20process%20requires%20that%20kind%20of%20stuff.%20Do%20you%20have%20any%20ideas%3F%20Should%20i%20still%20use%20Sharepoint%20List%20to%20make%20it%20work%20well%3F%20Thank%20you%20for%20all%20the%20support%20%3AD%3C%2Fimg%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPawel%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi,

 

I created an automated flow which starts and is based on Forms.

When our employee adds the customer and order details and clicks Send it's aggregated to the Excel on OneDrive and then all the details are beeing sent to our Accounting department.

 

The problem we are facing is that when an Accounting dept. employee recieves these details - she/he has to respond in another Forms if the details are fine and there is a place to put (upload) that finished Invoice.

 

But at the testing stage (when I gave a link to the starting Forms to our employees) we have noticed that when Accounting dept. employee responds in Forms at "Po przesłaniu nowej odpowiedzi 2" or "Po przesłaniu nowej odpowiedzi 3" if there is more than one Flow awaiting - she/he is not sending the Invoice to the correct employee.

 

It looks like she/he is always answering through the Forms to the NEWEST recieved flow. I guess it could be the problem with ID Key but I am not sure.

We need it to work for more than one flow at once. Accounting dept. member responds to the flows once a day (at the end of the day). They have a dedicated e-mailbox to recieve and respond to the flows.

This has to work in such a way that the oldest email still answers through the Forms the right person. Now person A, starting the workflow at 12:00, waits for a reply. Another person B is also waiting for a reply at 13:00.
The accountant by clicking on the answer for person A will send the answer to person B...

How can I fix it?

 

How it looks like in general:

pjaroch_0-1604398659376.png

Starting flow with Forms -> Getting informations from Forms to Excel -> Sending an email to the Accounting department with all of the informations. At the bottom there are to links to another Forms (one to approve and send an invoice, another to decline and send information about missing/wrong details)

pjaroch_2-1604399458324.png

 

Thank you in advance for your help.

Pawel

 

4 Replies

Hi, i would like to bump this thread. Thanks

@pjaroch the problem is you have got 3 triggers in your flow for when a new response is submitted. You can only have 1 trigger. I suggest you save the first form response to a SharePoint list which has a column for each answer in the form, columns for the approval/rejection decision and date and any comments. You should also then have 2 single line of text columns, one to have a JSON-formatted button to trigger the flow if the invoice details are OK, and a similar column to trigger the other flow if the details are not OK. So you would have 3 flows, but the way you have it at the moment won't work.

 

This is an image of 2 buttons on a list column:

 

buttons.png

 

and each column  is formatted as follows. You need to change the txtContent line to the test you wanton the button, and you also need to change the ID of the flow to your flow's ID:

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "button",
  "txtContent": "Publish",
  "customRowAction": {
    "action": "executeFlow",
    "actionParams": "='{\"id\":  \"' + if([$Control] =='','d4e4bb15-504f-44d5-b94c-745ddc4ce1bb','')+ '\"}'"
  },
  "style": {
    "background-color": "=if(([$Control] == 'Published'),'#333333','#1f5f61')",
    "color": "white"
  }
}

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

--

Hello @RobElliott 

 

Thank you for your support in this case! I would like to tell you more about my flow. These 3 triggers unfortunately are not all triggers that I need. Am I able to show you more screenshots through the e-mail or in a private message?

 

All the triggers I used are over here:

Flow3.png

Some of them are repeated, because I need them to send it, then other person has to approve or decline it, then if its approved they have to say if the invoice is right or not. If its ok then the flow is finished. If its not ok they have to upload it again and then its finished. But when we go back to "5" and its declined there has to be the description why it was declined, they have to add it again and the steps are the same - they have to check it, approve it or decline it, add it again if its declined etc...

 

Haha it will be a bit elaborate, but our process requires that kind of stuff. Do you have any ideas? Should i still use Sharepoint List to make it work well? Thank you for all the support :D

 

Pawel

@pjaroch sorry but that just isn't do-able. A flow can't trigger a form to be sent, there is no action for that, the flow just waits for when a form has been submitted. And as I said earlier, you can only have 1 trigger in a flow. So you are going to have to re-think and I do think a SharePoint list is the best way to go to hold the status of the invoice and approvals as I said earlier, and then use "Start and wait for an approval" action in the flow.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User