Simple: Trying to pull a line of text from, say, a spreadsheet, using it to replace the placeholder in another document (or spreadsheet). Just starting my make journey - go easy :)

Hi there, Just starting my make journey and have been working through the academy.

I’m just testing things at the moment, but I’ve hit a brick wall with the first thing I want to try.

My goal is to pass the text from, say, a spreadsheet and insert it (or overwrite) in a position when some other text. The idea is to create a basic prompt to send to OPenAI.

For example, I want the text found in a cell in the google sheet - let’s say a weburl - www.amazon.co.uk I would then want that pulling into a google doc(?) to overwrite a place holder. So, my text in the google doc would be “I want you to go to this website (PLACE HOLDER HERE) and give me a 100 word overview of the company”.

I would like the phrase (PLACE HOLDER HERE) to be replaced with the the webaddress pulled from the spreadsheet. But I just can’t seem to get this to happen using the Google doc ‘replace text’ action. Nothing happens!


Hopefully you understand what I’m looking to do(?).

I suspect I’m not going the best way about it - my ultimate goal is basically to be able to pull bits from a spreadsheet, insert them into another piece of text whereever I specificy and then pass the prompt to an AI.

Perhaps I"m making life complicated for myself?

Any help you can provide would be gratefully received.

John

Hi @Jayson_Freshton
It is unfortunate that this didn’t work. Could you please share a screenshot of the Google Docs output? This will help us assist you better.

If you require additional assistance, please don’t hesitate to reach out to us.
MSquare Support| Book Live Implementation
Visit us here
Youtube Channel

1 Like

Yeah, I thought that - but - that ‘option’ isn’t available when selecting the ‘replace a text in a document’ action:

You can see there’s no way to target a ‘variable’ in the google doc. Weirdly there does seem to be this option in the ‘create new document’ option:


…but as you can see I can’t seem to get that to work!

I did seem to solve my previous problem as I changed the ‘connection’ to the google sheet from ‘Make Academy’ to ‘My Google connection’. (Not sure why there are both there). I’m not sure why that caused an issue though as it could clearly see my document.

Ultimately though, I have managed to overwrite the google doc with the text in the google cell. I guess given this complexity I can’t help feeling I’m going about this the wrong way(?).

At the moment, whilst this worked, it only really works for a ‘one shot’ deal. If I add a new row into the spreadsheet it won’t replace the text in the google doc anymore because the text it’s looking to replace is no longer there!

What I really want to do it have it run through each row in the cell, create a new prompt for each - so any high level tips would be great…

You can do that directly without using Google doc module
image
Search rows for getting values of A row



Additionally, you can add a row for that corresponding row to save the input prompt in similar Google sheet

1 Like

Really appreciate your help.