Flows provide the core building blocks of Synatic. They model data processing pipelines, and are at the centre of building solutions with Synatic.
When you create a new Flow, it starts out with the Flow Boilerplate on the canvas. These are the fixed and essential parts to a flow, like a
main() function is to traditional programming:
Triggers determine how the flow is started, or triggered. You can choose from an HTTP request, a Cron schedule, incoming email, and various 3rd party platform events (eg. Salesforce, Typeform, WooCommerce etc. events). Triggers can include data for the Flow pipeline to process.
Parameters are input values for a flow (like function arguments in regular programming). You can define them here and use the passed-in values throughout the flow. They are one source of data for the Flow.
Normally a flow doesn't return any data. You can click on the Return block to change this to data and the format you'd like to return. This is important when using branches (eg. a Parallel control step to create multiple paths, or Subflows) in your Flow, or when using the Flow as an HTTP endpoint.
The logger records events that happen through the pipeline, for example a record with an error (Record Event), or the whole run has an error (Run Event). You can also add other useful Event handlers here to do useful things, like send an email if a run succeeds or fail, or kick off another flow based on the status of this flow.
Now that you understand the fixed parts of the flow, we can look at the building blocks to create a useful processing pipeline. These building blocks are called steps. You can access flow steps by clicking on the "Show Steps" button at the top of the Flow canvas, and then drag and drop the chosen step onto the Flow pipeline.
Steps are grouped according to their purpose in the flow.
Control Steps - These steps are equivalent to branches in traditional programming. There are conditional blocks, foreach, parallel and series processing and more.
Trigger Steps - These steps determine how a flow is started, or triggered. This can be Http, a cron schedule, emails, and various 3rd party events (for eg. SalesForce platform events, WooCommerce events and more)
Source Steps - Source steps are a data source for a flow. Sources can be files (eg. from SFTP, Dropbox, Google Drive, etc), databases (eg. SQL, Postgres, Mongo, etc), web services (http, soap, etc), and other applications (eg. SalesForce, Odoo, Sage, and many more online services).
Reader Steps - Readers convert data from files or other sources into a JSON object that can be understood by Synatic. The Reader creates individual Records that are further processed in the pipeline. There are readers to read from CSV, Excel, XML, JSON, and many other standard formats.
Mapper Steps - Mapper steps perform operations like mappings, transforms, filters, sorting, grouping and other processing on data in the flow pipeline. You can use multiple mappers in the flow to manipulate data to your requirements.
Combiner Steps - These steps combine multiple data records into a single data record, or split a single data record into multiple data records. This is useful when combining data to create a single email, or document for example.
Writer Steps - A writer step is the opposite of a reader step. These steps convert the JSON data records Synatic works on, into other standard formats for writing to a data destination. Steps include CSV writers, Excel writers, PDF, Zip, and many other formats.
Destination Steps - Destinations steps allow you to write the results of your processing to a data store. You can use destination steps to write to databases (SQL, Postgres, Mongo, etc), file platforms (eg. SFTP, Dropbox, Google Drive, etc), HTTP or Soap services, SaaS systems (eg. Salesforce, Odoo, etc), and even to other flows.
RunEvent Steps - These steps allow you to attach to a RunEvent (Completed, Failed, Completed with Errors), and perform an action. This can be sending an email on a problem, kicking off other flows, or writing the event data to Synatic storage (Buffers)
RecordEvent Steps - These steps allow you to attached to RecordEvents( Completed, Error, Skipped, Header, Footer) which occur as each data record is processed. You can log chosen events to Synatic's built-in log manager, or write the results to a Synatic data store (Buffers)
As a Record is processed through the Flow it has a specific object model that can be used in each Step as configuration and specifically in calculations. Read more about this in the Processing Object article.
Putting it Together
To see how these elements come together to create a useful flow, see our example step by step tutorial