How to convert input data from message into a string for use this string as a name for google sheets

I have to use tg_ID for create new sheet in a spreadsheet, but don’t understand how …

Describe the issue/error/question

What is the error message (if any)?

Please share the workflow

(Select the nodes and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow respectively)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database you’re using (default: SQLite):
  • Running n8n with the execution process [own(default), main]:
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]:

Hi @ipkvitov
One way of doing that is like this:

{{‘’+$json.tg_ID}}

ps. it is 2 single quotes, so empty string.

Yes!!! What original method! Why it works so?

It works because your data coming in is a number (check the little # next to it in the schema view) and google wants a string. You might have been able to do something like {{ $json.tg_ID.toString() }} as well.

1 Like

Thank you!!!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.