Forum Documentation Showcase Pricing Learn more

[Solved] Google URL Shortening Workflow

Hi, I am trying to create a workflow that allows users to be able to shorten links using Google’s link shortening API. This is a picture of the page as it is now

My current setup for the workflow is

“When button shorten your link is clicked and when Current User isn’t logged in and Input “Paste Link Here’s” value contains https: and Input “Paste Link Here’s” value contains http: and when input “Paste link here’s” value contains www. show popup D”

To clarify, Popup D is the popup that shows the shortened link for users who are not logged in.

My next workflow is…

“When button Shorten your link is clicked and when current user is logged in and input Paste Link Here’s value contains http: and input Paste Link Here’s value contains https: and input paste link here’s value contains www. show popup text”

Again, to clarify, “Popup Text” Is the dialog where the user is asked whether he/she wants to save the link, which then leads to some elements being shown

Next workflow thingy:

“When button shorten your link is clicked and when input paste link here’s value doesn’t contain http: and input paste link here’s value doesn’t contain https: and when input paste link here’s value doesn’t contain www. show popup E”

To clear that up, Popup E is the “Invalid Input” Popup I made

The problem:

None of the popups are showing whatsoever. I believe I am logged in, but I am not sure whether the login page is transmitting whether I am logged in to the main page.

Thank you for kindly reading this giant hunk of scrambled mess. I hope that I can figure this out.

-HyperCamel

Yes, I did realize the page wasn’t centered. It is fixed for all those OCD people out there

Solution
(These are taken from my replies to this topic)

It [The workflow statements] had to meet all 3 of the “contains” descriptions to run, and it
didn’t, so that explains why popups weren’t showing. However, I am having trouble now filtering what can and can’t be put in the box. I have tried “and” statements and “or” statements but neither fit the bill and work. I ended up taking the filtering out of each individual block, so right now
the setup is the first block checks if the user is logged in, and if they are, it shows the “Save Link?” popup. The 2nd basically checks if the user is logged in, and if they are not, then it shows the shortened link popup. The 3rd box is what I want to filter the text with, but I am encountering problems with it.

I decided to filter them from the “Conditions” menu under the button, and made the button unclickable when the value did not contain the beginning of a link. I had several problems using the workflows to do that exact thing, because “and” and “or” were not giving me results that I wanted. Instead, I made a statement that read something like this

“When Input Paste Link Here’s value doesn’t contain https:// and Input Paste Link Here’s value doesn’t contain http:// and input paste link here’s value doesn’t contain www.” And then the property changed was the elements clickablility (Is that even a word?)

Long story short, I was not going around the problem right, and it wasn’t the workflow’s fault, it just wasn’t meant to be a workflow

Bottom line: Workflows are not a catch-all

What is the input value you are using? If I’m reading it correctly, there are 3 conditions that all have to be met before a popup is shown.

I might be misunderstanding workflows. Give me a second and I will look it over

They are in three different blocks with when statements on them

I’ve got 2/3 of the workflow corrected. As you had said, it had to meet all 3 of the “contains” descriptions to run, and it didn’t, so that explains that part. However, I am having trouble now filtering what can and can’t be put in the box. I have tried “and” statements and “or” statements but neither fit the bill and work. I ended up taking the filtering out of each individual block, so right now the setup is the first block checks if the user is logged in, and if they are, it shows the “Save Link?” popup. The 2nd basically checks if the user is logged in, and if they are not, then it shows the shortened link popup. The 3rd box is what I want to filter the text with, but I am encountering problems

Problem solved. I will explain how I fixed it so that others can maybe learn something :smiley:

I decided to filter them from the “Conditions” menu under the button, and made the button unclickable when the value did not contain the beginning of a link. I had several problems using the workflows to do that exact thing, because “and” and “or” were not giving me results that I wanted. Instead, I made a statement that read something like this

“When Input Paste Link Here’s value doesn’t contain https:// and Input Paste Link Here’s value doesn’t contain http:// and input paste link here’s value doesn’t contain www.” And then the property changed was the elements clickablility (Is that even a word?)

Long story short, I was not going around the problem right, and it wasn’t the workflow’s fault, it just wasn’t meant to be a workflow

Bottom line: Workflows are not a catch-all

1 Like