File.json to Bot

(Art Arov) #1

Respond please, can bot extract information from file.json
https://api.telegram.org/file/bot261737701:AAETvJ59EjlRqof2VzLvHT3-afIA3VKo7do/documents/02_06_2017_08_14_28-732987432.json

I need to get the value totalsum

(Karen Barker) #2

Hi there,

Unfortunately the link you’ve provided doesn’t work for me. Can you resend the link please and if you can give a little more information about what you’re trying to achieve here that would be great. :slight_smile:

Thanks
Karen

(Art Arov) #3

Thanks, understood, sending json on webhook. I would like to know the possibilities of processing * .json files

(Art Arov) #4

(Sarah Palombo) #5

Thanks Art.
You actually have a few sum values in this JSON that’s returned. Just to confirm would you like the value in:

  • sum
  • totalsum
  • cashtotalsum
    Sarah
#6

Hi Art,
you must use double underscore notation (__) to read from output of your webhook, read this post https://community.flowxo.com/t/how-can-i-call-an-api-parse-json-data-for-use/75/8

(Art Arov) #7

MY FILE.JSON !!! And not a json answer. This does not apply to the file, you need JavaScript at least to read the files. Or am I mistaken?

#8

how and from do you read your JSON file?
Probably with a webhook that does a get of your file using the link you posted, if it’s so your json file should be returned in the output of your webhook.
Obviously remember:

  1. to set content type to json
  2. choose if you want or not your json object in an array (default not checked)
  3. check enable json nesting (default checked)