The DevXP engineering team hosts office hours every Thursday at 11 a.m.
Pacific Time where we answer your questions live and help you get up and
running with Flatfile. Join
us!
For synchronous data import/exchange completed in one session, create a new
Space each time Flatfile is opened. This suits situations where a clean slate
for every interaction is preferred.
In this file structure, your app should have two main directories, public and
src.The public directory contains the index.html file, which is the entry point
of the application’s front-end, and the styles.css file for styling the
iframe.The src directory contains the main components and logic of the application,
including the blueprint.js file, which defines your Blueprint.
Initialize Flatfile to open in a modal. Pass in your publishableKey and a new
Space will be created on each page load. Also, add the content here to your
styles.css.
Now, let's build a Workbook inside the Space for next time.
Update your blueprint.js with this simple Blueprint.
Update index.html to import the Workbook.
Next time you open Flatfile, you'll see a Workbook called "Contacts" that has
one Sheet with three fields. Your Workbook will also have a Submit action. We
will configure this action in the next step.
Finally, let's get the data out of our system and to your destination with
onSubmit.Once you add this code, when the submit button is clicked, this will be the
place you can egress your data. Learn more about
Egress Out
Next, we'll listen for data changes and respond onRecordHook,Once you add this code, when a change occurs, we'll log the entered first name
and update the last name to "Rock." You'll immediately see this begin to work
when you add or update any records. Learn more about
Handling Data