News·

How to use Tinq in Google Sheets

Tinq AI is a production-ready NLP toolkit wrapped into a REST API. It allows you to perform various NLP tasks such as summarization, paraphrasing, named-entity recognition, sentiment analysis, and much more. All that without the hassle of training models.
The only AI workspace you need

The only AI workspace you need

Tinq AI is a production-ready NLP toolkit wrapped into a REST API. It allows you to perform various NLP tasks such as summarization, paraphrasing, named-entity recognition, sentiment analysis, and much more. All that without the hassle of training models.

If you don't feel like reading, you can watch this video here:

Thanks to the REST API that [Tinq](https://tinq.ai/?ref=blog.tinq.ai) offers, you are able to use it in pretty much any product and create your own custom integrations.

Today, we will use the paraphrase API in order to write a custom function that paraphrases content in Google Sheets.

So let’s get started. First of all, you will need a Tinq AI account, that will give you access to the NLP API for free. After you have registered, you will have your API keys ready. But let's keep that on the side for the moment and let's create our google sheet document.

Once we create it, let's add some rows to it. The rows will be the data that we will pass to our function.

Note that depending on your Tinq plan, you may be limited to a certain number of characters per request & a maximum of requests.

Now that we have our data, we are going to create our paraphrasing function using the Google App script. For that, we have to click on “Tools”, then go on “Script editor”. This will take us to the script editor where we can write our code in order to create our paraphrasing function.

But before doing that, Let’s head on to the Tinq API documentation so we can see how the API works. For the documentation, you just need to click on the link in your dashboard. Each tool has its own API documentation for your convenience. We can see here that there are mandatory parameters:

  • API username and API key
  • Text (the text to paraphrase)
  • We can also set entropy which tells the API how different we want the output to be.

Now that we know how the API works, let's go ahead and write our function. If you know JavaScript, you should not have any issue with the code below.

function tinqParaphrase(text = "This is a very good tool for paraphrasing") {

  var formData = {
    'text': text,
    'api_key': '{YOUR_API_KEY}',
    'username': '{YOUR_USERNAME}',
    'changes_level': 30
  }

  var options = {
    'method': 'post',
    'payload': formData
  }

  var response = UrlFetchApp.fetch('https://tinq.ai/api/v1/rewrite', options);

  var data = JSON.parse(response.getContentText());

  return data.paraphrases;

}

If this is the first time that you are doing it, you will be asked to grant authorization to the script to access your Google Sheet document. Once you authorize the app, you can run it in the console or in your Goole Sheet document.

And voilà! That’s it. Now we can go on to our google sheet and use our function just like we would with any native function from google sheet.

tinqParaphrase(A1) // to paraphrase the content in the cell A1
tinqParaphrase(A2) // to paraphrase the content in the cell A2
...
tinqParaphrase(N) // to paraphrase the content in the cell N


Related Posts

Breaking Down the Latest AI Models: Practical Insights for Businesses

Breaking Down the Latest AI Models: Practical Insights for Businesses

Explore the newest AI model releases and their real-world applications. Learn how businesses in retail, finance, healthcare, and more are using AI to improve efficiency, customer experience, and decision-making.
Tinq.ai Now Integrates with Notion

Tinq.ai Now Integrates with Notion

Tinq.ai now supports Notion as a data source, enabling direct access to notes, documents, and databases while ensuring data security and real-time synchronization.
Tinq.ai Now Integrates with Google Drive

Tinq.ai Now Integrates with Google Drive

Tinq.ai now supports Google Drive as a data source, enabling seamless access to your documents, spreadsheets, and more. Keep your data private, secure, and always up to date.
How to check a website for plagiarism?

How to check a website for plagiarism?

Use Tinq.ai to extract and check web articles for plagiarism with ease. Learn to set up workflows and automate content monitoring.
How Plagiarized Content Affects SEO and Tips for Ensuring Originality

How Plagiarized Content Affects SEO and Tips for Ensuring Originality

Duplicate content can hurt SEO and damage credibility. Learn the impact and get essential tips to keep your content original and effective.
Content Extraction with Tinq.ai

Content Extraction with Tinq.ai

Learn how to efficiently extract and analyze web content using Tinq.ai's Article Extractor, both through API and a simple web interface. This guide also shows how to integrate the tool with other Tinq.ai features for a powerful content workflow.

Unify all your datasources and give your AI the context it needs.

Connect Google Drive, SharePoint, Notion, CRMs, wikis, and more—securely indexed and instantly usable in ChatGPT, Claude, Gemini, or any AI assistant.