Create Share Link
🧾 Definition
The "Create Share Link" action allows you to generate a shareable link for a specific file or folder in your OneDrive. This action supports multiple sharing configurations, including view-only, edit-enabled, and embeddable links, as well as different scopes such as anonymous access or organization-restricted access.
This is especially useful for automating file sharing within workflows — whether you're distributing documents to team members, providing public access to a resource, or embedding files in external platforms.
Key Capabilities:
- Supports sharing both files and folders.
- Choose between View, Edit, and Embed link types.
- Control access with Anonymous or Organization-only scopes.
- Automatically returns a usable shareable URL and permission metadata.
Example Use Cases
1. Sharing Reports with External Clients
Automatically generate a view-only link to a report or document and email it to clients without requiring them to sign in.
2. Internal Collaboration on Project Files
Create an edit-enabled link scoped to your organization so internal team members can access and co-edit files in shared workflows.
3. Embedding Content in a Website
Use the embed link type for OneDrive personal files to display documents or media directly in public-facing websites or portals.
4. Automating Temporary File Access
Generate anonymous links as part of a scheduled process to share temporary access to OneDrive files with users or systems outside the organization.
5. Distributing Onboarding Materials
Create and distribute shared folders with organization-scoped view permissions containing onboarding documents for new employees.
🔽 Inputs
Below are the input fields required to configure the Create Share Link action. Each input plays a key role in generating the correct type of sharing link for your file or folder.
1.Connection
This refers to your authenticated OneDrive connection. It enables Zenphi to securely access your OneDrive environment and perform the file copy action on your behalf. You must set this up before configuring other fields.
2. Selecting File or Folder
Identifies the specific file or folder in OneDrive that you want to share.
-
You can select it in three ways:
- Interactive Picker: Click the OneDrive icon to open a window where you can browse and select your file or folder.
- Manual ID Input: Paste the unique file/folder ID (e.g.,
1EED600A8F0FD9A1!s75181466e59d4bacb1ec55930b932ed1
). - Path Input: Enable Select by Path and enter a full path (e.g.,
/drive/root:/Pictures/Screenshot 2023-05-10 125216.png
).
3. Type
Specifies the level of access and link behavior for the shared item.
- Edit: Grants full read-write access to anyone using the link.
- View: Grants view-only (read-only) access. Ideal for securely sharing files where edits aren't needed.
- Embed: Generates an embeddable link (for OneDrive personal accounts only), allowing you to embed the file into external websites or applications.
Choose the link type that best matches your sharing intent—editing, viewing, or embedding.
4. Scope
Defines who will be able to access the shared link and under what conditions.
-
Anonymous: No sign-in required. Anyone with the link can access the file. Ideal for public or external sharing.
- Note: This may be restricted by your admin.
-
Organization: Only people signed in with your organization's credentials can access the file.
- Available only for OneDrive for Business and SharePoint users.
Tip: Use Anonymous for external use cases and Organization for internal-only workflows.
🔁 Outputs
Once the Create Share Link action is executed, it generates a sharing configuration with key details that can be used in your automation for sharing, tracking, or embedding purposes.
1. Permission ID
The unique identifier associated with the permission granted via the sharing link.
- This ID can be used later to reference, modify, or revoke the permission if needed.
- Example: Useful for permission management tasks via Microsoft Graph or other downstream actions.
2. Link
The URL that provides direct access to the shared file or folder.
- This is the actual shareable link that you can distribute via email, embed on a website, or include in messages.
- The type of access (edit/view/embed) and scope (anonymous/organization) are enforced through this link.
3. Share ID
A unique token that identifies the sharing permission resource in OneDrive.
- This ID is useful for system-level tracking or managing share links programmatically in later stages.
- Unlike the full URL, it is often used behind the scenes or for record-keeping.
4. Type
Indicates the kind of sharing link that was created.
-
Possible values:
- Edit – Users with the link can edit the file/folder.
- View – Users can only view it.
- Embed – A link suitable for embedding on web pages (OneDrive personal only).
This mirrors the input field, confirming the type of link successfully generated.
5. Scope
Specifies who can access the link based on the permissions granted.
-
Values:
- Anonymous – Anyone with the link.
- Organization – Restricted to users within your organization.
-
This output confirms how broadly or narrowly your file/folder is accessible.
6. Roles
Represents the level of access granted by the sharing link.
-
Common values include:
read
– View-only access.write
– Edit access.
-
This is important for conditional logic in flows—e.g., sending different messages based on permission level.
📌 Example: Sharing a Project Report with External Collaborators
Scenario:You're working on a cross-company project and need to share a final report (PDF file) stored in OneDrive with several external partners who are not part of your organization. You want them to be able to view the file but not make edits. To do this efficiently and securely, you want to generate a view-only, anonymous share link using automation.
🔧 How to Set It Up
-
Select the FileIn the Selecting File or Folder field, either:
- Click the OneDrive sign-in option to select the file interactively from your drive,
- Or use a dynamic ID/path from a previous step (e.g., a file just uploaded earlier in the flow).
-
Define Link TypeSet Type to
View
so users can only read the file, not modify it. -
Set the ScopeChoose Scope as
Anonymous
to allow external users to access it without logging in. -
Run the FlowOnce the action is triggered, the Link output will contain a fully usable URL you can send to your collaborators via email, notification, or another automated channel.
💡 Outcome
Your partners can now open the link, view the document instantly in their browsers, and stay updated—without needing a Microsoft account or permissions management from your side.
✅ Best Practices
These recommendations will help you configure the Create Share Link action securely and effectively for different collaboration scenarios.
1. Choose the Appropriate Link Type for the Use Case
Select the Type based on the level of access needed:
View
– For read-only sharing (e.g., reports, policies).Edit
– For collaborative documents requiring updates from others.Embed
– For inserting into websites or dashboards (OneDrive Personal only).
This prevents overexposure and helps enforce access control.
2. Use Anonymous Scope Only When Necessary
While Anonymous links are convenient, they allow anyone with the link to access the file or folder.
- Prefer Organization scope for internal files to limit access to authenticated users.
- Use Anonymous only for public documents or external sharing when security is not a major concern.
3. Pair with Expiration or Auditing (Outside the Action)
This action does not natively support expiration or access tracking. For sensitive content:
- Consider using additional steps to monitor access logs or schedule link removal after a period.
- Store the link metadata and permission ID to remove or update it later in the flow.
4. Always Test with a Sample File
Before deploying your flow, try creating a share link with a test file. This:
- Ensures you’re using the correct ID or path.
- Helps verify that the link behaves as expected (edit/view, scope, etc.).
5. Document the Generated Links
Use downstream actions (e.g., send email, update a database, log to Excel) to store or distribute the link created by the action. This ensures:
- Traceability in your process.
- Easy reuse or revocation later.
Updated 1 day ago