Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4430 from AbdullahBitar/appendtext
feat: added append text action to google docs piece.
- Loading branch information
Showing
4 changed files
with
34 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"name": "@activepieces/piece-google-docs", | ||
"version": "0.1.6" | ||
"version": "0.1.7" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
packages/pieces/community/google-docs/src/lib/actions/append-text.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { docsCommon } from '../common'; | ||
import { googleDocsAuth } from '../..'; | ||
import { Property, createAction } from "@activepieces/pieces-framework"; | ||
|
||
export const appendText = createAction({ | ||
auth: googleDocsAuth, | ||
name: 'append_text', | ||
description: 'Appends text to google docs', | ||
displayName: 'Append text to google docs', | ||
props: { | ||
text: Property.LongText({ | ||
displayName: 'Text to append', | ||
description: 'The text to append to the document', | ||
required: true, | ||
}), | ||
documentId: Property.ShortText({ | ||
displayName: 'Document ID', | ||
description: 'The ID of the document to append text to', | ||
required: true, | ||
}) | ||
}, | ||
async run(context) { | ||
return await docsCommon.writeToDocument( | ||
context.propsValue.documentId, | ||
context.propsValue.text, | ||
context.auth.access_token | ||
); | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters