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, you must have a Synatic account. If you haven't already got one, please contact your Synatic account manager.

Create a new Solution

Create a new solution to hold your flow by clicking the green ⨁ adjacent to the Solutions section on the sidebar, and give it a meaningful name and description, then click Save.

Create a new Flow

Create a new flow in your solution by clicking the > adjacent to your new solution (1) in the sidebar to expand it. Then click the green ⨁ adjacent to the Flows item (2) to add a new flow. Give the flow a meaningful name and description (3), then click Save (4).

Add a JSON Reader step

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

Click on the Show Steps menu option 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 (1), then click Save (2).

Midway Test simulation

Now that we've got the source and a reader steps in place, we can test that it works up to this point. To test, click on the blue play ▶ button adjacent to 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 to add an Email step to send the Excel file. Search for Email in the steps palette, and drag and drop the Email step from the Destination draw onto the flow, right after the Excel step.

Configure the Email step by entering the Subject, the To Email Address (use your own email address to test), the To Email Name, and the Body. You should ensure that the option to Use Attachment is selected. This adds the result from the Excel step as the attachment to the email, then click Save.

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.

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?