Flows are at the heart of Synatic. They are where integrations and processing logic are defined.

In this example, you will create your first flow that connects to an HTTP Rest service, converts the JSON data to Excel format, and emails it to you. We will use https://jsonplaceholder.typicode.com as our REST data service.

Creating your first flow

To start, log into your Synatic account. If you haven't already got one, read how to set up an account here.

Make a new Solution

Create a new solution to hold your flow by clicking the green + next to the Solutions section on the sidebar, and give it a name and description. Then click Save.

Make a new Flow

Create a new flow in your solution by clicking the > next to your new solution in the sidebar to expand it. Then click the green + next to the Flows item to add a new flow. Give the flow a name and description, and click save.

Add a JSON Reader step

The REST service we will be using sends back data in JSON format. We will first add a JSON reader step to the flow so that Synatic correctly interprets the data.

Click on the Show Steps menu item to show the steps palette. Search for JSON and drag and drop the JSON reader step onto the canvas as shown. Note that it must be dropped between the Parameters and Return blocks. Then click Save on the step dialog.

Add an HTTP Source Step

Now we can add the source step. Search for HTTP in the steps palette, and drag and drop the HTTP Service source step just before the JSON Reader step on your flow.

Configure the HTTP Step

Fill in the URL field with the resource, https://jsonplaceholder.typicode.com/users, then click Save.

Midway Test

Now that we've got a source and a reader, we can test that it works to this point. To test, click on the blue play button just after the JSON reader step. Then click Test on the dialog box that comes up. You should see a list of records show in the debugger.

Add in a Combiner

From the debugger output above, we can see we have 10 records. If we only added an Excel step, it would create a file for each record. We instead want to combine all the records and add them as 1 array to a single excel file. To do this, search for Combiner in the steps palette, and drop it onto the flow just after the JSON reader step. Click Save on the dialog that comes up.

Add in an Excel Writer

We can now add in an Excel file writer. Search for Excel in the steps palette, and drag the Excel step from the Writer draw (NB. don't drag the one from the Reader draw!). Drop the step onto the flow after the combiner, and click Save on the dialog.

Add in an Email Destination

Almost there! Our final step is an Email step to send us the Excel file. Search for Email in the steps palette, and drag and drop the Email step from the Destination draw onto the flow, just after the Excel step.

Configure the email step by filling in the Subject, To Email Address (use your email address), To Email Name, and body. Also, ensure that the option Use Attachment is checked. This adds the result from the flow (the excel flow) as the attachment to the email. Then click Save at the top of the step.

Running the Flow

The flow is now complete, so let's give it a run. Click on Execute Flow above the canvas. Then click Create Run in the dialog box that pops up.

After a short time, you should see Completed with a green circle next to it, indicating that the flow ran successfully without any errors. Check your email, and you should have received your excel file as well. Opening the spreadsheet shows all the data from our HTTP service, but now in an excel report.

Congratulations, you've just made your first Flow with Synatic!

Things to try

  • Change the destination step to something else, for example, a Google Drive destination step or a Dropbox destination step.

  • Play with more of the options in the Excel step to change colors and fonts.

  • Look at some more tutorials to build a few more flows.

Did this answer your question?