Issue with getting output in my website's iframe

Hello,

I have a website’s backend that calls the API successfully to my ai agents, but I can’t get the output to show up in my iframe. I use supabase and an edge function where the report is supposed to be stored in the db, and then called into the iframe in the website for the user to download. the output is a pdf. In the request log in mindstudio it says this: running: false. I don’t know if it has an influence. Any help appreciated.

here is the api log

{“success”:true,“threadId”:“7d6ed0af-fac5-4813-a420-0341a725449e”,“thread”:{“id”:“7d6ed0af-fac5-4813-a420-0341a725449e”,“appId”:“dcb5854e-df93-4e6d-b2d5-c4259e44cd18”,“organizationId”:“792680d0-999c-4de6-9803-637aa6e77704”,“userId”:“6f420b65-fdc3-4bbc-87aa-e71623a12ff2”,“entryWorkflowId”:“2abb9617-10a3-44cb-899e-2942b36d6152”,“sourceThreadId”:null,“source”:“api”,“parentThreadId”:null,“name”:“”,“variables”:{},“currentContinuationAction”:{“token”:“2abb9617-10a3-44cb-899e-2942b36d6152::8ac887de-5c73-4580-9257-9937d2112495”,“step”:{“id”:“8ac887de-5c73-4580-9257-9937d2112495”,“type”:“userInput”,“userInput”:{“prompts”:[{“promptId”:“9706fa4b-76e9-4430-85b1-8a8b997b8478”,“required”:true},{“promptId”:“a0ecdfc1-328d-4bb7-bbb1-60bf86482a37”,“required”:true},{“promptId”:“ed6d1a05-286b-4865-9682-fed20f5c2f16”,“required”:true},{“promptId”:“b63285ad-9797-4eca-8f8e-f5f93fe1668b”,“required”:true},{“promptId”:“13f42c48-31ab-45d7-8b3f-cb9334917439”,“required”:true},{“promptId”:“5ad4e1b9-2934-4cfe-b069-060ef90adf20”,“required”:true},{“promptId”:“590f8c70-40b4-41d0-b6aa-1ec454eae413”,“required”:true}]},“__editingData”:{“top”:“0px”,“left”:“-107.25px”},“defaultTransitionId”:“32e6330a-099f-4d3e-80a4-8df74f682171”},“isFinal”:false,“multiModelEnabled”:true,“underlyingModel”:{“isUnderlying”:true,“model”:“grok-3-latest”,“temperature”:0.5,“maxResponseTokens”:8192}},“isRunning”:false,“hasContent”:false,“isFinished”:false,“isUnread”:false,“notifyOnComplete”:false,“dateCreated”:“2025-06-16T03:07:54.164Z”,“dateLastMessage”:“2025-06-16T03:07:54.364Z”,“error”:null,“posts”:[{“id”:“12504ea9-8dd9-4af0-b062-d986ea322ed9”,“source”:{“workflowId”:“2abb9617-10a3-44cb-899e-2942b36d6152”,“stepId”:“9cd878cd-ca97-47f6-a6c8-7f4d5d1d0260”,“logId”:null,“idempotencyKey”:null},“type”:“debugLog”,“dateCreated”:“2025-06-16T03:07:54.199646+00:00”,“dateLastUpdated”:“2025-06-16T03:07:54.199646+00:00”,“selectedVariantId”:null,“debugLog”:{“logs”:[{“value”:“New run with ID "7d6ed0af-fac5-4813-a420-0341a725449e"”,“timestampMs”:1750043274146},{“value”:“Preparing launch variables”,“timestampMs”:1750043274161},{“value”:“Running workflow Main.flow”,“timestampMs”:1750043274162},{“value”:“Setting {{currentDate}} to "Jun 16, 2025 3:07 AM"”,“timestampMs”:1750043274195},{“value”:“Setting {{global}} to "{\n "userId": "6f420b65-fdc3-4bbc-87aa-e71623a12ff2",\n "threadId": "7d6ed0af-fac5-4813-a420-0341a725449e",\n "username": "Richard F.",\n "companyName": "Digital Acumen AI, LLC"\n}"”,“timestampMs”:1750043274196},{“value”:“Setting {{$launchVariables->url}} to "www.notion.com"”,“timestampMs”:1750043274196},{“value”:“Setting {{$launchVariables->industry}} to "tech saas"”,“timestampMs”:1750043274196},{“value”:“Setting {{$launchVariables->vertical}} to "prod software"”,“timestampMs”:1750043274196},{“value”:“Setting {{$launchVariables->company_name}} to "Notion"”,“timestampMs”:1750043274196},{“value”:“Setting {{$launchVariables->competitor_1}} to "asana"”,“timestampMs”:1750043274196},{“value”:“Setting {{$launchVariables->competitor_2}} to "trello"”,“timestampMs”:1750043274197},{“value”:“Setting {{$launchVariables->competitor_3}} to "clickup"”,“timestampMs”:1750043274197},{“value”:“Dispatching run request to Agent Runner”,“timestampMs”:1750043274197},{“value”:“Action completed”,“timestampMs”:1750043274197}],“name”:“Run Started”,“status”:“success”,“stateSnapshot”:{“threadId”:“7d6ed0af-fac5-4813-a420-0341a725449e”,“variables”:{“$launchVariables->url”:{“value”:“www.notion.com”},“$launchVariables->industry”:{“value”:“tech saas”},“$launchVariables->vertical”:{“value”:“prod software”},“$launchVariables->company_name”:{“value”:“Notion”},“$launchVariables->competitor_1”:{“value”:“asana”},“$launchVariables->competitor_2”:{“value”:“trello”},“$launchVariables->competitor_3”:{“value”:“clickup”}},“timestampMs”:1750043274197,“continuationToken”:“2abb9617-10a3-44cb-899e-2942b36d6152::9cd878cd-ca97-47f6-a6c8-7f4d5d1d0260”},“endedTimestampMs”:1750043274197,“startedTimestampMs”:1750043274146},“billingEvents”:,“metadata”:{“instanceId”:“mindstudio-api-58f9bb4c56-l2lmf”,“instanceRole”:“api”}}],“assets”:}}

Hi @AIFusionCoven,

It looks like your Agent has a User Input block with several required fields, so it pauses and waits for a user to provide those inputs manually.

I recommend removing the User Input block and instead defining Launch Variables in the Start block to pass data directly to the Agent through the API.

Hope this helps!

thank you. modified this. Question. can I save the callbackurl in mindstudio? and does mindstudio requires a header authorization, besides the api token, or not? if yes, what is it based on? Thanks

Hi @AIFusionCoven,

Could you clarify what you mean by that? When you include a callback URL in an API call, you’re essentially telling the Agent where to send the generated output.

Here are the headers you’ll need to include in your API call:

    "Authorization": "Bearer {{YOUR_ACCESS_TOKEN}}",
    "Content-Type": "application/json",

You’ll also need to include the Agent ID and the workflow name to ensure the correct Agent and workflow are triggered:

    "appId": "{{YOUR_APP_ID}}",
    "workflow": "optional-workflow-name",

Let me know if you have any questions!

thank you. I do have the callbackurl in the api call. I also have the header as described, and the agent id and workflow setup, but I still cannot retrieve my pdf output. Any thoughts as to why this could be? Thanks

Hi @AIFusionCoven,

Could you record a Loom to walk me through your setup?

In the meantime, I’d recommend sending an API call using a tool like Postman. That will help confirm whether the AI Agent is returning the expected output.

here is the loom link:Competitors Analysis Report | MindStudio - 17 June 2025 | Loom

I use bolt to manage the api call and supabase to store the report, but the callback_report function I use does not have any logs of the output. also, in the dashboard of MindStudio, runs are accounted for, api logs look ok. Thanks

Hi @AIFusionCoven,

Thanks for the Loom!

From what I can see, everything looks good on the MindStudio side. You could try testing the callback URL with a tool like https://webhook.site/ to confirm that the output is coming through. Since the API logs look fine and the runs are being triggered, it seems like the issue might be on the receiving end.

thank you for your help. I finally created, and imported, my first report based on an ai agent into my dev website. Now, on to setup the other 17 ai agents (reports). Cheers

1 Like

Hi @AIFusionCoven,

Great to hear everything’s working now! Good luck!