Attachments from email integration not being added to email entities

I have a Gmail integration that we use to organize and store emails for our finance team. However, the attachments of the original emails are not being added to the Files field in Fibery. The attachments are not brought in at all.

Hey!
I am fibery developer working on email integration. Sorry for inconvenience, could you provide a workspace name so I could investigate more, please? Also, does resetup of the integration with the same account help? If not, does deletion of the original integration account and creation of a new one helps? Thanks!

Workspace name is NAB. I previously had this same integration in the workspace Pioneer Bible, but because of our branch’s complex needs and desire to use Fibery as a more robust knowledge management solution, we were spun off into our own workspace (so some of our users are both in Pioneer Bible and in NAB).

Configuring the integration does not resolve this issue. But removing the integration and setting up a new integration seems to have resolved this issue.

You reminded me that I never fully removed the integration from the previous workspace (though it had automatically stopped from too many failures, and I never resolved it since I knew we were migrating to a new workspace). So just now I completely deleted that older integration and then set up the new integration. Although, I was receiving emails just fine before. It was only the attachments that were not importing.

Anyway, it is working now. Thank you for your help!

@maxdubakov Actually, this issue has happened again. It occurred when I was testing out new automations on my Email database.

Here are the changes I remember that I made since setting up the integration and doing the first sync:

  1. In the email client, I marked an email as read
  2. I added 2 fields to the Email database (the integration)
  3. I changed 5 automations to add the action to define these 2 new fields according to the type of email.

To test the automations, I deleted an Email entity so that it would be synced afresh, and then I manually started a sync. The Email was created with the correct data, and the automations performed as expected, but only the Files field is empty when it should have an attachment. I tried marking the email in the client as unread and then again deleting the Email entity and resyncing, but the new Email entity still appears with a blank Files field. I went through this same process with a second Email entity, and the same thing happens.

Here are more settings info in case it’s helpful:

Does your automation run with a trigger ‘message/entity created’?

I was told that sometimes the attachment is added in Fibery after creation of the email.

So sometimes the message doesn’t contain an attachment when the automation runs.

It creates problems in our automations too.

Yes, they do. Does the automation interrupt and block the import of the attachment? I did notice that with the initial sync (after setting up the integration) the attachments only appeared about a second or two after the email entities were created.

Edit: I changed the automations to be on schedule, and now when the integration syncs the attachments appear correctly.

Not my favorite since I have to redo a lot of filters to make sure that no superfluous emails appear for our people (one of the automations I had was to delete nonrelevant email entities), but at least I can get something workable set up.

Thank You for providing more details!

I wasn’t able to find workspace nab.fibery.io though, it seems like Your workspace name is not the same as sub-domain we use to access logs, could you please provide sub-domain instead?

That’s quite unexpected that Automations prevent attachments from syncing and certainly should not be this way :sweat_smile:, could You provide information about what triggers you have for automations and what kind of actions they perform?

Edit: Also, if you’re able to share name of the file which didn’t sync successfully, that would help us investigate the issue. Of course, I completely understand if the filename is confidential.

Thank You in advance :hugs:

Yes, the sub-domain is nileafrica. We chose this as we were told that nab.fibery.io was unavailable.

So, the automations triggered on creation of an Email, and then there were filters to specify which entities would be affected by each automation. The first automation (at the top of the list) has three “and” filters in a group filtering Emails that do not contain certain Names or email addresses and an “or” filter specifying if the Name is empty. This automation deletes such Email entities. The second automation then deletes emails that are replies or forwards. Then there are 3 automations that update Email entities with appropriate fields depending on the email name or sender. All of these automations were “Email Created” triggers.

Here’s a picture. Currently the trigger is On Schedule, but previously it was on Email Created:

It was this way for all attachments of all emails. None would be imported. I’d rather not share the files themselves as they contain financial data and other PID.

@Michael_Ichter

Could you check your activity log and make sure that your automation rules don’t clean up existing files, please?

You can find activity log here:

It doesn’t seem like any rule removes the file:

The item was added 4 hours ago, and then it underwent the “Classify AIM” rule where it received its tag and relation. Then 2 hours ago, I changed the automations to run on schedule, then I did a manual sync, and it received the attachment (and it’s still there).

so, I can make an assumption that rule deleted your Files. Probably you can filter by type + action (in item added, item removed) to make sure that my assumption is right.

The only time it shows when the file was removed was a time when I manually removed the file before doing a manual sync to see if one of my attempted changes would fix the file-import issue I’m having. You can see in the image that I had deleted the Email entity at one point before doing another sync, creating a new Email entity for the same email.

Does that address what you’re talking about? Or am I missing something?

ok, so let’s investigate deeper.

Use case:

  1. synced emails
  2. deleted file manually from synced entity (there is one more Q for me why this field is editable)
  3. run manual sync

Result: no file.

Once you press sync button we execute delta sync. Actually fetch only part of data since last synchronization.

So what may happened. You deleted a file and run just simple sync => result your entity wasn’t within delta frame and entity has not been updated.

Solution: there is a button Force full sync by pressing it you say to integration framework to ignore delta

I don’t know what happens exactly, but @Chr1sG looked into this issue for me weeks ago. Back then the problem was that sometimes the attachment was added after creation. And I was told that couldn’t be fixed.

1 Like

Speaking automation, afaik, attachments are always added after creation as all other collection items. You should either react on item added or entity updated or run scheduled automations.

When I changed the automations from “on creation” to “on schedule” and then ran a normal manual sync, the attachment was properly imported. I didn’t need to use “Force full sync”.

By the way, I was incorrect earlier when I said that I only removed a file from the Email entity. I’m not able to do that manually. I actually deleted the whole entity. The “item removed” event just showed up right before the “deleted” event.


I see what you mean by the attachment being added later. I sent a new email to test how it behaved with the filters, and surprisingly the file was imported correctly. And I can see that it is added after the automation runs.

Strangely enough, with this test email just now, I tried the same thing as before where I delete the entity and then resync to test the automations, and the entity with its attachment are imported correctly, unlike all the tests I’ve been doing this morning. There seems to be some nuance that I’m not grasping, so the safe bet may be to just have the automations run on schedule or update, like you suggested.

2 Likes

so glad that we finally figured out :sparkling_heart:

I just want to note some additional information for posterity’s sake. Even though this issue is resolved, it is still taking up residence in my brain for some reason :slight_smile:.

There is another difference now that I didn’t mention. Before, when a relevant email was created, an automation would “add” an entity relation with another database, creating a Statement entity in that database and relating it with the newly created Email entity. I used this to display the statements in a view in the relevant space. However, I realized that I could take out this middle man and just display the Email entity itself in this space. So now there is no more relation to this other database, and no “Add entity” action in my relations.