Sync data FROM another app to your app
Last updated
Last updated
A flow moves data from one app to another. It is comprised of one or more blocks that run and execute steps when triggered. Flows can sync data from another app to your app, to another app from your app, or both.
In this quick tutorial, we will build and run a flow that sends every new subscriber in a Mailchimp audience to an API endpoint (which could be of your app). To make things interesting, you will get to map custom fields in your Mailchimp account to fields of the API endpoint.
Note: You will need to login to a Mailchimp account -- sign up for a free trial (if you don't have one).
Click Create a Flow
Select a trigger for the block. In this example, we will select "Event in another app..." > "Subscriber Created" in Mailchimp.
Click "Add a step" and select "HTTP Call".
Configure the HTTP Call. In this example, we will use webhook.site to demonstrate.
Click "Copy" to copy the unique URL from webhook.site.
Set the method HTTP call method to POST, and paste the URL.
Switch to the "Body" tab.
Define the JSON payload. In this example, we will send three fields to the API endpoint.
Paste this JSON in the body:
Map the email field from the trigger to the body.
Place your cursor in between the "" you just added, and click +.
Click "Subscriber Created".
Click the ">" next to "Out" to access the output.
In this example, event type and timestamp are at the root, while the data is in an array. Click "data" to open the array, and click "email".
Confirm that the body looks like this:
Now would be a good time to rename the flow and save it.
Add the other two fields to the setup form.
Click "Add fields to setup form..." at the bottom of the body container.
Unselect "email" because we already mapped it. We want the user to map the other two at setup time. You can rename the titles if you want.
Click "Add fields".
Click "Setup Form" in the left pane, and go to the second page. Instead of "Acme Co.", it should have your app's name. You will see the two fields that you just added.
Click "First Name" or "Last Name". You can see that the fields have been automatically configured to allow users to map fields from the trigger step. You don't need to do anything.
Go back to "Trigger Blocks" and to the "Body" tab in "HTTP Call". You will see that the fields in the setup form (that you just added) have been automatically wired as the values of the fields to be sent to the API endpoint. You don't need to go anything here either.
Now, simply Click "Test" to run this HTTP call to confirm that it's working.
Integry will ask you to provide an API key. Enter "123" and click Proceed.
You see this screen because Integry is assuming that webhook.site is your app, and the API call to the endpoint has to be authenticated with your credentials. Don't worry, your users won't have to give the API key in this manner because you will pass the key through the SDK when you embed the widget.
You can see the request and response below.
"email" contains a sample value from the trigger's output that you mapped.
"first_name" and "last_name" are empty because they've not been mapped as yet. You will get to map them (like your users) in the next section when you setup an integration of this flow.
Save the flow and go back to the Flows list.
That's it! The flow is ready to use.
Click "Embed". You'll see the flow you created. In this example, that's "Sync new subscribers from Mailchimp".
Click "Setup and enable".
Login to Mailchimp.
Configure Mailchimp.
Select the audience you want to monitor for new subscriber and click Next.
Configure Acme Co.
Map Acme Co. fields to Mailchimp fields.
Click Save to initialize the integration.
Almost there! The integration is now live and ready to be triggered.
In this example, we are using a Mailchimp trigger so steps 1-5 will happen in Mailchimp.
Open mailchimp.com in a browser.
Log in with the same user account you used while setting up the integration.
If you have multiple team accounts, select the same team account you selected earlier.
Click "Add subscriber".
Fill out the form with a new user's details.
Give permission to email the user, and click Subscribe.
Go back to webhook.site. A new request with the details you entered should have been received.
You can also see how the run actually executed by clicking the count of users against this flow (in the flows list), drill down to runs, and then steps.
We're done! You just created a flow between two apps, setup an integration of the flow, and the integration ran.
Make flows that send data to another app, import data from an app, export data to an app, or even sync both ways between another app and your app.
Embed the Integry widget in your app so your users can set up integrations from within your app