Linking is a feature that allows you to set a link between objects from two separate systems so that later on, on as needed basis, be able to fetch one of the linked objects knowing the other. For example you may want to create new Asana Tasks whenever a new Trello Item is created and later, when you update the Trello Item easily know which the related Asana Task is. Another example maybe linking Salesforce Opportunities to Rows in a Google Sheet so when you update the Google Sheet Row be able to quickly fetch the linked Salesforce Opportunity and modify it as needed.
We try to make as many resources linkable as possible and most of the channels you see in the editor do support linking items from them. Should you need linking on a resource that you do not see in the editor, drop us a line at firstname.lastname@example.org or reach us in the in-app chat and we’ll be happy to add it.
There are two essential actions that are relevant to linking - creating the link between the objects you want to link and fetching an already existing link.
How to do it
First of all in order to be able to use linking you need to have both object in the current pipeline. In this example we create a bew Trello Card whenever a new Asana Task was created.
In the “Create A Card” pipe for Trello you can see the Link option, near the end of the pipe box, populated with the Asana Task we want to link to. In that dropdown you will be able to select which exact object from the current pipeline you want to link to in the case there is more than one linkable entity in the pipeline.
In this case the only items in the pipeline that allow linking are the Asana Task from the first pipe (A) and the Trello Card form the second (B).
So now, after we have created the link we can use that link in another pipeline. Let’s assume we want to update the linked Asana Task whenever the linked Trello Task gets updated. We start by creating a new pipeline and adding the “Card Updated” trigger from Trello:
Next we need to find the Fetch Link pipe under the Asana drawer and drag and drop it as the next step in the pipeline.
This pipe will output the linked Asana Task and will make it accessible further down in the current pipeline.
We can now add an “Update Task” pipe from the Asana collection and actually update it. In this example we update the Task’s name and notes to be the same as the linked Trello Card has.
And this is really all there is to it. From that point on, using both pipelines we’ve created in this tutorial you have set up auto creation of new Trello cards and more importantly have linked those Cards to the corresponding Asana Tasks.
Checking if linked object exists
Sometimes your pipelines may trigger on objects which have not been linked yet. In this case you need to check whether
the linked object already exists and update it, or if it does not exist to create it. To do that you need to put an
IF condition like this (see also Logical Conditions):
The in the
THEN branch add an Update a Task pipe, and in the
ELSE branch add a Create a Task pipe.
Don’t forget to add linking in the Create a Task pipe.
Make sure the options of the pipe from which an object is linked are the same as the ones from which it is retrieved.
For example, if you have set issue_type when creating a jira issue,
you need to set it on the trigger which produces one side of the link, so that options match. For example, lets assume
you have a Jira Create an Issue pipe, with the following options, which links to a trello card:
The following pipeline won’t be able to fetch the linked card because the options differ (Project and Issue Type
are not set):
You will need to set both Project and Issue Type to the values from the Create an Issue pipe in order for the
fetch link to work.
Linking is a very powerful concept that can be applied in many cases and for various reasons. Try it out and tell us what you think. Should you need any assistance, as usual just drop us a line at email@example.com or reach us in the in-app chat.
Happy integrating with Cloudpipes!