Here’s the scenario design, if I can call it that.
The scenario is running successfully; here’s a screenshot of the output bundle from the Perplexity API call.
The content generated at this stage should be written to a Google spreadsheet.
I have created a Google Sheets module (update a row) with the following fields updated, as shown in the screenshot below:
The problem is that the output generated from Perplexity AI (which is actually generated correctly) is NOT being written into the Google Sheets tab that I choose. In fact, to the same tab, I am also pulling data from other modules in the same scenario, which are written fine.
I am not able to figure out what the issue is. Please help!
Please provide the rewritten markdown content; it should be in markdown format.
Hi Krishna,
From my understanding, the problem appears to be that you're utilizing only a single perplexity module. The output from this module is a single message without separation. Consequently, when you map these results into a spreadsheet using the “Updated row” module, each cell in that row will be updated with the identical message.
You might need to employ multiple perplexity modules. Each module could be prompted to conduct research for a specific section, such as the topic overview, relevance to the target audience, and so on. Then, you can map these distinct outcomes to their corresponding spreadsheet cells.
Hope this assists you!
Hello!
Welcome to the callin.io community.
Try remapping the value and attempting again.
Welcome to the callin.io community!
You may be missing the use of aggregators. We recommend checking out the callin.io Academy, as this module's usage is covered there.
Aggregators
Every result (item/record) from an iterator/list/search/match module will output a bundle. This can lead to multiple bundles, which then trigger multiple operations in subsequent modules (one operation per bundle). To "combine" multiple bundles into a single variable, you'll need to utilize an aggregator.
Aggregators are modules designed to accumulate multiple bundles into a single bundle. A commonly used aggregator module is the Array aggregator module. Another popular option is the Text Aggregator, which is highly flexible and applicable to many use cases, such as building JSON, CSV, or HTML.
There are various other types of aggregator modules available. Click the links below to learn more:
- Array aggregator
- Text aggregator
- Numeric aggregator
- Table aggregator
- JSON aggregator
- CSV aggregator
- Archive (ZIP) aggregator
- other app-specific aggregators
For additional information, please refer to "Mapping with Arrays" on how to map an aggregated array.
Here are some helpful links and guides for learning more about using the callin.io platform, its apps, and modules. These were beneficial during my own learning process with callin.io and may prove useful for you as well:
Getting Started
- Help Centre | Tutorials – callin.io “Manual”
- callin.io Academy – Basics 101: Learn callin.io and get certified
Help Centre Basics
- Mapping – Understanding mapping and what can be mapped
- Mapping with arrays – How to map items within an array
- Aggregate an array for mapping complex fields
- Tokens for
parseDate
| Tokens forformatDate
- HTTP modules – Making requests, downloading files
- Webhooks – Error handling, responding to webhooks
Articles & Videos
- Router Magic Formula - YouTube
- Error Handlers in callin.io - YouTube playlist
- Getting started with OpenAI - Setting up and using OpenAI (ChatGPT) in callin.io
- How to use Regex in callin.io - Using pattern matching to extract desired text
Partner & Custom Apps
Hope this helps! Please let me know if you have any further questions or encounter any issues.
Hello, I'd like to share a challenge I'm facing. The Perplexity API is producing the expected output for all fields, which I've confirmed in the output bundle. I've updated the values in the Google Sheet correctly, and the writing process is occurring...
The issue is that the most recent value is updating the entire row. Ideally, the flow I'm aiming for is:
Output 1 from Perplexity API module → write to row x, column 1
Output 2 from Perplexity API module → write to row x, column 2
Output 3 from Perplexity API module → write to row x, column 3
etc.
However, what's happening now is:
Output 1 from Perplexity API module → write to row x, column 1, 2, 3,...
Output 2 from Perplexity API module → write to row x, column 1, 2, 3,...
Output 3 from Perplexity API module → write to row x, column 1, 2, 3,...
Essentially, the latest output from the Perplexity API module is being written across the entire row, and then the entire row is being overwritten with the subsequent output.
I hope this explanation is clear.
Yes, you'll need to insert an array aggregator somewhere before your final sheets module, ensuring that you only update a single row.
Hope this helps! Let me know if there are any further questions or issues.
Got it – thanks for the speedy reply. I'm working on it now.
I've incorporated an array aggregator.
Now, within the aggregator module, I have:
* Source module: I've chosen the "Perplexity AI - chat completion" option.
* Target structure type: This is set to custom by default, and I'm unable to modify it.
* Aggregated fields: Here, I see options for various modules (Perplexity, Iterator, Tools, Google Sheets) and their respective components.
What should be my next step? My apologies for the numerous questions – I've been at this for hours!
Now, please select/check all the properties for the modules within the aggregator loop (those with a gray background). These should be your Iterator, Perplexity module, and Tools.
Run the scenario again and provide the output bundle from your Aggregator module.
Please provide the output bundles of the modules by running the scenario (or retrieve them from the scenario History tab). Then, click the white speech bubble in the top-right of each module and select “Download input/output bundles”.
A.
Save the contents of each bundle in your text editor as a bundle.txt
file and upload it here in this discussion thread.
B.
If you are unable to upload files on this forum, you can alternatively paste the formatted bundles like this:
Here are two methods to format text so it remains unchanged by the forum:
A. Manually type a code block
Add three backticks (```
) before and after the content/bundle, like this:
<sup>_content goes here_</sup>
B. Highlight and click the format button in the editor
Providing the input/output bundles will enable others to replicate what is happening in the scenario, even if they don't use the external service.
This will help others assist you more effectively. Thanks!
Certainly, here is the blueprint for the scenario.
blueprint.json (58.4 KB)
The output bundles from the perplexity AI module are shown below. Please note that I've set the max tokens to 10 to conserve tokens during testing:
[ { "id": "da624448-883b-423e-ba22-d8d4ded59925", "model": "llama-3-sonar-small-32k-online", "created": 1722926648, "usage": { "prompt_tokens": 163, "completion_tokens": 10, "total_tokens": 173 }, "object": "chat.completion", "choices": [ { "index": 0, "finish_reason": "length", "message": { "role": "assistant", "content": "To cook the tastiest potato curry, start by" }, "delta": { "role": "assistant", "content": "" } } ] } ]
[ { "id": "29adef32-6334-49cd-a46f-3aa86761d516", "model": "llama-3-sonar-small-32k-online", "created": 1722926652, "usage": { "prompt_tokens": 191, "completion_tokens": 10, "total_tokens": 201 }, "object": "chat.completion", "choices": [ { "index": 0, "finish_reason": "length", "message": { "role": "assistant", "content": "Recent developments in cooking the tastiest potato curry include" }, "delta": { "role": "assistant", "content": "" } } ] } ]
There are 4 such output bundles, all similar (output from the perplexity API, after processing prompts through an iterator). For some reason, I am unable to download all output bundles at once.
I have tried several variations. From my understanding, it appears the output from the perplexity AI module is fine. I'm uncertain how this output is being stored. I attempted to use an aggregator, but the issue persists: how to "extract" the correct content output from the array and map it to a variable or write it to a spreadsheet cell.