Append log send email to Google Sheets envelope field not full!

I want to record send email log to Google Sheets by append, but in n8n log show like this

But in Google Sheets envelope field record like this

image

How to receive full data in envelope field?

Hey @huuich!

How are you appending the data? You can select either Raw or User Entered from the Value Input Mode additional option. You can read more about it in the FAQs section.

In this case do sadly not think that the Value Input Mode. The only way is probably to stringify the variable yourself via a Function-Node with the following code:

items[0].json.envelope = JSON.stringify(items[0].json.envelope);
return items;
1 Like

That’s working ok, thank you. Could you explain a bit more detail about this code and the reason above code is ok?

What the code is doing is converting a JavaScript object into a string. By default does JavaScript return [object Object] when it is told to make “text” out of an object. With JSON.stringify we do that manually “the proper way”.

Hope that makes sense.

1 Like