What is your goal?
Update a Google sheet when there are two different routes
What is the problem?
I need to update a Google sheet with the entries from a Cognito form, and if a file is included in the form, add that to a Zoho Workdrive. I found that the scenario only worked when a file was included, as it threw an error when there was no file there, so I added a router module with two routes - to the Workdrive and then to Google Sheet, or straight to Google sheet. I added filters, which checked the file field of the form entry for the text ‘https’, to determine which route should be followed, but it still only works if a file is included.
I have also tried using the non-file route as a fallback, and changing the position of the router - still no joy.
What have you tried so far?
Router module, filters, fallback route
Screenshots: scenario setup, module configuration, errors
Is the Google sheet the same either way? You don’t need a router at all here, fill out the Google sheet and then have a filter before the Zoho module and only run it if a file exists.
Hi Stoyan - thanks as always for a speedy response. The Sheets modules are not identical, unfortunately; one has to copy over the WorkDrive reference into the Sheet; if I include that in the other, it complains that it doesn’t know what it is.
Fair enough, then you do need the router with the different paths. Can you check what the cognito form returns when there is a file vs when there isn’t? Then I usually use the “exists” condition instead of checking against it containing something.
Thanks for the suggestion - I did try something similar yesterday, but I’ve just tried again, with the attached filters; I’ve shown them after a run without a file, and with a file, to show the field I’m testing does indeed change. Deosn’t seem to help, I’m afraid.
What is the iterator iterating over? Cause if its the files and they dont exist, then the iterator will have no output and the rest of the flow wont work.
So move the iterator after the router and the check if the file exists or not.
1 Like
Oh, good grief. I missed this yesterday, and have just spent a long time & many test entries arriving at exactly that conclusion! So we’ve now got:
and it works perfectly.
So thank you again for your advice, and for not making a newbie feel stupid; I help with an classic car club, and our Forum prides itself on helping with even the most basic of questions, whereas we’re often needing to remove insulting comments form our FB group.