Google Doc integration error message

Hi,

I have the following error message in my scenario : “The operation failed with an error. 400 Invalid JSON payload received. Unknown name “replaceText” at ‘requests7.replace_all_text’: Proto field is not repeating, cannot start list.”

Can you post screenshots / a video overview the scenario and where specifically you are seeing this issue?


Odd. It’s erroring at the Google Module, but it’s complaining about module #7. It is hidden behind the popup panel though. Can you show what module #7 is, and it’s configuration?


Thank you for your help!

Hum. I’m not seeing where it is referencing the replaceText. Can you export your blueprint and share it here?

@luke.ifonly_solution Number 7 doesn’t refer to a module - it’s an item in the requests array that is sent to Google API (i.e. something’s wrong with the “Type demande” field input/output).

@Matthieu_Haenen I suggest opening a support ticket, they’ll be able to help you.

1 Like

Ha! Good catch @Daniel My coffee hadn’t kicked in yet.

@Matthieu_Haenen It is a bit hard to diagnose this without direct access, which support would have. You could try looking at the dev console to see the specific request that the scenario is making to determine where the issue is coming from. It seems that Google is unhappy with the JSON being sent. You could pull the JSON from the request being made and attempt to validate it to see what might be missing. You could then compare the request being made to the Google API docs to determine what might be wrong too.

There are partners available to help as well if support doesn’t respond in the timeframe you want.

1 Like

The best way to find the culprit is to use a tool like https://jsonchecker.com/ and check the JSON body of the input data sent to Google Doc (as @luke.ifonly_solution recommended :wink: )

2 Likes

@loic.wiseflow While this is good advice when you’re creating your own JSON data, it won’t help in this particular case because JSON Checker validates only syntax which is formally correct in body requests. Example:

{
	"fckptn": "true"
}

is a perfectly valid JSON, yet it results in an error if the service expects a boolean value.

So the user has to dig deeper to investigate expected data types, objects, etc. instead of checking the syntax. It might also be that the issue is on Make’s side.

1 Like

@Matthieu_Haenen this particular expression looks odd. You seem to be accessing an array and comparing it to an oddly formed string. First if you want to do that you’ll need to grab part of the array and then check the string. The error is indicating something based on the operation performed but I don’t see any replaceText option so I think that’s a background function.

2 Likes

@Daniel, I agree the syntax could be correct but it could also be that Make does not escape some special characters correctly and create an invalid JSON. This is only step 1 in the troubleshooting process. If the JSON body is correct then step 2 is to remove all the mapping and add the fields one by one to see which one creates an issue.

2 Likes

@alex.newpath It’s actually @Matthieu_Haenen who has this issue.

When you map the 1st array item, there’s no indicator of that in the module inspector (1st screenshot). Only when you map the 2nd (3rd, 4th, …) item you see can see it in the module inspector (2nd screenshot). Based on that (and looking at Matthieu’s mapping - I think he knows what he’s doing) I assume his mapping is correct.

image

image

The error clearly states there’s a problem with the 7th item in the body request array of values that replace tokens in the Google Doc. 7th array item is the #8 field/value in the module inspector which is “Type demanded”. That’s where I’d start.

1 Like

Hi guys !

Thank you for your answers !
I will try all your recommendations !

Have a great day :slight_smile:

1 Like