Flatfile Embeds moves the hard work of importing data to the server, providing more consistent performance and reliability for all users no matter the hardware they're working with.
This guide aims to provide basic instructions to get you up and running with Flatfile's new Embeds.
Make sure you are signed in to the Flatfile dashboard.
If you haven't already, you need to create a data template. Before you can upload data, you need to tell Flatfile what that data is supposed to look like, and data templates are how. You can create new data templates in two ways: manually or automatically from a .csv.
Creating a Flatfile Embed is simple.
Click on Flows in the navigation bar on the left, then click the Embed tab, and click the Create Embed button.
Name the Embed.
Select a data template.
Clicking Create will take you to the Edit Embed page. Here, you can rename the Embed, see the Embed ID and Private Key (which only appears once! You should save it now.), and see some example code snippets for the languages we support.
Flatfile uses JSON Web Tokens (JWTs) to authenticate uploads and allow users to resume where they've left off in case of an interruption. The Node.js example we provide shows one way to generate JWTs on your server (you will need the
jsonwebtoken dependencies), but if you would like more information about how it works and how it can be customized, check out our SDK documentation.
The front end is where the hard work of creating a JWT pays off. Previous iterations of Flatfile required front-end adapters for the various frameworks we supported, but now all you need is the Flatfile SDK. There's no complicated configuration, adapters, or head-scratching front-end code to write. All the hard work is done on the server, so all you need to do is:
Load the SDK
Create an import button
Pass your importer the secure token you generated
And that's it! The code snippet in the Edit Embed page shows a basic outline of how it works, but since all you need from us is the SDK, you can code your front end in just about any framework you like.