website logo
⌘K
Explore our documentation
Contact APIANT support
What is APIANT?
Automation Editor
Key Concepts
Account Management
Managing Automations
App Connections
Building Automations
Alert Mappings
Troubleshooting
CRMConnect: Mindbody → HubSpot
CRMConnect: DonorPerfect → HubSpot
CRMConnect: DonorPerfect → ActiveCampaign
MailConnect: DonorPerfect → Mailchimp
ShopConnect
ShopConnect Settings
Sync Products
Manually sync Mindbody services/pricing options to Shopify
How to tag products in Shopify to prevent sync during sales sent to Mindbody
Retrying orders from Shopify → Mindbody
Manually pushing Mindbody orders to Shopify
Mindbody Pricing Discontinuation: Integration with Shopify
Guide to manually syncing Mindbody Packages with Shopify Products
Features that are not supported in ShopConnect
Automation Alert Reports
Linked Accounts
ZoomConnect
New features in version 4
Settings
General
Email & SMS
BOTs
MINDBODY
Zoom
ZoomConnect Mindbody Appointments - Setup and requirements
Troubleshooting
Assembly Editor
Key Concepts
Account Management
API Key Management
Managing Content
Building Assemblies
API Integrations
Other Assembly Types
Keyvalue Storage
Assembly development cycle
APIANT for Integrators
Help Forum
Automation Templates
Development Server
Module IDE
Shared App Connections
Tenants and Linked Accounts
APIANT Inline
Supported functionality
Embed Inline
Sandbox
Docs powered by
Archbee
Automation Editor
...
Building Automations
System Utilities

Collector

9min

The Collector system utility app provides triggers and actions for aggregating items into named buckets. The items can later be dumped out from the buckets. The items are stored in the system's database until dumped from a bucket.

As an example, let's build a solution to collect news articles from CNBC and send us a single email once a day with all articles for the previous 24 hours.

We'll start with the CNBC trigger:

Document image


Then use the "collect items into a bucket" to place articles into a named bucket:

Document image


We'll name the bucket "CNBC" and place the article titles and descriptions on separate lines:

Document image


That completes the first automation. We'll use the default polling schedule, so it will run every 15 minutes 24 hours a day every day.

Now we'll build a second automation that will dump out the articles and email them to us once a day. First select a System Utility trigger:

Document image


Choose the Date Time app:

Document image


Select the "every day at" trigger:

Document image


Configure a time to send the daily email. Here we configure 10pm, based on a 24-hour clock:

Document image


When the automation runs at 10pm, we want to first dump out all the items from the CNBC bucket. Add an action and select the System Utility category:

Document image


Select the Collector app:

Document image


Choose the "dump items from bucket" action:

Document image


This action will emit an array of all the items in the named bucket and delete them from the database. Be sure to configure it with the same bucket name that contains the items:

Document image


Now, the email action expects a single string value for the body of the email, but the Collector action will emit an array. So we need to convert the array to a single string. Also, we want to format the articles with newlines between them.

How did we know to do this? We didn't! We created the automation using a direct mapping from the Collector's dump action to the email body and discovered we didn't like its formatting. Building automations can take some trial and error, plus exploration of the available actions.

We need a data transform:

Document image


Array transforms can be found in the Transform Data app:

Document image


Ah, the first one is what we need:

Document image


We map the emitted item array from the dump bucket action and also add HTML <br/> new lines so the email will have the articles with line breaks between them:

Document image


Next we search for an email action and use this one:

Document image


We enter a suitable subject and map the output from the array formatter to the body:

Document image


That's it! Save the second automation.

At 10pm every day we will get our email containing all CNBC article titles and descriptions for the past 24 hours:

Document image




Updated 03 Mar 2023
Did this page help you?
PREVIOUS
System Utilities
NEXT
Date Time
Docs powered by
Archbee
Docs powered by
Archbee