This is the current state of my scenario, its workflow is setup to read a Notion database and populate a Google calendar event, it is a one-way flow but ideal for me since i use Notion to create a Trip planner and all events are entered there and then passed to a shared Google Calendar:
I start with Notion watch database module which includes attachments but the attachment urls have too many characters. Notion uploads → AWS S3 with pre-signed URLs.
-
Those URLs are very long (hundreds of characters with
%2F,%3D, etc.). -
In the inbound bundle, the link is intact, and opening it in the browser works fine.
-
But when I pass it to the Google Calendar API →
attachments.fileUrlfield, Google silently truncates the URL past a certain length (somewhere ~2000 chars, depends on encoding). -
That truncation drops the
X-Amz-Signatureor other required params → and that’s why you get the XMLAuthorizationQueryParametersError.
So it seems that Google Calendar isn’t designed to handle giant, expiring URLs in its attachment slot.
The work around was to add an HTTP get module to grab the attachment and pass the name to Google drive. I use a Google search to see if the file has already been uploaded. If it has it routes to the Google update module which then sets a multiple variable:
If the file doesnt exist it routes to the Google upload module and also sets the same variables. These are set up in the router order as 1 and 2, so the variables get populated before pulling them later.
The 3rd route then connects to the “Get multiple Variables” module where i grab the necessary variable names to create the array needed for Google Calendar module array map.
The attachment field in the Google calendar module expects an array if mapping to that field. The array has to follow the Google calendar API which requires a fileUrl (Google’s attachments object supports 3 main properties):
[
{
“fileUrl”: “{{3.webViewLink}}”, #THIS IS REQUIRED
“title”: “{{3.name}}”,
“iconLink”: “{{3.iconLink}}”
}
This works because:
-
{{3.webViewLink}}maps from the Google Drive module output. -
Same with
{{3.name}}and{{3.iconLink}}.
]
The caveat with this workflow occurs when there is no attachment link in the database. Ive set up Resume error handlers to allow the workflow to continue because ultimately I want the calendar event created, updated or deleted but at arrival to the Google calendar create or update branch it will fail if the fileUrl variable is empty. It will also fail if i pass an empty array or add a conditional in the attachment field like this:
if {{length(59.array.fileUrl)}}>0;{{59.array}}
or if {{length(59.array.fileUrl)}}>0;{{59.array}};emptystring;) in an attempt include array if exists and populate or just leave blank. This will throw an error like this:
It seems that field does not like strings or conditionals.
The work around unfortunately seems to be to add another router that filters if array exists and fileUrl length > 0 then connect to a Google create module with the attachment field populated and the other route to connect to a Google create module if fileUrl is emplty but leave the attachment field blank. I was looking for a more elegant or programmatic way to do this?




