We can add conditions in flows to create various paths for the integration to work.
We will use the flow: If a Subscriber is created in Mailchimp with the first name "Amna," create a contact in HubSpot; otherwise, if the first name is "Maria," create a contact in Sendinblue.
- Go to the Flows tab from the top menu.
- Create a new flow.
- Add Mailchimp trigger "Subscriber Created."
- Connect your account.
- Select the Audience to which you want to add the new subscriber. Click Continue.
- Click Test.
- Create a Subscriber in Mailchimp.
- You will receive a success message if Integry receives a trigger from Mailchimp.
- Search and select "IF" in the child step.
- Add the condition.
- You can use the in-built operators.
- Equals to: True, if both operands are equal
- Not equal to: True, if the left operand is not equal to the right operand
- Less than: True, if the left operand is less than the right operand
- Greater than: True, if the left operand is greater than the right operand
- The operands in the R.H.S and L.H.S boxes can be hard-coded values such as 1, 2, etc., a variable, or a string. However, the operands can also access the output values of the previous step(s).
- Click on the '+' sign at the right of the first box, then click on Mailchimp Subscriber, Obj, contact_v1, custom_fields, and then "Add to Field" in front of FNAME.
- Use the equals operator.
- Write "Amna" in the R.H.S. operand box.
- Click Test.
- The Condition result shows true when the first name of the subscriber created in Mailchimp is "Amna."
- Click Done.
- Click on the "Add Step" button.
- Search and select HubSpot.
- Add action "Create Contact."
- Connect your account.
- Enter the Email of the contact to be created.
- Enter the First and Last Name of the contact.
- Map the additional attributes of HubSpot.
- This is an optional field and can be left empty.
- Select the List to which you want the contact to be added. Click Continue.
- Click Test.
- Click on the three-dots menu in the far right corner of the IF block and then click "Add Step."
- Search and select ELSEIF.
- The Else-If is constructed the same way as an If Condition.
- Add the operand and operator in the same way as we did for IF.
- Add the tag of FNAME in the L.H.S box and write "Maria" in the RHS box.
- This will check if the first name is Maria.
- Click Test.
- If the subscriber's first name created in Mailchimp is "Maria," you will get a True result. Otherwise, False will be shown in front of Condition Result. Click Done.
- Click on the "Add Step" button.
- Add the Sendinblue action "Create Contact" and connect your account by following steps 20 to 22.
- Connect your account.
- Enter the Email of the contact.
- Select the List to which you want the contact to be added.
- Map the custom attributes of Sendinblue and check the additional fields if needed.
- These are optional and can be left empty. Click Continue.
- These are optional and can be left empty. Click Continue.
- Click Test.
- You will receive a success message when the contact gets created in Sendinblue. Click Done.
- Save and Publish your flow.
You can also add ELSE after IF to add a condition that executes in case the IF statement is FALSE. ELSE doesn't need any configuration.
You can also add IF Conditions within an IF. The inner IFs will execute if the outer IF evaluates to be TRUE.
Comments
0 comments
Please sign in to leave a comment.