Hi everyone,
I’m working on an automation where I fetch competitor data from Airtable (e.g., Name
and Products/Services
) and pass it to OpenAI for cross-analysis. While I’ve successfully set up the basics, my current issue is dynamically handling all records (whether there are 2, 5, or 50 competitors) and formatting the data properly for OpenAI.
My Current Setup:
- I use Airtable - Search Records to fetch all competitor records.
- I use Array Aggregator to group
Name
andProducts/Services
fields. - I pass the aggregated data into the OpenAI module.
The Problem:
The output from my Array Aggregator doesn’t automatically account for varying numbers of competitors. I’ve hardcoded Competitor 1, Competitor 2, etc., but I need it to dynamically reference all records (whether there are 2 or 50).
What I Need Help With:
- How to configure the Array Aggregator to ensure all records are included dynamically.
- Best practices for formatting the data (e.g., iterating over arrays) to create structured input for OpenAI.
Example of What I Want:
If there are 5 competitors, I want to generate:
yaml
Copy code
Competitor Analysis:
- Competitor 1:
Name: [Name 1]
Products/Services: [Products 1]
- Competitor 2:
Name: [Name 2]
Products/Services: [Products 2]
...
This should adjust dynamically based on the number of records.
Tools I’m Using:
- Airtable
- Array Aggregator
- OpenAI Module
Would love any advice, tips, or even examples of how others have tackled this problem!
Thanks in advance!