Funktion not processing Excel

Hello everyone,

a little struggle here with my Workflow.

In short, i want it to read the Excel i provide and take the topics and dates. After taking the topic, search Instagramm for trending/popular posts about the same topic. The dates are for when its supposed to be posted. Basically an editorial shedule.

Im getting an error in the “process excel file” block and it says:" Invalid or empty file".
I added a Query before that, cause it wouldnt take the excel from the Data Source. It still doesnt take it and throws me the same error or some other variation that basically means the same thing(something wrong with the excel).

How can i provide an excel sheet with information, so the workflow takes it and processes it and gives that information to the next block?
I uploaded it to Data Sources, uploaded again when i tried to run it, the file is .xlsx format and the variables have the same name as the ones in the excel…

Screenshot for reference at the bottom.

Any help is greatly appreciated.

Hi @MitanSoydemir,

Thanks for the post!

From what you’ve described, it sounds like the issue might be coming from the Custom Function itself.

That said, could you share a bit more about what you want the agent to do? Are you looking for it to extract all the topics from the Excel file, search Instagram for each one, and then generate multiple posts?

I would recommend that you take a step back and map out the process (ignoring MindStudio) - if you had to to do this manually, how would you do it?

A few considerations:

  1. How do you want to access the XLS file - user uploads it? Google Sheets direct connection?
  2. Is the data structured? Should you just use a custom function to process it? Should you use our Analyze CSV block? Should you use data sources/RAG (I don’t think you should tbh)

Thanks,

Hi Alex,

thank you for the quick response!

The Agent is there to take of our Social Media. I want to fill out an Excel File with Dates and Topics. On the Dates, the Agent should start the Workflow and do the posting(right now it runs manually). The topics are there, so it can scrape Instagramm for trending Posts about that topic and then generate me an Image, a Caption, Hashtags etc. to make a similar Post. All the generated Stuff should be filled into the excel and then Zapier takes this information and creates the post (I use this in combination with Zapier). The Goal would be to generate multiple posts and fill them in the excel and then post according to shedule.

Hi Jerry,

my thought process was:
I create an Excel and provide it with topics and dates. This file is saved in the Cloud so i can add more and dont have to re-upload the file everytime. So i guess a link to the File.
Then it takes the topics and scrapes Instagramm for popular/trending Posts about the same topic. After researching other Posts, it should generate me a number of Images, Captions, Hashtags etc. and fill those into the excel. Zapier takes the Information from the Excel and creates an Instagramm post and publish it according to shedule(the dates i put in initially).
So in the end i can just add more dates and topics, the workflow does its research, generates me mutiple posts and its automatically posted on our Social Media Account(a draft would also be fine so we can check the content before posting).

I used excel so far and after uploading it in Data Sources it could read all the Columns and Informations but somehow the fuction couldnt process it, even though i chose the same file from Data Sources. Even after running the Agent and uploading it in the Step before the fuction it didnt work. I might try it with Google Sheets.

Hi @MitanSoydemir,

Thanks for sharing these details!

We can break this down into the following steps:

1. Launch on Schedule

  • Use Scheduled Mode in the agent
  • Trigger the Agent on schedule via Zapier
  • Add a Fetch Google Sheet block followed by a Logic block to compare {{currentDate}} against dates in the sheet, then either continue the flow or stop the agent based on the result

2. Scrape Instagram for top posts by topic

  • Use a Generate Text block with a Sonar Online model to search by topic and output links. Then use Scrape URL to extract the post content. Keep in mind that scraping Instagram often returns 15,000 - 30,000 words of context per post
  • Create a Custom Function and use Instagram’s APIs to search for popular content on a topic
  • Use Instagram’s API request in Zapier

3. Analyze and create the post
This is the easiest step in the process. You can create a copy of the Content → Instagram Carousel Store Agent to explore its structure and reuse most of it for your agent.

Let me know what you think.

1 Like

Data Sources (aka RAG) is not the appropriate feature for what you’re trying to do here. RAG is a “needle in the haystack” search approach. Please read what Alex wrote.

1 Like

Hi Alex,

thank you for the detailed information. I will try it out !