Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@activepieces/piece-microsoft-365-people",
"version": "0.1.4",
"version": "0.1.5",
"type": "commonjs",
"main": "./src/index.js",
"types": "./src/index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,37 +1,16 @@
import { PieceAuth } from "@activepieces/pieces-framework";

import { PieceAuth } from '@activepieces/pieces-framework';

const authDesc = `
1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).
2. From the left sidebar, go to **Microsoft Enfra ID**.
3. Under **Manage**, click on **App registrations**.
4. Click the **New registration** button.
5. Enter a **Name** for your app.
6. For **Supported account types**, choose:
- **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**
- Or select based on your requirement.
7. In **Redirect URI**, select **Web** and add the given URL.
8. Click **Register**.
9. After registration, you’ll be redirected to the app’s overview page. Copy the **Application (client) ID**.
10. From the left menu, go to **Certificates & secrets**.
- Under **Client secrets**, click **New client secret**.
- Provide a description, set an expiry, and click **Add**.
- Copy the **Value** of the client secret (this will not be shown again).
11. Go to **API permissions** from the left menu.
- Click **Add a permission**.
- Select **Microsoft Graph** → **Delegated permissions**.
- Add the following scopes:
- Contacts.ReadWrite
- offline_access
- Click **Add permissions**.
12. Copy your **Client ID** and **Client Secret**.
`
If you’d like to use your own custom Azure app instead of the default Activepieces app, follow the [Azure app creation guide](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app#register-an-application),
set the **Redirect URI** to {{redirectUrl}} and add the following **Microsoft Graph (Delegated) permissions** under **API permissions**:
- Contacts.ReadWrite
- offline_access`;

export const microsoft365PeopleAuth = PieceAuth.OAuth2({
description: authDesc,
authUrl: 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize',
tokenUrl: 'https://login.microsoftonline.com/common/oauth2/v2.0/token',
required: true,
scope: ['Contacts.ReadWrite', "offline_access"],
scope: ['Contacts.ReadWrite', 'offline_access'],
prompt: 'omit',
});
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@activepieces/piece-microsoft-365-planner",
"version": "0.1.4",
"version": "0.1.5",
"type": "commonjs",
"main": "./src/index.js",
"types": "./src/index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,15 @@ import {
UpdateTaskParams,
} from './types';

const authDesc = `
If you'd like to use your own custom Azure app instead of the default Activepieces app, follow the [Azure app creation guide](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app#register-an-application),
set the **Redirect URI** to {{redirectUrl}} and add the following **Microsoft Graph (Delegated) permissions** under **API permissions**:
- Group.Read.All
- Tasks.ReadWrite
- User.Read`;

export const microsoft365PlannerAuth = PieceAuth.OAuth2({
description: authDesc,
authUrl: 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize',
tokenUrl: 'https://login.microsoftonline.com/common/oauth2/v2.0/token',
required: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@activepieces/piece-microsoft-dynamics-365-business-central",
"version": "0.1.4",
"version": "0.1.5",
"scripts": {
"build": "tsc -p tsconfig.lib.json",
"lint": "eslint 'src/**/*.ts'"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,44 +1,16 @@
import { createCustomApiCallAction } from '@activepieces/pieces-common';
import {
createPiece,
OAuth2PropertyValue,
PieceAuth,
Property,
} from '@activepieces/pieces-framework';
import { PieceCategory } from '@activepieces/shared';
import { createRecordAction } from './lib/actions/create-record.action';
import { getRecordAction } from './lib/actions/get-record.action';
import { updateRecordAction } from './lib/actions/update-record.action';
import { deleteRecordAction } from './lib/actions/delete-record.action';
import { newOrUpdatedRecordTrigger } from './lib/triggers/new-or-updated-record.trigger';
import { createCustomApiCallAction } from '@activepieces/pieces-common';
import { getRecordAction } from './lib/actions/get-record.action';
import { searchRecordsAction } from './lib/actions/search-records.action';
import { PieceCategory } from '@activepieces/shared';
import { updateRecordAction } from './lib/actions/update-record.action';
import { businessCentralAuth } from './lib/auth';

const authDesc = `
1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).
2. From the left sidebar, go to **Microsoft Enfra ID**.
3. Under **Manage**, click on **App registrations**.
4. Click the **New registration** button.
5. Enter a **Name** for your app.
6. For **Supported account types**, choose:
- **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**
- Or select based on your requirement.
7. In **Redirect URI**, select **Web** and add the given URL.
8. Click **Register**.
9. After registration, you’ll be redirected to the app’s overview page. Copy the **Application (client) ID**.
10. From the left menu, go to **Certificates & secrets**.
- Under **Client secrets**, click **New client secret**.
- Provide a description, set an expiry, and click **Add**.
- Copy the **Value** of the client secret (this will not be shown again).
11. Go to **API permissions** from the left menu.
- Click **Add a permission**.
- Select **Dynamics 365 Business Central** → **Delegated permissions**.
- Add the following scopes:
- Financials.ReadWrite.All
- user_impersonation
- Click **Add permissions**.
12. Copy your **Client ID** and **Client Secret**.
`
import { newOrUpdatedRecordTrigger } from './lib/triggers/new-or-updated-record.trigger';

export const microsoftDynamics365BusinessCentral = createPiece({
displayName: 'Microsoft Dynamics 365 Business Central',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,14 @@
import { PieceAuth, Property } from '@activepieces/pieces-framework';

const authDesc = `
1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).
2. From the left sidebar, go to **Microsoft Enfra ID**.
3. Under **Manage**, click on **App registrations**.
4. Click the **New registration** button.
5. Enter a **Name** for your app.
6. For **Supported account types**, choose:
- **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**
- Or select based on your requirement.
7. In **Redirect URI**, select **Web** and add the given URL.
8. Click **Register**.
9. After registration, you'll be redirected to the app's overview page. Copy the **Application (client) ID**.
10. From the left menu, go to **Certificates & secrets**.
- Under **Client secrets**, click **New client secret**.
- Provide a description, set an expiry, and click **Add**.
- Copy the **Value** of the client secret (this will not be shown again).
11. Go to **API permissions** from the left menu.
- Click **Add a permission**.
- Select **Dynamics 365 Business Central** → **Delegated permissions**.
- Add the following scopes:
- Financials.ReadWrite.All
- user_impersonation
- Click **Add permissions**.
12. Copy your **Client ID** and **Client Secret**.
If you’d like to use your own custom Azure app instead of the default Activepieces app, follow the [Azure app creation guide](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app#register-an-application),
set the **Redirect URI** to {{redirectUrl}} and add the following **Dynamics 365 Business Central permissions** under **API permissions**:
- Financials.ReadWrite.All
- user_impersonation
`;

export const businessCentralAuth = PieceAuth.OAuth2({
description:authDesc,
description: authDesc,
props: {
environment: Property.ShortText({
displayName: 'Environment',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@activepieces/piece-microsoft-dynamics-crm",
"version": "0.2.4",
"version": "0.2.5",
"scripts": {
"build": "tsc -p tsconfig.lib.json",
"lint": "eslint 'src/**/*.ts'"
Expand Down
36 changes: 4 additions & 32 deletions packages/pieces/community/microsoft-dynamics-crm/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,40 +1,12 @@
import { createCustomApiCallAction } from '@activepieces/pieces-common';
import {
createPiece,
OAuth2PropertyValue,
PieceAuth,
Property,
} from '@activepieces/pieces-framework';
import { createPiece } from '@activepieces/pieces-framework';
import { PieceCategory } from '@activepieces/shared';
import { createRecordAction } from './lib/actions/create-record';
import { deleteRecordAction } from './lib/actions/delete-record';
import { getRecordAction } from './lib/actions/get-record';
import { updateRecordAction } from './lib/actions/update-record';
import { PieceCategory } from '@activepieces/shared';
import { dynamicsCRMAuth } from './lib/auth';

const authDesc = `
1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).
2. From the left sidebar, go to **Microsoft Enfra ID**.
3. Under **Manage**, click on **App registrations**.
4. Click the **New registration** button.
5. Enter a **Name** for your app.
6. For **Supported account types**, choose:
- **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**
- Or select based on your requirement.
7. In **Redirect URI**, select **Web** and add the given URL.
8. Click **Register**.
9. After registration, you’ll be redirected to the app’s overview page. Copy the **Application (client) ID**.
10. From the left menu, go to **Certificates & secrets**.
- Under **Client secrets**, click **New client secret**.
- Provide a description, set an expiry, and click **Add**.
- Copy the **Value** of the client secret (this will not be shown again).
11. Go to **API permissions** from the left menu.
- Click **Add a permission**.
- Select **Dynamics CRM** → **Delegated permissions**.
- Click **Add permissions**.
12. Copy your **Client ID** and **Client Secret**.
`

export function getBaseUrl(host: string, proxyUrl?: string): string {
if (proxyUrl && proxyUrl !== '') {
return proxyUrl;
Expand All @@ -59,7 +31,7 @@ export const microsoftDynamicsCrm = createPiece({
createCustomApiCallAction({
auth: dynamicsCRMAuth,
baseUrl: (auth) => {
const props = auth?.props
const props = auth?.props;
if (!props) {
return '';
}
Expand All @@ -69,7 +41,7 @@ export const microsoftDynamicsCrm = createPiece({
)}/api/data/v9.2`;
},
authMapping: async (auth) => ({
Authorization: `Bearer ${(auth ).access_token}`,
Authorization: `Bearer ${auth.access_token}`,
}),
}),
],
Expand Down
25 changes: 3 additions & 22 deletions packages/pieces/community/microsoft-dynamics-crm/src/lib/auth.ts
Original file line number Diff line number Diff line change
@@ -1,30 +1,11 @@
import { PieceAuth, Property } from '@activepieces/pieces-framework';

const authDesc = `
1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).
2. From the left sidebar, go to **Microsoft Enfra ID**.
3. Under **Manage**, click on **App registrations**.
4. Click the **New registration** button.
5. Enter a **Name** for your app.
6. For **Supported account types**, choose:
- **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**
- Or select based on your requirement.
7. In **Redirect URI**, select **Web** and add the given URL.
8. Click **Register**.
9. After registration, you'll be redirected to the app's overview page. Copy the **Application (client) ID**.
10. From the left menu, go to **Certificates & secrets**.
- Under **Client secrets**, click **New client secret**.
- Provide a description, set an expiry, and click **Add**.
- Copy the **Value** of the client secret (this will not be shown again).
11. Go to **API permissions** from the left menu.
- Click **Add a permission**.
- Select **Dynamics CRM** → **Delegated permissions**.
- Click **Add permissions**.
12. Copy your **Client ID** and **Client Secret**.
`;
Follow the [Azure app creation guide](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app#register-an-application),
set the **Redirect URI** to {{redirectUrl}} and add the **Dynamics CRM (Delegated) permissions** under **API permissions**.`;

export const dynamicsCRMAuth = PieceAuth.OAuth2({
description:authDesc,
description: authDesc,
props: {
hostUrl: Property.ShortText({
displayName: 'Host URL (without trailing slash)',
Expand Down
2 changes: 1 addition & 1 deletion packages/pieces/community/microsoft-excel-365/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@activepieces/piece-microsoft-excel-365",
"version": "0.4.7",
"version": "0.4.8",
"dependencies": {
"@activepieces/pieces-common": "workspace:*",
"@activepieces/pieces-framework": "workspace:*",
Expand Down
50 changes: 15 additions & 35 deletions packages/pieces/community/microsoft-excel-365/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { createCustomApiCallAction } from '@activepieces/pieces-common';
import {
createPiece,
OAuth2PropertyValue,
PieceAuth
} from '@activepieces/pieces-framework';
import { PieceCategory } from '@activepieces/shared';

Expand Down Expand Up @@ -41,37 +40,11 @@ import { newWorksheetTrigger } from './lib/trigger/new-worksheet';
import { updatedRowTrigger } from './lib/trigger/updated-row';

import { appendMultipleRowsAction } from './lib/actions/append-multiple-rows';
import { excelCommon } from './lib/common/common';
import { getWorksheetColumnsAction } from './lib/actions/get-wroksheet-columns';
import { findWorkbookAction } from './lib/actions/find-workbooks';
import { findWorksheetAction } from './lib/actions/find-worksheets';
import { getWorksheetColumnsAction } from './lib/actions/get-wroksheet-columns';
import { excelAuth } from './lib/auth';

const authDesc = `
1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).
2. From the left sidebar, go to **Microsoft Enfra ID**.
3. Under **Manage**, click on **App registrations**.
4. Click the **New registration** button.
5. Enter a **Name** for your app.
6. For **Supported account types**, choose:
- **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**
- Or select based on your requirement.
7. In **Redirect URI**, select **Web** and add the given URL.
8. Click **Register**.
9. After registration, you’ll be redirected to the app’s overview page. Copy the **Application (client) ID**.
10. From the left menu, go to **Certificates & secrets**.
- Under **Client secrets**, click **New client secret**.
- Provide a description, set an expiry, and click **Add**.
- Copy the **Value** of the client secret (this will not be shown again).
11. Go to **API permissions** from the left menu.
- Click **Add a permission**.
- Select **Microsoft Graph** → **Delegated permissions**.
- Add the following scopes:
- Files.ReadWrite
- offline_access
- Click **Add permissions**.
12. Copy your **Client ID** and **Client Secret**.
`;
import { excelCommon } from './lib/common/common';

export const microsoftExcel = createPiece({
displayName: 'Microsoft Excel 365',
Expand All @@ -81,7 +54,14 @@ export const microsoftExcel = createPiece({
minimumSupportedRelease: '0.30.0',
logoUrl: 'https://cdn.activepieces.com/pieces/microsoft-excel-365.png',
categories: [PieceCategory.PRODUCTIVITY],
authors: ['BastienMe', 'kishanprmr', 'MoShizzle', 'abuaboud', 'Pranith124', 'onyedikachi-david'],
authors: [
'BastienMe',
'kishanprmr',
'MoShizzle',
'abuaboud',
'Pranith124',
'onyedikachi-david',
],
actions: [
appendRowAction,
appendMultipleRowsAction,
Expand Down Expand Up @@ -117,14 +97,14 @@ export const microsoftExcel = createPiece({
baseUrl: () => excelCommon.baseUrl,
auth: excelAuth,
authMapping: async (auth) => ({
Authorization: `Bearer ${(auth as OAuth2PropertyValue).access_token}`
})
})
Authorization: `Bearer ${(auth as OAuth2PropertyValue).access_token}`,
}),
}),
],
triggers: [
readNewRows,
newRowInTableTrigger,
newWorksheetTrigger,
updatedRowTrigger
]
updatedRowTrigger,
],
});
Loading
Loading