This article demonstrates what I learned while rapidly creating a proof of concept to publish and connect Evernote to Syncplicity via AMPLIFY Application Integration. I am still in the learning process of this tool, but it works and can serve as a basis for future enhancement.
As Customer Service Managers (CSMs), we come across many questions around Integration. More specifically, integrating X with Z—in this case, X being Evernote and Z being Syncplicity.
Connect Evernote to Syncplicity
To perform the steps, we need access to the following:
- The AMPLIFY™ platform
- A Syncplicity account (your demo account or a trial account will do)
- An Evernote sandbox account (see here Testing in the Sandbox – Evernote Developers; this will avoid messing up with a real Evernote account.)
In your Evernote sandbox, create and name a new notebook, add some text and a file to it for example.
Since we’re going to build programmatic “plumbing” securely, we need the right authentications on both products. First, on Evernote, you’d need an API Key and secret. To get them, simply go to the Evernote Developers page and click on the top right green button “Get an API Key.”
When clicking on the Request Key, you should get both the key and the secret (called consumer key and consumer secret).
Now back to AMPLIFY.
The first step will be to find the right connectors to perform our integration. Luckily, AMPLIFY™ Application Integration has more than +200 pre-built integrations, including Evernote and Syncplicity. Can’t find the one you want? No problem, as long as the product has an API, you can build your connector quite easily.
We can use the search bar to find both connectors.
If you want to better understand this screen and what’s a connector, this documentation page is very clear and useful: Introduction to Connectors.
At this stage, we found the right connectors… yet, we did not create any instance of those connectors. To create those, we need to authenticate (maybe you’re confused; so was I the first time… having an obvious button like “create instance” would have made things easier). It’s like your door is not a real door before putting a specific lock in it.
We hover over the connector and authenticate:
Time to give our instance a name and reuse our Evernote API Key & Secret. Please notice the useful sandbox option!
Once we click on “create instance” in AMPLIFY, this should trigger the OAuth flow and create a redirect to Evernote.
Next up, we should get the following message (the tiny green sentence top of the screen):
Before going further, it’s time to test the connector instance to make sure that:
- The connectivity is OK.
- We’re happy with the API operations available (otherwise there’s no point going further).
- Our first tests work independently from any plumbing operation with the other connectors.
Make sure you added some content to Evernote sandbox account first (notice the top notebook name):
Now, back to AMPLIFY, testing my connector instance:
My notebook is considered a Folder, I add a/before to show the path and voilà, I Execute the GET /folders/content.
If everything goes well, you should see a 200 message:
The response body is important as it explains to us how the content, we created has been transformed into a single MyMainNote.pdf document, that we should be able to retrieve and pass over to any system thanks to AMPLIFY. Since everything is structured here (resources, etc.) there’s a lot we could achieve if we wanted to retrieve images only (via a check on the mime type of all resources).
Now, you should create an instance of Syncplicity connector, I won’t go into details here, but you can find an example here.
If you then click on instances on the left panel, you should see at least two of your connector instances.
Now, let’s create our pipeline where the data will flow, this pipeline is called Flow in the Application Integration world.
On the same left panel, we click on flow.
To be 100% honest, this is where things get complicated for a newbie and where the product would benefit from more user-friendliness to explain the different concepts.
When we create a flow, we create a Flow Template. Like any template, its purpose is consistency and the ability to instantiate it differently in the future for new needs (for example, connecting to a production instance instead of a sandbox one).
Excerpt from the documentation:
After you build flow templates, you can use the templates to create flow instances. In the flow instances, you replace the variables in the templates with actual connectors and values.
This explains why things are quite complicated and why it’s nearly impossible to get where you want to go without having expert help or digging into our documentation.
So, we build a new flow:
We give it a name.
And we select how we want our flow to be triggered. If you’ve used any application integration tool, you should be familiar with those.
For simplicity’s sake in this tutorial, we select the Manual trigger.
From there you should stumble on a somewhat classic drag’n’drop workflow builder where we have at least a trigger, and on which we will add steps. To add steps, we generally select onSuccess or OnFailures.
Before doing that, let’s start with the most abstract (and non-intuitive if you forget you’re in a template) stuff: we create our variables.
We select the Connector Instance type and create one variable (rinse & repeat for the second connector):
Finally, we start adding our steps
There are multiple ways to perform logging on Application Integration, but the quick and dirty way when you’re testing is to add a JS Script step with a simple console.log() as below.
The next step’s purpose is to make sure all the URLs we will use for the file streaming step are well URL encoded. For that, we define a done object that contains both URLs. Here, those URLs are hardcoded but in the real world, this should be adapted to the specific programmatic need.
The last step is a magic flow step, at least when you’re working with files, as it allows downstreaming and upstreaming files in one single step:
This is the way I filled it (we reuse the connector instance variables).
Now, it’s time to test.
But to test we need to create an instance.
We will run those steps safely in a debug mode, which will allow us to better understand what’s happening if we did any mistake.
To do that, we need to toggle the “debug” button on the top right of the screen.
There are three steps we go through:
Configuration: SELECT INSTANCE SELECT TRIGGER RUN
In select instance, we click on the + button top right to create the instance as follows (remember to toggle active):
Then for the trigger, since it’s a manual one, any JSON object will do:
That’s it, you can run the flow in debug mode. If everything is perfect, everything will go green with a successful execution message.
You can debug by exploring what’s happening at every step as below. Note that the JSON cool payload we sent could have been any valuable information for further processing in our flow.
Last but not least…
Finally, I switch to Syncplicity to see my new folder created with the pdf corresponding to my notes which have been automatically transferred via AMPLIFY Application Integration:
Read more about AMPLIFY Integration Builder and QuickBooks online.