Skip to content

Commit

Permalink
fix(outlook): fix sender property (#112)
Browse files Browse the repository at this point in the history
## Describe your changes
Sender was trying to be accessed at the incorrect key

## Issue ticket number and link

## Checklist before requesting a review (skip if just adding/editing
APIs & templates)
- [ ] I added tests, otherwise the reason is:
- [ ] External API requests have `retries`
- [ ] Pagination is used where appropriate
- [ ] The built in `nango.paginate` call is used instead of a `while
(true)` loop
- [ ] Third party requests are NOT parallelized (this can cause issues
with rate limits)
- [ ] If a sync requires metadata the `nango.yaml` has `auto_start:
false`
- [ ] If the sync is a `full` sync then `track_deletes: true` is set
- [ ] I followed the best practices and guidelines from the [Writing
Integration
Scripts](/NangoHQ/integration-templates/blob/main/WRITING_INTEGRATION_SCRIPTS.md)
doc
  • Loading branch information
khaliqgant authored Nov 18, 2024
1 parent e63a061 commit 290a958
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 7 deletions.
2 changes: 1 addition & 1 deletion flows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6509,7 +6509,7 @@ integrations:
endpoint:
method: GET
path: /emails
version: 1.0.1
version: 1.1.0
actions:
fetch-attachment:
input: DocumentInput
Expand Down
41 changes: 41 additions & 0 deletions integrations/outlook/mocks/emails/OutlookEmail/batchSave.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion integrations/outlook/nango.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ integrations:
endpoint:
method: GET
path: /emails
version: 1.0.1
version: 1.1.0
actions:
fetch-attachment:
input: DocumentInput
Expand Down
2 changes: 1 addition & 1 deletion integrations/outlook/syncs/emails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default async function fetchData(nango: NangoSync) {

function extractHeaders(message: OutlookMessage): Record<string, any> {
return {
From: message.from?.address,
From: message.from?.emailAddress.address,
To: message.toRecipients?.map((recipient) => recipient.emailAddress.address).join(', '),
Subject: message.subject
};
Expand Down
6 changes: 3 additions & 3 deletions integrations/outlook/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export interface OutlookMessage {
id: string;
from: EmailAddress;
toRecipients: Recipient[];
from: EmailContact;
toRecipients: EmailContact[];
receivedDateTime: string;
subject: string;
attachments: Attachment[];
Expand All @@ -25,6 +25,6 @@ export interface Attachment {
size: number;
}

export interface Recipient {
export interface EmailContact {
emailAddress: EmailAddress;
}
2 changes: 1 addition & 1 deletion scripts/run-integration-template.bash
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fi

TEMP_DIRECTORY=tmp-run-integration-template

NANGO_HOSTPORT_DEFAULT=http://localhost:3003
NANGO_HOSTPORT_DEFAULT=https://api.nango.dev

ITERATIONS=1
INPUT_JSON=""
Expand Down

0 comments on commit 290a958

Please sign in to comment.