Whenever the setup process of an integration is started, a blend is created in the customer's account and will persist even if the setup is not successfully completed. In this article we will show you a simple way to remove these blends from unfinished integrations. To be more precise, we will create a blend that will check every blend in every account. Ok, let's get to it!
1. First we connect our "SAAS admin" datasource
The "App Id" and "Api Key" can be found in My Hub -> API Key
2. Then we create a new blend
3. We add the following blocks from the "SAAS admin" connector:
- "List Blends In Account"
- "List Accounts"
4. Right now our blend retrieves all the blends for all the accounts, so we need to filter them based on the "setup_complete" property of the blend. If the value of this property is false, it means the setup was not completed. Alright, let's continue and add a "Condition" block.
5. Add a "Delete Blend From Account" block from the "SAAS admin" connector
6. And finally the final step . Let's set a schedule for this blend
Our blend is working great, but we didn't consider a special case. What happens if it runs when an integration's setup is in progress ?
Answer: The integration's blend will be deleted and will result in an error being displayed when the setup process is completed.
7. To make sure this will not happen we will add a new condition to our "Condition" block that will check if the blend is at least a day old